@charset "UTF-8";

/* Load after app.css and the editor vendor stylesheet. Keep authored inline formats. */
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) {
    color: #34445a;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.8;
    overflow-wrap: anywhere;
    text-align: left;
    word-break: normal;
}

.article-content.article-content {
    max-width: 100%;
    overflow-x: auto;
    white-space: normal;
}

/* Reading-only table wrappers do not change the desktop table layout. */
.article-content .article-table-scroll { display: contents; }

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) p {
    margin: 0 0 1em;
    line-height: inherit;
    text-indent: 0;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) :is(h1, h2, h3, h4, h5, h6) {
    color: inherit;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.5;
    margin: 1.25em 0 .6em;
    text-indent: 0;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) h1 { font-size: 2em; }
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) h2 { font-size: 1.5em; }
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) h3 { font-size: 1.25em; }
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) h4 { font-size: 1.125em; }
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) :is(h5, h6) { font-size: 1em; }

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) :is(ul, ol) {
    margin: 0 0 1em;
    padding-left: 2em;
    text-indent: 0;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) ul { list-style-type: disc; }
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) ol { list-style-type: decimal; }
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) li {
    margin: .25em 0;
    line-height: inherit;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) li > :is(ul, ol) { margin: .25em 0; }

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) blockquote {
    background: #f3f7fc;
    border: 0;
    border-left: 3px solid #9bb9df;
    color: #566b86;
    font-size: inherit;
    font-weight: 400;
    line-height: inherit;
    margin: 1em 0;
    padding: .75em 1.25em;
    text-indent: 0;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) blockquote > :last-child { margin-bottom: 0; }

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) a {
    color: #1764db;
    text-decoration: underline;
    text-underline-offset: .2em;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) hr {
    background: transparent;
    border: 0;
    border-top: 1px solid #dce5f1;
    height: 0;
    margin: 1.5em 0;
}

/* Width and aspect-ratio are authored together; height stays fluid on narrow screens. */
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) img {
    border-radius: 4px;
    display: inline-block;
    height: auto;
    margin: .5em 0;
    max-width: 100%;
    vertical-align: middle;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) figure { margin: 1em 0; }
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) figcaption {
    color: #7a8495;
    font-size: 14px;
    line-height: 1.6;
    margin-top: .5em;
    text-align: center;
    text-indent: 0;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) table {
    border-collapse: collapse;
    border-spacing: 0;
    font-size: inherit;
    margin: 1em 0;
    max-width: 100%;
    table-layout: fixed;
    width: 100%;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) :is(th, td) {
    border: 1px solid #dce5f1;
    line-height: 1.6;
    min-width: 32px;
    padding: .5em .75em;
    text-align: left;
    text-indent: 0;
    vertical-align: top;
    overflow-wrap: anywhere;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) th {
    background: #f3f6fa;
    font-weight: 700;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) :is(th, td) > :last-child { margin-bottom: 0; }
:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) caption {
    color: #7a8495;
    font-size: .875em;
    padding: .5em;
    text-align: center;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) code {
    background: #f3f6fa;
    border-radius: 3px;
    font-family: Consolas, Monaco, monospace;
    font-size: .9em;
    padding: .1em .3em;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) pre {
    background: #f3f6fa;
    border: 1px solid #e4eaf2;
    border-radius: 6px;
    margin: 1em 0;
    overflow: auto;
    padding: 1em;
    text-indent: 0;
    white-space: pre;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) pre code {
    background: none;
    border: 0;
    display: block;
    padding: 0;
}

:is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) :is(sub, sup) {
    font-size: .75em;
    line-height: 0;
}

@media (max-width: 600px) {
    :is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) blockquote { padding: .65em .85em; }
    :is(.article-content.article-content, .rich-editor-shell [data-slate-editor]) :is(th, td) { padding: .4em .5em; }
}

/* Public mobile reading: contain wide content locally, never clip the article. */
@media (max-width: 767px) {
    .portal-article-page :is(.portal-article-layout, .portal-reading) {
        min-width: 0;
        max-width: 100%;
    }

    .portal-article-page .article-content.article-content {
        width: 100%;
        min-width: 0;
        overflow: visible;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .portal-article-page .article-content :is(p, div, figure, blockquote, ul, ol, h2, h3, h4) {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
    }

    .portal-article-page .article-content :is(p, li, figcaption, h2, h3, h4) {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .portal-article-page .article-content img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Only image blocks lose indentation; prose keeps the author's indentation. */
    .portal-article-page .article-content .article-image-block {
        text-align: center !important;
        text-indent: 0 !important;
    }

    .portal-article-page .article-content .article-image-block img {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .portal-article-page .article-content figcaption {
        text-align: center !important;
        text-indent: 0 !important;
    }

    .portal-article-page .article-content .article-table-scroll {
        display: block;
        width: 100%;
        overflow-x: auto;
        margin: 1em 0;
        -webkit-overflow-scrolling: touch;
    }

    .portal-article-page .article-table-scroll > table {
        max-width: none;
        margin: 0;
    }

    .portal-article-page .portal-article-footer { flex-wrap: wrap; }
    .portal-article-page :is(.portal-article-meta, .portal-article-footer) > span {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}
