/* OPPO Sans 4.0, the one typeface for the whole site, English and Chinese.
   Free for commercial use, (c) OPPO; licence in /fonts/LICENSE.txt.
   Self-hosted from /fonts/ so it also loads in mainland China.

   Split by unicode-range: the Latin files are ~18 KB each and are all an English
   page downloads. The CJK files are ~3.7 MB each and are only fetched when Chinese
   characters are actually on screen. Only 400, 500 and 700 exist; 300 and 600
   resolve to the nearest of those. */

@font-face {
  font-family: 'OPPO Sans';
  src: url('/fonts/OPPOSans-Regular.latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'OPPO Sans';
  src: url('/fonts/OPPOSans-Medium.latin.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'OPPO Sans';
  src: url('/fonts/OPPOSans-Bold.latin.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'OPPO Sans';
  src: url('/fonts/OPPOSans-Regular.cjk-common.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF;
}
@font-face {
  font-family: 'OPPO Sans';
  src: url('/fonts/OPPOSans-Medium.cjk-common.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF;
}
@font-face {
  font-family: 'OPPO Sans';
  src: url('/fonts/OPPOSans-Bold.cjk-common.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF;
}

/* Chinese wordmark: in Chinese the name is 亘吉, drawn in STKaiti. The two characters
   are outlined into /brand/genji-zh.svg (the font file itself is never served) and
   painted with the text colour through a mask, so dark mode and gold still apply.
   The English text stays in the DOM for screen readers and search. */
html:lang(zh) .logo b,
html:lang(zh) .snav-logo-name,
html:lang(zh) .pb-auth-brand span {
  width: 3.07em; height: 1.5em; overflow: hidden; white-space: nowrap; letter-spacing: 0;
  vertical-align: middle; -webkit-text-fill-color: transparent;
  background-color: currentColor;
  -webkit-mask: url('/brand/genji-zh.svg') left center / contain no-repeat;
          mask: url('/brand/genji-zh.svg') left center / contain no-repeat;
}
html:lang(zh) .logo b, html:lang(zh) .pb-auth-brand span { display: inline-block; }
html.snav-open:lang(zh) .snav-logo-name { display: inline-block; }
/* Height = the logo mark beside it: landing 30px, side menu 26px, sign-in 22px.
   Width keeps the artwork's 2.047 : 1 ratio. */
html:lang(zh) .logo b          { width: 61px; height: 30px; }
html:lang(zh) .snav-logo-name  { width: 53px; height: 26px; }
html:lang(zh) .pb-auth-brand span { width: 45px; height: 22px; }
