/* Simplicity - cross-device headline typography, v5.
   Fonts are loaded by the <link> elements in each CJK page's <head>.
   Keep the existing layout, wording, colors and motion rules in style.css.
   Load both sides of a mixed heading, rather than relying on device fonts.
*/

/* Keep ordinary Chinese body copy on the original local UI font stack.
   The new Noto Sans web font is intentionally limited to the two big titles. */
body.lang-zh {
  font-family: Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.lang-zh .headline h1,
.lang-zh .closing > p {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.lang-zh .headline h1 .serif,
.lang-zh .closing > p span {
  font-family: "Noto Serif TC", "Songti TC", serif;
}

/* Match the actual Japanese page class (lang-ja).
   Also accept lang-jp for older copies of the site. */
.lang-ja .headline h1,
.lang-ja .closing > p,
.lang-jp .headline h1,
.lang-jp .closing > p {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

.lang-ja .headline h1 .serif,
.lang-ja .closing > p span,
.lang-jp .headline h1 .serif,
.lang-jp .closing > p span {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.lang-zh .headline h1,
.lang-zh .closing > p,
.lang-ja .headline h1,
.lang-ja .closing > p,
.lang-jp .headline h1,
.lang-jp .closing > p {
  font-weight: 500;
  font-style: normal;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Remove old Songti/system-font-specific offsets.
   Both fonts now share the same font size, weight and line baseline.
   Target only the inner accent spans: parent entrance/scroll animations
   are left intact, and no content is hidden while fonts load. */
.lang-zh .headline h1 .serif,
.lang-zh .closing > p span,
.lang-ja .headline h1 .serif,
.lang-ja .closing > p span,
.lang-jp .headline h1 .serif,
.lang-jp .closing > p span {
  display: inline;
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  margin: 0;
  font-size: 1em;
  font-weight: 500;
  font-style: normal;
  line-height: inherit;
  vertical-align: baseline;
}
