/* Shared typography for pdbear-hub. Load LAST on every in-scope page
   (not marble). Only type: weights, tracking, leading, system font stack.
   Do not put layout, color, or pricing rules here. */

:root {
  --type-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--type-sans);
  font-weight: 400;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-weight: 600;
}

h1 {
  letter-spacing: -.02em;
  line-height: 1.2;
}

/* Wordmarks in the shared footer (text next to the icon). */
footer.pdbf a.pdbf-brand,
.pdbf a.pdbf-brand {
  font-weight: 600;
}

header.top .lang b,
header.top .lang [aria-current="page"] {
  font-weight: 600;
}

.doc h1 {
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.doc .lead {
  font-weight: 600;
}

/* Homepage hero and cards (same values as the earlier home-type.css). */
.hero h1 {
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.hero .lede {
  font-weight: 400;
  line-height: 1.5;
}
#tools .card h3,
#apify .card h3,
section.dev .card h3 {
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.35;
}
#tools .card p,
#apify .card p,
section.dev .card p {
  font-weight: 400;
  line-height: 1.5;
}
@media (min-width: 901px) {
  .hero h1 { line-height: 1.12; }
  .hero .lede { line-height: 1.45; }
  #tools .card p { line-height: 1.45; }
}

/* Tool result figures and plan prices: lighten, keep size. */
.big,
.price,
.sbar-v,
.upsell .tier .price {
  font-weight: 600;
}

/* Chinese: Medium, no negative tracking, looser leading.
   500 rather than 600 so two-weight fonts (Microsoft YaHei) stay near Regular
   instead of snapping to Bold. font-synthesis: none avoids faux-bold. */
html:lang(zh) body,
html:lang(zh-CN) body,
html:lang(zh-Hans) body {
  line-height: 1.7;
  font-synthesis: none;
}

:lang(zh) h1,
:lang(zh) h2,
:lang(zh) h3,
:lang(zh) h4 {
  font-weight: 500;
  letter-spacing: 0;
}
:lang(zh) h1 {
  line-height: 1.25;
}
:lang(zh) h2,
:lang(zh) h3 {
  line-height: 1.35;
}

:lang(zh) .lede,
:lang(zh) .sub,
:lang(zh) .hero .lede {
  letter-spacing: 0;
  line-height: 1.7;
}

:lang(zh) .doc h1 {
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
}

:lang(zh) footer.pdbf a.pdbf-brand,
:lang(zh) .pdbf a.pdbf-brand,
:lang(zh) .logo {
  font-weight: 600;
  letter-spacing: 0;
}

:lang(zh) .big,
:lang(zh) .price,
:lang(zh) .sbar-v,
:lang(zh) .upsell .tier .price {
  font-weight: 500;
  letter-spacing: 0;
}

:lang(zh) #tools .card h3,
:lang(zh) #apify .card h3,
:lang(zh) section.dev .card h3 {
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
}
:lang(zh) #tools .card p,
:lang(zh) #apify .card p,
:lang(zh) section.dev .card p {
  letter-spacing: 0;
  line-height: 1.65;
}
@media (min-width: 901px) {
  :lang(zh) .hero h1 { line-height: 1.22; }
  :lang(zh) .hero .lede { line-height: 1.6; }
  :lang(zh) #tools .card p {
    font-size: 13.5px;
    line-height: 1.55;
  }
}
@media (max-width: 640px) {
  :lang(zh) .hero h1 { line-height: 1.28; }
  :lang(zh) .hero .lede { line-height: 1.7; }
}

/* Chinese passages on English legal pages. */
[lang="zh"],
[lang="zh-CN"],
[lang="zh-Hans"] {
  letter-spacing: 0;
  font-synthesis: none;
}

/* Tax English headings stay Georgia; only Chinese titles use the sans stack. */
:lang(zh) h1,
:lang(zh) h2 {
  font-family: var(--type-sans);
}

/* Clues is a tightly fitted game UI. Keep the game type scale so tiles,
   keys, and boards do not shift. Only add CJK fallbacks and lighten
   instructional sheet titles. */
body:has(> .shell) {
  font: 16px/24px -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
}
html:lang(zh) body:has(> .shell),
html:lang(zh-CN) body:has(> .shell) {
  line-height: 24px;
  font-synthesis: none;
}
/* Instructional sheet titles only; tiles, keys, answer words stay in game.css. */
body:has(> .shell) .sheet h2 {
  font-weight: 600;
}
:lang(zh) body:has(> .shell) .sheet h2 {
  font-weight: 500;
  letter-spacing: 0;
}
