/* Yugami typography v1.3.0: font families only; preserves Wave layout and sizing.
 * EN editorial: Libre Caslon Text. JA body: Kaisei Opti.
 * EN headings: Libre Caslon Text. JA headings: Kaisei Tokumin.
 * Controls, technical metadata and interface labels: LINE Seed JP.
 * Japanese glyphs automatically fall through because Libre Caslon Text is Latin-oriented.
 */
:root {
  --yugami-editorial-font: "Libre Caslon Text", "Kaisei Opti", Georgia, "Yu Mincho", serif;
  --yugami-heading-font: "Libre Caslon Text", "Kaisei Tokumin", Georgia, "Yu Mincho", serif;
  --yugami-interface-font: "LINE Seed JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --yugami-japanese-body-font: "Kaisei Opti", "Libre Caslon Text", serif;
  --yugami-japanese-title-font: "Kaisei Tokumin", "Libre Caslon Text", serif;
  /* Supply Wave's own default font tokens too, without editing its CSS. */
  --font-sans: var(--yugami-interface-font);
  --font-serif: var(--yugami-editorial-font);
}

/* Wave's general UI uses sans-serif; preserve that hierarchy with a new family. */
body,
.gh-head,
.gh-foot,
.gh-head-menu,
.gh-head-actions,
.subscribe,
.post-meta,
.post-footer,
.gh-content .kg-caption,
.gh-content figcaption,
.gh-content :is(table, th, td),
.gh-content .kg-bookmark-card,
.gh-content .kg-button-card,
.gh-content .kg-toggle-card .kg-toggle-heading,
.yugami-technical {
  font-family: var(--yugami-interface-font);
}

/* Editorial reading text and article summaries. */
.site-content .gh-content,
.site-content .gh-content :is(p, li, blockquote),
.site-content .post-excerpt,
.site-cover .cover-description,
.yugami-editorial {
  font-family: var(--yugami-editorial-font);
}

/* All editorial headings, episode titles and series titles. */
.site-content .post-title,
.site-content .gh-content :is(h1, h2, h3, h4, h5, h6),
.site-content :is(.author-name, .term-title, .site-title),
.site-cover :is(.cover-title, .cover-heading),
.yugami-heading {
  font-family: var(--yugami-heading-font);
}

/* Opt-in for fully Japanese blocks, when language markup is available. */
.site-content .gh-content :lang(ja) {
  font-family: var(--yugami-japanese-body-font);
}
.site-content .gh-content :is(h1, h2, h3, h4, h5, h6):lang(ja),
.site-content .post-title:lang(ja) {
  font-family: var(--yugami-japanese-title-font);
}

/* Keep code aligned: true monospace is necessary for source and shell transcripts.
 * Surrounding technical headings, captions, tags and labels use LINE Seed JP. */
.site-content .gh-content :is(code, pre, kbd, samp),
.site-content .gh-content pre * {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Match Wave's explicit 'Elegant serif' preference selectors; otherwise Lora
 * could win over the requested Yugami font even though this stylesheet loads later. */
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .post-title {
  font-family: var(--yugami-heading-font);
}
.has-serif-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .post-excerpt {
  font-family: var(--yugami-editorial-font);
}
