/*
 * Styles for editor-generated (Quill) content as it is published, scoped
 * under .page-content so it never leaks into admin chrome. Loaded by every
 * theme after Bootstrap (or on its own, for the no-Bootstrap "simple"
 * theme) and after assets/quill/quill.css.
 *
 * This replaces the old global `img { width: 400px }` rule that used to
 * live in assets/quill/quill.css for published pages: that rule still
 * exists there for the editor's own canvas, but published/viewed pages get
 * their image sizing from here instead. Do not edit quill.css.
 */

.page-content {
    /* Readable measure and line-height for Gujarati/Devanagari as well as
       Latin text. System font stack first (no web fonts are loaded), with
       Gujarati/Devanagari fallbacks so those scripts still render with a
       font that has proper shaping instead of tofu/boxes. */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Noto Sans Gujarati", "Noto Sans Devanagari", "Shruti", "Nirmala UI",
        Helvetica, Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    max-width: 42em;
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: break-word;
}

.page-content > :first-child {
    margin-top: 0;
}

.page-content > :last-child {
    margin-bottom: 0;
}

.page-content p,
.page-content ol,
.page-content ul,
.page-content pre,
.page-content blockquote,
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    margin: 0 0 1em;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    line-height: 1.3;
    font-weight: 600;
}

/* ---------------------------------------------------------------- Quill: text alignment */

.page-content .ql-align-center {
    text-align: center;
}

.page-content .ql-align-right {
    text-align: right;
}

.page-content .ql-align-justify {
    text-align: justify;
}

/* ---------------------------------------------------------------- Quill: indent */

.page-content .ql-indent-1 {
    padding-left: 3em;
}

.page-content .ql-indent-2 {
    padding-left: 6em;
}

.page-content .ql-indent-3 {
    padding-left: 9em;
}

.page-content .ql-indent-4 {
    padding-left: 12em;
}

.page-content .ql-indent-5 {
    padding-left: 15em;
}

.page-content .ql-indent-6 {
    padding-left: 18em;
}

.page-content .ql-indent-7 {
    padding-left: 21em;
}

.page-content .ql-indent-8 {
    padding-left: 24em;
}

/* ---------------------------------------------------------------- Quill: size */

.page-content .ql-size-small {
    font-size: 0.75em;
}

.page-content .ql-size-large {
    font-size: 1.5em;
}

.page-content .ql-size-huge {
    font-size: 2.5em;
}

/* ---------------------------------------------------------------- Quill: direction */

.page-content .ql-direction-rtl {
    direction: rtl;
    text-align: right;
}

/* ---------------------------------------------------------------- images */

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5%;
    display: block;
}

.page-content .ql-align-center img,
.page-content .ql-align-center.ql-image,
.page-content p.ql-align-center img {
    margin-left: auto;
    margin-right: auto;
}

/* An image that is itself the centered element (Quill sometimes puts the
   align class on the image's wrapping element rather than the image). */
.page-content .ql-align-center img {
    margin-left: auto;
    margin-right: auto;
}

/* ---------------------------------------------------------------- blockquote */

.page-content blockquote {
    margin: 0 0 1em;
    padding: 0.5em 1.25em;
    border-left: 4px solid #ccc;
    color: #555;
    font-style: italic;
}

/* ---------------------------------------------------------------- lists */

.page-content ul,
.page-content ol {
    padding-left: 1.5em;
}

.page-content li {
    margin-bottom: 0.35em;
}

/* A clean list of links to a category's pages, with large touch targets. */
.page-content ul.category-pages,
ul.category-pages {
    list-style: none;
    margin: 0 0 1em;
    padding: 0;
    max-width: 42em;
    margin-left: auto;
    margin-right: auto;
}

ul.category-pages li {
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
}

ul.category-pages li:first-child {
    border-top: 1px solid #e5e5e5;
}

ul.category-pages a {
    display: block;
    padding: 0.9em 0.25em;
    text-decoration: none;
    font-size: 1.05em;
    min-height: 44px;
}

ul.category-pages a:hover,
ul.category-pages a:focus {
    text-decoration: underline;
}

/* ---------------------------------------------------------------- misc */

.page-content pre {
    padding: 0.75em 1em;
    background: #f5f5f5;
    border-radius: 4px;
    overflow-x: auto;
}

.page-content code {
    background: #f5f5f5;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

.page-content hr {
    margin: 1.5em 0;
    border: 0;
    border-top: 1px solid #ddd;
}

.page-content a {
    word-break: break-word;
}
