/*
 * The dev-only test content languages, en-XA and en-XB
 * (@synapdeck/card-rendering/lib/testContentLanguages). The root route links
 * this sheet only when `isDevBuild`.
 *
 * Mirrors the `lang-fonts` utility's shape as plain unlayered selectors, since
 * a Tailwind utility cannot be extended from a second file. No unicode-range,
 * so the test face claims every glyph it has; font-display: block, because a
 * swap first paints the base face, which looks exactly like a lost tag.
 */
@font-face {
  font-family: "Yuji Mai";
  src: url("/assets/YujiMai-Regular-DcI71n2K.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "UnifrakturMaguntia";
  src: url("/assets/UnifrakturMaguntia-Book-DZNSaDU6.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

.lang-fonts:lang(en-XA),
.lang-fonts [lang]:lang(en-XA) {
  font-family: "Yuji Mai", var(--lang-fonts-base, var(--font-sans));
}

.lang-fonts:lang(en-XB),
.lang-fonts [lang]:lang(en-XB) {
  font-family: "UnifrakturMaguntia", var(--lang-fonts-base, var(--font-sans));
}

/*
 * Inside a test-tagged container, an inner run in a language with no
 * `lang-fonts` rule of its own (en, fr, ar, …) would inherit the test face —
 * a correctly applied inner tag that looks lost. Reset such runs to the base
 * stack. In `base`, below `utilities`, so the utility's real-language rules
 * (ja, ur, …) and an element's own face utilities still win; the test-tag
 * rules above are unlayered and win over both.
 */
@layer base {
  .lang-fonts:is(:lang(en-XA), :lang(en-XB)) [lang]:not(:lang(en-XA), :lang(en-XB)),
  .lang-fonts :is(:lang(en-XA), :lang(en-XB)) [lang]:not(:lang(en-XA), :lang(en-XB)) {
    font-family: var(--lang-fonts-base, var(--font-sans));
  }
}
