/*
 * China Market Brief — type system v1.1 (2026-10-19)
 * One font, 7 sizes, 4 weights. Every font-size in the plugin CSS is one of these values.
 *
 *  token   px   use
 *  --fs-xs  12  badges, sources, legal notes (never smaller)
 *  --fs-sm  13  meta lines, dates, chips, captions, table headers
 *  --fs-base 15 UI text, list titles, buttons, table cells
 *  --fs-md  17  card titles, article body, lead summary
 *  --fs-lg  20  section headings (h2 on pages, article h2)
 *  --fs-xl  24  lead headline, key numbers, D-day, mobile page title
 *  --fs-2xl 30  page / article title (h1)
 *
 *  rules: anything clickable is 13px or larger · headings on one page step down lg → md → base · table header = cell size, weight 600
 *  weights: 400 body · 500 nav and soft emphasis · 600 buttons and labels · 700 headings and numbers
 *  font: Pretendard (Korean/English, self-hosted) · Noto Sans SC for Chinese text (lang="zh")
 */
:root {
	--fs-xs: 14px; --fs-sm: 14px; --fs-base: 15px; --fs-md: 17px; --fs-lg: 20px; --fs-xl: 24px; --fs-2xl: 30px;
	/* Pretendard has no Han glyphs, so Chinese words inside Korean/English text (双11, 亿邦动力) fall to Noto Sans SC instead of Malgun Gothic's Korean-style hanja */
	--c2-font: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
	--cmb-font: var(--c2-font);
	--cmb-zh: "Noto Sans SC", "Pretendard Variable", sans-serif;
	--wp--preset--font-family--sans: var(--c2-font);
}
html body, .c2, .cmb-wrap, .cmb-sec, .cmb-hdr, .cmb-ftr, .cmb-dialog, .cmb-intro, .cmb-art, button, input, select, textarea { font-family: var(--c2-font); }
:lang(zh) { font-family: var(--cmb-zh); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* numbers line up in tables, tickers and stat cards */
.c3-num b, .c3-kpi b, .c3-ind b, .c2-tk b, .c3-dd b, .c2-tbl td, .c3-cmp td, .c3-icard__v b, time { font-variant-numeric: tabular-nums; }

/* theme-driven sizes (block theme presets) brought onto the scale */
.cmb-art__title, .c2-ph h1, .wp-block-post-title { font-size: var(--fs-2xl) !important; line-height: 1.3 !important; font-weight: 700 !important; letter-spacing: -.02em; }
.cmb-prose .wp-block-heading, .cmb-prose h2 { font-size: var(--fs-lg) !important; line-height: 1.4 !important; font-weight: 700 !important; }
.cmb-prose h3 { font-size: var(--fs-md) !important; line-height: 1.45 !important; font-weight: 700 !important; }
.cmb-prose p, .cmb-prose li { font-size: var(--fs-md); line-height: 1.75; }
.cmb-standfirst { font-size: var(--fs-md) !important; line-height: 1.7 !important; font-weight: 500 !important; }
.c2-ph p { font-size: var(--fs-base); }
.screen-reader-text { font-size: var(--fs-base) !important; }

/* home: one hero headline, numbers on the xl step */
.c3-slide__t { font-size: var(--fs-2xl); line-height: 1.3; font-weight: 700; }
.c3-num b, .c3-kpi b, .c3-icard__v b { font-size: var(--fs-xl); }

/* headings never heavier than 700 (theme presets set h1–h6 to 800) */
body h1, body h2, body h3, body h4, body h5, body h6, body .cmb-page-title { font-weight: 700; }

/* home: every section heading is lg; headings inside a block are md; tab labels are base */
.c3-home .c3-sec > .c2-hsec h2,
.c3-home .c3-grid2 .c2-hsec h2,
.c3-home .c3-hub__h h2,
.c3-home .c3-sec > .c3-h,
.c3-home .c3-pair__c > .c3-h,
.c3-home .c3-sched__h h2 { font-size: var(--fs-lg); line-height: 1.35; }
.c3-home .c3-cols .c2-hsec h2 { font-size: var(--fs-md); line-height: 1.4; }
.c3-home .c3-hub__p h3 { font-size: var(--fs-base); }
/* section headings read the same in English: no all-caps, no wide tracking */
.c2-hsec h2, .c2-hsec h3 { text-transform: none; letter-spacing: -.01em; }

/* article pages: the Site Editor's extra CSS sets 39/23/16/11px; bring it back onto the scale */
html body:has(.cmb-art__head) .cmb-art__title { font-size: var(--fs-2xl) !important; }
html body:has(.cmb-art__head) .entry-content h2 { font-size: var(--fs-lg) !important; }
html body:has(.cmb-art__head) .entry-content h3 { font-size: var(--fs-md); }
html body:has(.cmb-art__head) .cmb-art__meta { font-size: var(--fs-sm); }
html body:has(.cmb-art__head) .cmb-art__sum { font-size: var(--fs-md); }
html body:has(.cmb-art__head) .cmb-srcbox .cmb-h3 { font-size: var(--fs-base) !important; }
html body:has(.cmb-art__head) .cmb-srcbox dt { font-size: var(--fs-xs); }
html body:has(.cmb-art__head) .cmb-srcbox dd { font-size: var(--fs-sm); }
.cmb-srcbox dt::after { font-size: var(--fs-xs) !important; }

/* anything clickable is at least sm (13px); 12px is for read-only labels only */
.c3-tfilt .c3-chips button, .cmb-fchip, .cmb-tdir .cmb-fchip,
.c2 .c2-lnk, .c2 .c2-go, .c2-tool .c2-lnk, .c2-tool .c2-go { font-size: var(--fs-sm); }

/* tables: header row is the same size as its cells, set apart by weight */
.cmb-tfig th { font-weight: 600; }
.cmb-ec__data th { font-size: var(--fs-sm); }

@media (max-width: 760px) {
	.c3-slide__t { font-size: var(--fs-xl); }
	.c3-num b, .c3-kpi b { font-size: var(--fs-lg); }
	.cmb-art__title, .c2-ph h1, .wp-block-post-title { font-size: var(--fs-xl) !important; }
	html body:has(.cmb-art__head) .cmb-art__title { font-size: var(--fs-xl) !important; }
	html body:has(.cmb-art__head) .entry-content h2 { font-size: var(--fs-lg) !important; }
}

/* tool pages: the restored tool-page style (cmb-bilingual) uses 11/14/19/22/25/26/27px and weight 650 — bring onto the scale */
html body .cmb-approved-tool, html body .cmb-approved-tool .cmb-tool-profile, html body .cmb-approved-tool .tp-feature p,
html body .cmb-approved-tool .rose-practical p:last-child, html body .cmb-approved-tool .juguang-detail-list li,
html body .cmb-approved-tool .cmb-tp__desc { font-size: var(--fs-base) !important; }
html body .cmb-approved-tool .cmb-tp__name, html body .cmb-approved-tool.cmb-copy-en .cmb-tp__name { font-size: var(--fs-2xl) !important; }
html body .cmb-approved-tool .cmb-tp__name span { font-size: var(--fs-xl) !important; font-weight: 400; }
html body .cmb-approved-tool h2, html body .cmb-approved-tool.cmb-copy-en h2 { font-size: var(--fs-lg) !important; }
html body .cmb-approved-tool h3, html body .cmb-approved-tool.cmb-copy-en h3 { font-size: var(--fs-base) !important; font-weight: 700 !important; }
html body .cmb-approved-tool .tp-kicker, html body .cmb-approved-tool .cmb-tp__cat { font-weight: 600 !important; }
html body .cmb-approved-tool .rose-practical .tp-label { font-weight: 600; }
html body .cmb-approved-tool .rose-step-number { font-size: var(--fs-sm); font-weight: 600; }
html body .cmb-approved-tool table, html body .cmb-approved-tool th, html body .cmb-approved-tool td { font-size: var(--fs-sm) !important; }
html body .cmb-approved-tool th { font-weight: 600 !important; }
html body .cmb-approved-tool .cmb-gitem small { font-size: var(--fs-xs); }
@media (max-width: 760px) {
	html body .cmb-approved-tool .cmb-tp__name, html body .cmb-approved-tool.cmb-copy-en .cmb-tp__name { font-size: var(--fs-xl) !important; }
	html body .cmb-approved-tool .cmb-tp__name span { font-size: var(--fs-lg) !important; }
}

/* misc strays */
html body .c2-db__meta, html body .c2-db__upd, html body .c2-db__kpi .l, html body .c2-db__kpi .d, html body .c2-db__sub, html body .c2-db__note, html body .c2-db__rank li small { font-size: var(--fs-xs); }
/* <b>/<strong> inside bold text would compute to 900 ('bolder'); cap at the top weight */
b, strong { font-weight: 700; }
small { font-size: var(--fs-xs); }

/* tables: never split a date or a number across lines (body uses overflow-wrap:anywhere for long Korean words) */
td, th { overflow-wrap: break-word; }
.c2-tbl--cal td:first-child { white-space: nowrap; }
@media (max-width: 760px) {
	.c2-tbl--cal thead { display: none; }
	.c2-tbl--cal tr { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 10px; border-bottom: 1px solid var(--c2-line); padding: 10px 0; }
	.c2-tbl--cal td { border: 0; padding: 0; width: auto !important; }
	.c2-tbl--cal td:nth-child(3) { grid-column: 2; margin-top: 2px; }
	.c3-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
.cmb-prose .wp-block-table td, .cmb-prose .wp-block-table th, .c2-tbl td, .c2-tbl th { word-break: keep-all; }

/* English articles: the Site Editor CSS sets 14px on the contents toggle and on mobile tables */
html[lang^="en"] body .cmb-toc-details summary { font-size: var(--fs-sm); }
@media (max-width: 760px) {
	html[lang^="en"] body .cmb-prose .wp-block-table table { font-size: var(--fs-sm) !important; }
}
