/*
 * Chinese article typography for normalized WeChat/legacy posts.
 *
 * Markup contract: every article is wrapped in .cn-article by
 * class-liu-content-formatter.php. The theme's .mc-wrapper h2/p rules are
 * intentionally overridden only inside this wrapper, so English posts and
 * ordinary pages keep the reconstructed lawfirmsites styling.
 */

.cn-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 4px;
    color: #3d3d3d;
    font-size: 20px;
    line-height: 1.95;
    letter-spacing: 0.015em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Let the post title, byline and body share one editorial column. */
.cn-article-page .mc-wrapper > h2,
.cn-article-page .mc-wrapper > p.text-right,
.cn-article-page .mc-wrapper > p:last-child {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.cn-article p,
.cn-article li {
    font-size: 20px;
    line-height: 1.95;
    color: #3d3d3d;
    margin: 0 0 1.35em;
    text-align: justify;
    text-justify: inter-ideograph;
}

.cn-article strong {
    color: #232323;
    font-weight: 600;
}

.cn-article em {
    font-style: normal;
}

.cn-article a {
    color: #1c4985;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.cn-article a:hover {
    color: #0e2d55;
}

/* WeChat account header: muted masthead, two short lines. */
.cn-article .cn-promo {
    font-size: 13px;
    line-height: 1.9;
    color: #9a9a9a;
    text-align: center;
    letter-spacing: 0.04em;
    margin: 0 0 0.15em;
}

.cn-article .cn-promo + .cn-promo {
    margin-top: 0;
    margin-bottom: 0.8em;
}

.cn-article .cn-promo strong {
    color: #8c8c8c;
    font-weight: 500;
}

/* Centred section label: ｜洞察｜ */
.cn-article .cn-kicker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 2.2em 0 1.9em;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.38em;
    text-indent: 0.38em;
    color: #1c4985;
    text-align: center;
}

.cn-article .cn-kicker::before,
.cn-article .cn-kicker::after {
    content: "";
    width: 34px;
    height: 1px;
    background: #c8d5e6;
}

.cn-article .cn-kicker span {
    white-space: nowrap;
}

/* Opening paragraph: slightly larger, darker, no extra decoration. */
.cn-article .cn-lead {
    font-size: 21px;
    line-height: 1.9;
    color: #2c2c2c;
    margin-bottom: 1.5em;
}

.cn-article .cn-lead strong {
    color: #1f1f1f;
    font-weight: 500;
}

/* WeChat often bolds a whole paragraph that is not really emphasis; keep the
   colour contrast but drop the heavy 700 weight. */
.cn-article p.cn-bold strong {
    font-weight: 500;
}

/* Sentence that introduces a list or the next block. */
.cn-article .cn-lead-in {
    color: #333;
    margin-bottom: 0.85em;
}

.cn-article .cn-list-lead {
    color: #333;
    margin-bottom: 0.5em;
}

/* Dashes used as bullets in WeChat copy. */
.cn-article .cn-dash {
    padding-left: 1.35em;
    text-indent: -1.35em;
    margin-bottom: 0.65em;
    color: #3d3d3d;
}

/* Figure/table captions such as 图表一｜… */
.cn-article .cn-figure-caption {
    margin: 2.2em 0 0.8em;
    font-size: 14px;
    line-height: 1.7;
    color: #8a8a8a;
    text-align: center;
    letter-spacing: 0.06em;
    text-indent: 0;
}

/* Section heading: large pale number + blue title. */
.cn-article h2.cn-h2 {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 2.9em 0 1.05em;
    padding: 0;
    font-size: 30px;
    line-height: 1.42;
    font-weight: 600;
    color: #1c4985;
    text-transform: none;
    letter-spacing: 0.01em;
    border: 0;
}

.cn-article h2.cn-h2:after {
    content: none;
    display: none;
}

.cn-article h2.cn-h2 .cn-secnum {
    flex: 0 0 auto;
    font-family: 'Teko', 'NTR', 'LXGW WenKai', sans-serif;
    font-size: 54px;
    line-height: 0.92;
    font-weight: 500;
    color: #c6d6ea;
    letter-spacing: 0;
    user-select: none;
}

.cn-article h2.cn-h2 .cn-h-text {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 3px;
}

.cn-article h2.cn-h2 strong,
.cn-article h3.cn-h3 strong {
    font-weight: inherit;
    color: inherit;
}

/* Subhead: left rule and optional step number. */
.cn-article h3.cn-h3 {
    margin: 2em 0 0.7em;
    padding: 0 0 0 0.72em;
    font-size: 22px;
    line-height: 1.55;
    font-weight: 600;
    color: #2b4c77;
    border-left: 3px solid #d3e0f0;
    letter-spacing: 0.01em;
}

.cn-article h3.cn-h3 .cn-subnum {
    display: inline-block;
    margin-right: 0.35em;
    color: #1c4985;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Two-line WeChat heading: second line as deck. */
.cn-article .cn-deck {
    margin: -0.35em 0 1.55em;
    font-size: 17px;
    line-height: 1.8;
    color: #7c7c7c;
    letter-spacing: 0.02em;
    text-align: left;
}

.cn-article .cn-deck strong {
    color: #6f6f6f;
    font-weight: 500;
}

/* Divider between major blocks. */
.cn-article .cn-hr {
    width: 58%;
    height: 1px;
    margin: 2.8em auto;
    border: 0;
    background: linear-gradient(90deg, transparent, #d8e1ec 20%, #d8e1ec 80%, transparent);
    opacity: 1;
}

/* Lists */
.cn-article .cn-list {
    margin: 0 0 1.5em;
}

.cn-article .cn-list ul,
.cn-article .cn-list ol {
    margin: 0 0 0.2em;
    padding-left: 1.45em;
}

.cn-article .cn-list li {
    margin: 0 0 0.55em;
    padding-left: 0.15em;
    color: #3d3d3d;
}

.cn-article .cn-list li::marker {
    color: #1c4985;
}

/* Tables */
.cn-article .cn-table-wrap {
    margin: 1.6em 0 2.2em;
    overflow-x: auto;
    border: 1px solid #e4e9f1;
    border-radius: 6px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.cn-article table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.7;
    color: #3d3d3d;
}

.cn-article th,
.cn-article td {
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f6;
    text-align: left;
    vertical-align: top;
}

.cn-article thead td,
.cn-article thead th,
.cn-article th {
    background: #f5f8fc;
    color: #1c4985;
    font-weight: 600;
    white-space: nowrap;
}

.cn-article tbody tr:last-child td {
    border-bottom: 0;
}

/* Blockquotes */
.cn-article blockquote.cn-quote {
    margin: 1.9em 0;
    padding: 1.05em 1.35em;
    background: #f6f9fd;
    border-left: 3px solid #1c4985;
    border-radius: 0 4px 4px 0;
    color: #4a4a4a;
    font-size: 19px;
    line-height: 1.9;
}

.cn-article blockquote.cn-quote p:last-child {
    margin-bottom: 0;
}

/* Images and code */
.cn-article .cn-figure {
    margin: 2.1em 0;
    text-align: center;
}

.cn-article .cn-figure img,
.cn-article p img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 8px 26px rgba(28, 73, 133, 0.08);
}

.cn-article .cn-pre {
    margin: 1.8em 0;
    padding: 1em 1.2em;
    overflow-x: auto;
    background: #f5f7fa;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.7;
}

.cn-article code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 0.88em;
    background: #f2f4f8;
    border-radius: 3px;
    padding: 0.12em 0.32em;
}

/* Keep the first/last element flush with the wrapper, as the theme does. */
.cn-article > :first-child {
    margin-top: 0;
}

.cn-article > :last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .cn-article {
        font-size: 18px;
        line-height: 1.9;
        padding: 0;
    }

    .cn-article p,
    .cn-article li {
        font-size: 18px;
        line-height: 1.92;
        margin-bottom: 1.15em;
    }

    .cn-article .cn-lead {
        font-size: 19px;
    }

    .cn-article h2.cn-h2 {
        gap: 9px;
        margin: 2.2em 0 0.9em;
        font-size: 24px;
    }

    .cn-article h2.cn-h2 .cn-secnum {
        font-size: 40px;
    }

    .cn-article h3.cn-h3 {
        font-size: 20px;
        margin-top: 1.7em;
    }

    .cn-article .cn-deck {
        font-size: 16px;
    }

    .cn-article .cn-promo {
        font-size: 12px;
    }
}
