/*
  Article typography overrides (single post only)
  Scope: single post title (.post_container_title h1) + article body (article.wznrys)

  Notes
  - Keeps your theme font-family (no webfont added)
  - Does NOT touch code blocks or blockquotes (you said those are already OK)

  =========================
  Quick tuning knobs
  =========================
  You can safely tweak ONLY these 4 variables to fine-tune sizing and spacing:

  --ay-body-zh        : Chinese body font size (default)
  --ay-body-en        : English body font size
  --ay-ls-zh          : Chinese body letter-spacing (tiny loosen)
  --ay-ls-zh-head     : Chinese heading letter-spacing (tiny loosen)
*/

:root{
  --ay-body-zh: 15px;
  --ay-body-en: 16px;
  --ay-ls-zh: 0.01em;
  --ay-ls-zh-head: 0.005em;
}

/* =========================
   1) Post title (the real H1)
   ========================= */
.single .post_container_title h1{
  font-size: 26px !important;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0;
}

/* Chinese: slightly loosen title spacing (avoid negative tracking on CJK) */
html[lang^="zh"] .single .post_container_title h1{
  letter-spacing: var(--ay-ls-zh-head);
}

@media (min-width: 992px){
  .single .post_container_title h1{
    font-size: 32px !important;
    letter-spacing: -0.015em;
  }
  html[lang^="zh"] .single .post_container_title h1{
    letter-spacing: var(--ay-ls-zh-head);
  }
}

/* =========================
   2) Article body base
   ========================= */
.single .post_container article.wznrys{
  font-size: var(--ay-body-zh);
  line-height: 1.75;
  letter-spacing: 0;
}

/* English body slightly bigger for readability */
html[lang^="en"] .single .post_container article.wznrys{
  font-size: var(--ay-body-en);
}

/* Chinese: tiny loosen for breathing room (keep subtle) */
html[lang^="zh"] .single .post_container article.wznrys{
  font-size: var(--ay-body-zh);
  letter-spacing: var(--ay-ls-zh);
}

/* Keep monospace blocks unchanged (letter-spacing should not inherit) */
.single .post_container article.wznrys pre,
.single .post_container article.wznrys code,
.single .post_container article.wznrys kbd,
.single .post_container article.wznrys samp{
  letter-spacing: 0;
}

/* If the first element inside the article is a heading/paragraph, remove extra top gap */
.single .post_container article.wznrys > :first-child{
  margin-top: 0 !important;
}

/* Paragraphs: neutralize theme padding-bottom and use margin-based rhythm */
.single .post_container article.wznrys p{
  margin: 0 0 0.8em 0;
  padding-bottom: 0 !important;
  line-height: inherit;
}

.single .post_container article.wznrys p:last-child{
  margin-bottom: 0;
}

/* =========================
   3) Headings H1–H6 inside the article content
   ========================= */
.single .post_container article.wznrys h1,
.single .post_container article.wznrys h2,
.single .post_container article.wznrys h3,
.single .post_container article.wznrys h4,
.single .post_container article.wznrys h5,
.single .post_container article.wznrys h6{
  margin: 1.4em 0 0.55em 0;
  line-height: 1.3;
  font-weight: 700;
  color: inherit;
  letter-spacing: 0;
}

/* Chinese: tiny loosen for headings (subtle) */
html[lang^="zh"] .single .post_container article.wznrys h1,
html[lang^="zh"] .single .post_container article.wznrys h2,
html[lang^="zh"] .single .post_container article.wznrys h3,
html[lang^="zh"] .single .post_container article.wznrys h4,
html[lang^="zh"] .single .post_container article.wznrys h5,
html[lang^="zh"] .single .post_container article.wznrys h6{
  letter-spacing: var(--ay-ls-zh-head);
}

/* If you ever have an H1 inside content, keep it below the real post title */
.single .post_container article.wznrys h1{
  font-size: 24px !important;
  margin-top: 1.8em;
  letter-spacing: -0.01em;
}

html[lang^="zh"] .single .post_container article.wznrys h1{
  letter-spacing: var(--ay-ls-zh-head);
}

.single .post_container article.wznrys h2{
  font-size: 22px !important;
  margin-top: 1.6em;
  letter-spacing: -0.01em;
}

html[lang^="zh"] .single .post_container article.wznrys h2{
  letter-spacing: var(--ay-ls-zh-head);
}

.single .post_container article.wznrys h3{
  font-size: 20px !important;
  font-weight: 600;
  margin-top: 1.35em;
}

.single .post_container article.wznrys h4{
  font-size: 18px !important;
  font-weight: 600;
  margin-top: 1.2em;
}

.single .post_container article.wznrys h5{
  font-size: 17px !important;
  font-weight: 600;
  margin-top: 1.1em;
}

.single .post_container article.wznrys h6{
  font-size: 16px !important;
  font-weight: 600;
  margin-top: 1.0em;
}

/* Desktop step-up (keeps hierarchy, avoids decimals) */
@media (min-width: 992px){
  .single .post_container article.wznrys h1{ font-size: 28px !important; }
  .single .post_container article.wznrys h2{ font-size: 26px !important; }
  .single .post_container article.wznrys h3{ font-size: 22px !important; }
  .single .post_container article.wznrys h4{ font-size: 20px !important; }
  .single .post_container article.wznrys h5{ font-size: 18px !important; }
  .single .post_container article.wznrys h6{ font-size: 16px !important; }
}

/* Slightly tighter pairing: heading should visually belong to the paragraph below */
.single .post_container article.wznrys h2 + p,
.single .post_container article.wznrys h3 + p,
.single .post_container article.wznrys h4 + p,
.single .post_container article.wznrys h5 + p,
.single .post_container article.wznrys h6 + p{
  margin-top: 0;
}

/* =========================
   4) Lists: reduce the "text -> list" gap and overall list looseness
   ========================= */
.single .post_container article.wznrys ul,
.single .post_container article.wznrys ol{
  margin: 0.25em 0 0.9em 1.5em;
  padding-left: 0;
}

.single .post_container article.wznrys p + ul,
.single .post_container article.wznrys p + ol{
  margin-top: 0.2em;
}

.single .post_container article.wznrys li{
  margin: 0.35em 0;
  line-height: inherit;
}
