/* News readability styles for Foxiz child.
 * Scope: single post pages only.
 */

:root {
  --gl-news-text: #263547;
  --gl-news-title: #1a2433;
  --gl-news-muted: #6a7b92;
  --gl-news-line: #dbe4ef;
  --gl-news-soft: #f7fafd;
  --gl-news-accent: #d43845;
  --gl-latin-clean-color: #171717;
  --gl-latin-clean-family: "Droid Serif", Georgia, Cambria, "Times New Roman", Times, serif;
  --gl-latin-clean-line: 1.5;
  --gl-latin-clean-gap: 25px;
  --gl-latin-clean-measure: 700px;
}

body.single-post .entry-content {
  color: var(--gl-news-text);
  font-size: 24px;
  line-height: 2.05;
  letter-spacing: 0.05px;
}

body.single-post .entry-content .content-paragraph,
body.single-post .entry-content p {
  color: var(--gl-news-text);
  font-size: 24px;
  line-height: 2.05;
  text-indent: 0;
  margin: 0 0 18px;
}

body.single-post .entry-content .article-dek {
  margin: 0 0 1.1em;
  color: #2f4966;
  font-size: clamp(24px, 1.65vw, 30px);
  line-height: 1.82;
}

body.single-post .entry-content .keypoints {
  margin: 1.35em 0 1.65em;
  border: 1px solid #cfdbe9;
  border-radius: 14px;
  background: #f5f9fc;
  overflow: hidden;
}

body.single-post .entry-content .keypoints-title {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  font-size: clamp(30px, 2.05vw, 36px);
  line-height: 1.3;
  font-weight: 900;
  border-left: 5px solid #0f8f84;
  background: #eaf4f3;
}

body.single-post .entry-content .keypoints-list {
  margin: 0;
  padding: 14px 20px 14px 34px;
}

body.single-post .entry-content .keypoints-item {
  margin: 0 0 8px;
  color: #29405c;
  font-size: clamp(18px, 1.15vw, 23px);
  line-height: 1.76;
}

body.single-post .entry-content .keypoints-item:last-child {
  margin-bottom: 0;
}

body.single-post .entry-content .section-title,
body.single-post .entry-content h2.section-title,
body.single-post .entry-content h2 {
  color: var(--gl-news-title);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: 32px;
  line-height: 1.32;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dce7f2;
  font-weight: 700 !important;
  letter-spacing: -0.2px;
}

body.single-post .entry-content h3 {
  color: #202e43;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: 25px;
  line-height: 1.4;
  margin: 30px 0 14px;
  font-weight: 700 !important;
}

body.single-post .entry-content .content-blockquote,
body.single-post .entry-content blockquote {
  margin: 1.4em 0;
  padding: 0.8em 1em;
  border-left: 4px solid var(--gl-news-accent);
  border-radius: 10px;
  background: #fff5f6;
  color: #6f2630;
  font-size: clamp(18px, 1.15vw, 22px);
  line-height: 1.85;
}

body.single-post .entry-content .fact-grid {
  margin: 1.4em 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.single-post .entry-content .fact-item {
  border: 1px solid var(--gl-news-line);
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
}

body.single-post .entry-content .fact-value {
  font-size: clamp(20px, 1.4vw, 26px);
  line-height: 1.2;
  font-weight: 900;
  color: #9a1d2a;
}

body.single-post .entry-content .fact-label {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gl-news-muted);
}

body.single-post .entry-content .gl-poll {
  margin-top: 1.8em;
  border: 1px solid var(--gl-news-line);
  border-radius: 12px;
  background: var(--gl-news-soft);
  padding: 14px 16px;
}

body.single-post .entry-content .gl-poll-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 1.55vw, 27px);
  line-height: 1.45;
  font-weight: 900;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.single-post .entry-content .gl-poll-icon {
  color: #cb2f3d;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

body.single-post .entry-content .gl-poll-options {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.single-post .entry-content .gl-poll-option {
  font-size: clamp(16px, 1.05vw, 19px);
  line-height: 1.65;
  margin: 0 0 8px;
  border: 1px solid #d0dceb;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

body.single-post .entry-content .gl-poll-option:last-child {
  margin-bottom: 0;
}

/* Common TOC plugins/wrappers */
body.single-post .entry-content .ez-toc-container,
body.single-post .entry-content .rb-toc-wrap,
body.single-post .entry-content .rb-toc,
body.single-post .entry-content .table-of-contents,
body.single-post .entry-content .toc {
  margin: 1.4em 0;
  padding: 14px 16px;
  border: 1px solid var(--gl-news-line);
  border-radius: 12px;
  background: #f8fbff;
}

body.single-post .entry-content .ez-toc-title,
body.single-post .entry-content .rb-toc-title,
body.single-post .entry-content .table-of-contents-title {
  margin: 0 0 8px;
  font-size: clamp(23px, 1.5vw, 28px);
  line-height: 1.3;
  font-weight: 900;
}

body.single-post .entry-content .ez-toc-list a,
body.single-post .entry-content .rb-toc a,
body.single-post .entry-content .table-of-contents a,
body.single-post .entry-content .toc a {
  color: #24364d;
  font-size: clamp(16px, 1.02vw, 19px);
  line-height: 1.65;
}

/* TOC number badge tuning: make index blocks compact like prototype */
body.single-post .entry-content .toc-content a:before,
body.single-post .entry-content .table-link:before,
body.single-post .entry-content .table-link-depth:before,
body.single-post .entry-content ul.toc-content li > a:before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 1.22em !important;
  height: 1.2em !important;
  padding: 0 0.2em !important;
  margin-right: 5px !important;
  border-radius: 3px !important;
  font-size: 0.68em !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

body.single-post .entry-content .ez-toc-list .ez-toc-section-number,
body.single-post .entry-content .ez-toc-list .ez-toc-counter,
body.single-post .entry-content .rb-toc .rb-toc-number,
body.single-post .entry-content .rb-toc .toc-number,
body.single-post .entry-content .table-of-contents .toc-number {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 1.22em !important;
  height: 1.2em !important;
  padding: 0 0.2em !important;
  margin-right: 5px !important;
  border-radius: 3px !important;
  background: #141c29;
  color: #fff !important;
  font-size: 0.68em !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

/* Language font mapping (simplified) */
body.single-post .entry-content :is(.content-paragraph, p, li, blockquote, .gl-poll-option, .article-dek, .news-intro):is(.gl-font-zh-cn, .gl-font-zh-tw, .gl-font-zh-hant, .gl-font-zh-hk, .gl-font-zh-mo) {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-weight: 500;
}

body.single-post .entry-content :is(.content-paragraph, p, .article-dek, .news-intro):is(.gl-font-zh-cn, .gl-font-zh-tw, .gl-font-zh-hant, .gl-font-zh-hk, .gl-font-zh-mo) {
  text-indent: 2em;
}

body.single-post .entry-content :is(.article-dek, .news-intro):is(.gl-font-zh-cn, .gl-font-zh-tw, .gl-font-zh-hant, .gl-font-zh-hk, .gl-font-zh-mo) {
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 18px;
  color: var(--gl-news-text);
}

body.single-post .entry-content :is(.section-title, h2, h3, .keypoints-title, .fact-item):is(.gl-font-zh-cn, .gl-font-zh-tw, .gl-font-zh-hant, .gl-font-zh-hk, .gl-font-zh-mo) {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

body.single-post .entry-content :is([class*="gl-font-en"], [class*="gl-font-es"], [class*="gl-font-fr"], [class*="gl-font-de"]) {
  color: var(--gl-latin-clean-color);
  font-family: var(--gl-latin-clean-family);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.single-post .entry-content :is(.content-paragraph, p, li, blockquote, .gl-poll-option, .article-dek):is([class*="gl-font-en"], [class*="gl-font-es"], [class*="gl-font-fr"], [class*="gl-font-de"]) {
  line-height: var(--gl-latin-clean-line);
  font-weight: 400;
}

body.single-post .entry-content :is(.content-paragraph, p, .news-intro, .article-dek):is([class*="gl-font-en"], [class*="gl-font-es"], [class*="gl-font-fr"], [class*="gl-font-de"]) {
  text-indent: 0;
  margin-bottom: var(--gl-latin-clean-gap);
  line-height: var(--gl-latin-clean-line);
  hyphens: none;
  color: var(--gl-latin-clean-color);
  -webkit-font-smoothing: antialiased;
}

body.single-post .entry-content :is(.section-title, h2, h3, .keypoints-title, .fact-item):is([class*="gl-font-en"], [class*="gl-font-es"], [class*="gl-font-fr"], [class*="gl-font-de"]) {
  color: var(--gl-latin-clean-color);
  font-family: var(--gl-latin-clean-family) !important;
  line-height: var(--gl-latin-clean-line);
  letter-spacing: 0;
  font-weight: 700 !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.single-post .entry-content :is(.section-title, h2):is([class*="gl-font-en"], [class*="gl-font-es"], [class*="gl-font-fr"], [class*="gl-font-de"]) {
  border-bottom: 0;
  padding-bottom: 0;
  margin: 40px 0 16px;
}

body.single-post .entry-content .gl-font-pt-br {
  font-family: "Source Serif 4", "Merriweather", "Georgia", "Times New Roman", serif;
  font-weight: 400;
}

body.single-post .entry-content .gl-font-ja-jp {
  font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 400;
}

body.single-post .entry-content :is(.section-title, h2, h3, .keypoints-title, .fact-item).gl-font-ja-jp {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

body.single-post .entry-content .gl-font-ko-kr {
  font-family: "Noto Serif KR", "Batang", "Apple SD Gothic Neo", serif;
  font-weight: 400;
}

body.single-post .entry-content :is(.section-title, h2, h3, .keypoints-title, .fact-item).gl-font-ko-kr {
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

body.single-post .entry-content :is(.gl-font-ar, .gl-font-he-il) {
  direction: rtl;
  text-align: right;
  text-indent: 0;
  margin-bottom: 1.1em;
  line-height: 1.9;
}

/* Main article title in Foxiz single post */
body.single-post .entry-header .entry-title,
body.single-post .single-header .entry-title,
body.single-post .post-header .entry-title,
body.single-post h1.entry-title,
body.single-post .single-header .s-title,
body.single-post h1.s-title {
  color: #0f172a !important;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: clamp(34px, 4.8vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.5px;
  font-weight: 900 !important;
}

html[lang^="zh"] body.single-post .entry-content :is(p, li):not([class*="gl-font-"]),
body.single-post[class*="lang-zh"] .entry-content :is(p, li):not([class*="gl-font-"]) {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  text-indent: 2em;
  font-weight: 500;
}

html[lang^="zh"] body.single-post .entry-content :is(.article-dek, .news-intro):not([class*="gl-font-"]),
body.single-post[class*="lang-zh"] .entry-content :is(.article-dek, .news-intro):not([class*="gl-font-"]) {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  text-indent: 2em;
  font-weight: 500;
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 18px;
  color: var(--gl-news-text);
}

html[lang^="zh"] body.single-post .entry-content :is(h2, h3):not([class*="gl-font-"]),
body.single-post[class*="lang-zh"] .entry-content :is(h2, h3):not([class*="gl-font-"]),
html[lang^="zh"] body.single-post :is(.entry-header .entry-title, .single-header .s-title),
body.single-post[class*="lang-zh"] :is(.entry-header .entry-title, .single-header .s-title) {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

html:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) body.single-post .entry-content :is(p, li):not([class*="gl-font-"]),
body.single-post:is([class*="lang-en"], [class*="lang-es"], [class*="lang-fr"], [class*="lang-de"]) .entry-content :is(p, li):not([class*="gl-font-"]),
body.single-post .entry-content :is(p, li)[lang]:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) {
  font-family: var(--gl-latin-clean-family);
  color: var(--gl-latin-clean-color);
  text-indent: 0;
  margin-bottom: var(--gl-latin-clean-gap);
  line-height: var(--gl-latin-clean-line);
  hyphens: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) body.single-post .entry-content,
body.single-post:is([class*="lang-en"], [class*="lang-es"], [class*="lang-fr"], [class*="lang-de"]) .entry-content,
body.single-post .entry-content[lang]:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) {
  max-width: var(--gl-latin-clean-measure);
  margin-left: auto;
  margin-right: auto;
}

html:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) body.single-post .entry-content :is(h2, h3):not([class*="gl-font-"]),
body.single-post:is([class*="lang-en"], [class*="lang-es"], [class*="lang-fr"], [class*="lang-de"]) .entry-content :is(h2, h3):not([class*="gl-font-"]),
body.single-post .entry-content :is(h2, h3)[lang]:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) {
  color: var(--gl-latin-clean-color);
  font-family: var(--gl-latin-clean-family) !important;
  line-height: var(--gl-latin-clean-line);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) body.single-post .entry-content h2:not([class*="gl-font-"]),
body.single-post:is([class*="lang-en"], [class*="lang-es"], [class*="lang-fr"], [class*="lang-de"]) .entry-content h2:not([class*="gl-font-"]),
body.single-post .entry-content h2[lang]:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) {
  border-bottom: 0;
  padding-bottom: 0;
  margin: 40px 0 16px;
}

html:is([lang^="en"], [lang^="es"], [lang^="fr"], [lang^="de"]) body.single-post :is(.entry-header .entry-title, .single-header .s-title),
body.single-post:is([class*="lang-en"], [class*="lang-es"], [class*="lang-fr"], [class*="lang-de"]) :is(.entry-header .entry-title, .single-header .s-title) {
  color: var(--gl-latin-clean-color) !important;
  font-family: var(--gl-latin-clean-family) !important;
  letter-spacing: 0;
  line-height: 1.25;
  font-weight: 700 !important;
}

@media (max-width: 980px) {
  body.single-post .entry-content {
    font-size: 22px;
    line-height: 1.95;
  }

  body.single-post .entry-content .content-paragraph,
  body.single-post .entry-content p {
    font-size: 22px;
    line-height: 1.95;
  }

  body.single-post .entry-content .section-title,
  body.single-post .entry-content h2.section-title,
  body.single-post .entry-content h2 {
    font-size: 30px;
    line-height: 1.32;
  }

  body.single-post .entry-content h3 {
    font-size: 24px;
    line-height: 1.4;
  }

  body.single-post .entry-content .fact-grid {
    grid-template-columns: 1fr;
  }

  body.single-post .entry-content .article-dek {
    font-size: clamp(21px, 5.6vw, 28px);
    line-height: 1.72;
  }

  body.single-post .entry-content .keypoints-title {
    font-size: clamp(27px, 6.8vw, 34px);
  }
}
