/* Mirror chrome: language switch, Chinese typography, preview notice. */
:root {
  --tph-navy: #17224d;
  --tph-gold: #f2b71c;
}

/* --- top bar: link to the English site --- */
.nav-top-bar .mirror-en-site a {
  white-space: nowrap;
}

/* --- social row: official Xiaohongshu app icon inside the same circle --- */
.social li a img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  vertical-align: -6px;
  display: inline-block;
}
.social li a svg {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  display: inline-block;
}

/* --- icon fonts: tphgr.org serves them without CORS headers, so the browser blocks
       cross-origin use. Same files, served from our origin. --- */
@font-face {
  font-family: "TPH-FontAwesome";
  src: url("/mirror/fonts/fontawesome-webfont.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "TPH-Mindutopia";
  src: url("/mirror/fonts/mindutopia.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "TPH-Slick";
  src: url("/mirror/fonts/slick.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* same family names as the theme, pointing at the local copies, so every
   selector and pseudo-element in their CSS keeps working */
@font-face {
  font-family: "FontAwesome";
  src: url("/mirror/fonts/fontawesome-webfont.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "mindutopia";
  src: url("/mirror/fonts/mindutopia.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "slick";
  src: url("/mirror/fonts/slick.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
.fa,
[class^="fa-"],
[class*=" fa-"] {
  font-family: "TPH-FontAwesome" !important;
}
i[class^="icon-"],
i[class*=" icon-"],
span[class^="icon-"],
span[class*=" icon-"] {
  font-family: "TPH-Mindutopia" !important;
}
.slick-prev:before,
.slick-next:before {
  font-family: "TPH-Slick" !important;
}

/* the theme sets these families directly in a few pseudo-elements */
#resources-heading::before,
#resources-heading::after,
#newsletters .nl-toggle::before,
#newsletters .nl-toggle.collapsed::before,
.offcanvas-menu > div ul li.dropdown > a:after {
  font-family: "TPH-FontAwesome" !important;
}
[data-icon]:before,
.icon-mindutopia-logo:before {
  font-family: "TPH-Mindutopia" !important;
}

/* --- Chinese typography: keep their sizes, fix the glyph fallback --- */
body :not(i):not(svg):not(path):not([class*="fa-"]):not([class*="icon-"]):not(.fl-icon):not(.et-pb-icon) {
  font-family: "Avenir Next W01", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif !important;
}
main p,
main li,
main blockquote {
  line-height: 1.8 !important;
  word-break: normal;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
}

/* --- hide leftover popup / sms widgets from the source site --- */
.pum-overlay,
.pum,
[id^="pum-"],
.popmake,
.wpsms-popup {
  display: none !important;
}

