/* =====================================================================
   Shared header and footer away from the home view.
   The header and footer are the new home design's own (.nh, styled by
   styles/home/ — see lib/scope-css.js). On the home view they inherit text
   settings from the design's <body>; on detail views and research pages
   <body> keeps the legacy styles, so their roots get the design's values here.
   This file is not scoped at build time: every rule names where it applies.
   ===================================================================== */
:where(html:not(.nh-home)) :where(.header.nh, .footer.nh, .skip-link.nh) {
  color: var(--ink);
  font: 500 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
/* The phone menu covers the page; the page behind it does not scroll. */
:where(html:not(.nh-home)) body.menu-open {
  overflow: hidden;
}

/* The ICP filing number under the footer copyright (shown on every page). */
.footer.nh .foot-icp {
  color: inherit;
  text-decoration: none;
}
.footer.nh .foot-icp:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

/* Detail views close with their own 「从租用智能，走向拥有智能。」; the footer's night
   mountains rise behind its button exactly where the page's own mountains used to. */
:where(html:not(.nh-home)) body.v22-detail-active > .footer.nh {
  margin-top: -40px;
}
@media (max-width: 760px) {
  :where(html:not(.nh-home)) body.v22-detail-active > .footer.nh {
    margin-top: -16px;
  }
}
/* Research pages: the mountains rise after the article. */
:where(html:not(.nh-home)) body.research-page > .footer.nh {
  margin-top: 0;
}

/* The footer's night blue is the page's last pixel row, and the area behind a bounce at the
   bottom is dark, exactly as on the home view (design rules for <html> / <body> reach only
   html.nh-home). Longhands with !important: the legacy shorthand
   `body.light.v22-home:not(.v22-dark).v22-detail-active{background:none #fff}` outranks this
   selector and would clear the image. overscroll.js toggles the class on <html>. */
:where(html:not(.nh-home)) body {
  background-image: linear-gradient(#0e1a2e, #0e1a2e) !important;
  background-position: 0 100% !important;
  background-size: 100% 4px !important;
  background-repeat: no-repeat !important;
}
:where(html:not(.nh-home)).overscroll-dark {
  background: #0e1a2e;
}
