:root { --header-inset: 0px; }
/* Compact v8io navigation, independent of the FDE capsule header. */
:root, html.v8io-content-page { --nav: 76px; }
#v8io-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 80;
  height: var(--nav, 104px); padding-top: var(--header-inset); border: 0;
  border-radius: 0; background: #000; color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5;
}
#v8io-header *, #v8io-header *::before, #v8io-header *::after { box-sizing: border-box; }
#v8io-header > .wrap {
  display: flex; align-items: center; justify-content: flex-start; gap: 40px;
  width: calc(100% - 96px); max-width: 1168px; height: 100%; margin: 0 auto;
  padding: 0;
}
#v8io-header .brand {
  display: inline-flex; flex: none; align-items: center; gap: 10px;
  margin: 0; padding: 0; min-height: 44px; border: 0; border-radius: 0;
  background: none; box-shadow: none; transform: none; color: #FAFAFA;
  font-size: 18px; font-weight: 600; line-height: 18px; letter-spacing: .04em;
  white-space: nowrap; text-decoration: none;
}
#v8io-header .brand img { display: block; flex: none; width: 34px; height: 40px; object-fit: contain; }
#v8io-header .brand-name { display: flex; flex-direction: column; gap: 5px; font: inherit; letter-spacing: inherit; color: inherit; background: none; -webkit-text-fill-color: currentColor; }
#v8io-header .brand-name small { font: 400 10px/10px Inter, "PingFang SC", system-ui, sans-serif; letter-spacing: .12em; color: #b8b8b8; }
#v8io-header .menu { display: flex; align-items: center; gap: 28px; margin: 0 auto 0 0; padding: 0; border: 0; background: none; }
#v8io-header .menu a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  color: #bcbcbc; font-size: 14px; font-weight: 500; line-height: 20px;
  white-space: nowrap; text-decoration: none; transition: color 150ms ease;
}
#v8io-header .menu a:hover, #v8io-header .menu a[aria-current="page"] { color: #fff; }
#v8io-header .menu a[aria-current="page"] { box-shadow: inset 0 -1px #9db8d1; }
#v8io-header .nav-right { display: flex; flex: none; align-items: center; gap: 20px; margin-left: auto; }
#v8io-header .language-switch {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; min-height: 36px; padding: 0 15px; border: 1px solid #3a3e44; border-radius: 999px;
  background: transparent; color: #d6d6d6; font-size: 13px; font-weight: 500;
  line-height: 20px; white-space: nowrap; text-decoration: none;
}
#v8io-header .language-switch:hover { color: #fff; border-color: #747c84; background: #14171a; }
#v8io-header .btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  height: 38px; padding: 0 18px; border: 1px solid #fff; border-radius: 8px;
  background: #fff; color: #111; font: 500 14px/20px "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
#v8io-header .btn:hover { background: #000; color: #fff; }
#v8io-header :focus-visible { outline: 2px solid #9db8d1; outline-offset: 4px; }
html.v8io-content-page { --nav: 76px; scroll-padding-top: calc(var(--nav) + 16px); }
.v8io-content-page #v8io-header { position: fixed; top: 0; left: 0; right: 0; padding-top: calc(var(--header-inset) + env(safe-area-inset-top, 0px)); height: calc(var(--nav) + env(safe-area-inset-top, 0px)); }
.v8io-content-page body { padding-top: calc(var(--nav) + env(safe-area-inset-top, 0px)); }
@media (min-width: 1580px) { #v8io-header > .wrap { max-width: 1300px; } }
@media (min-width: 1880px) { #v8io-header > .wrap { max-width: 1440px; } }
@media (min-width: 1101px) and (max-width: 1150px) { :root, html.v8io-content-page { --nav: 72px; } }
@media (min-width: 901px) and (max-height: 820px) { :root, html.v8io-content-page { --nav: 68px; } }
@media (min-width: 861px) and (max-width: 1100px) { :root, html.v8io-content-page { --nav: 72px; } }
@media (min-width: 861px) and (max-width: 1150px) { #v8io-header > .wrap { width: calc(100% - 64px); gap: 28px; } }
/* A second, always-visible row keeps every destination reachable on phones. */
@media (max-width: 860px) {
  :root { --nav: 100px; }
  html.v8io-content-page { --nav: 100px; }
  #v8io-header > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 56px 44px; width: 100%; column-gap: 8px; row-gap: 0; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
  #v8io-header .brand { grid-column: 1; grid-row: 1; gap: 10px; font-size: 18px; }
  #v8io-header .nav-right { grid-column: 2; grid-row: 1; gap: 8px; }
  #v8io-header .language-switch { height: 32px; min-height: 32px; padding-inline: 12px; font-size: 12.5px; }
  #v8io-header .btn { height: 38px; padding-inline: 12px; font-size: 14px; }
  #v8io-header .menu { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; width: 100%; height: 44px; border-top: 1px solid #202226; }
  #v8io-header .menu a { justify-content: center; min-height: 43px; font-size: 14px; }
}
@media (max-width: 359px) {
  #v8io-header > .wrap { padding-inline: 12px; }
  #v8io-header .brand { font-size: 18px; gap: 10px; }
  #v8io-header .nav-right { gap: 6px; }
  #v8io-header .btn { padding-inline: 9px; font-size: 14px; }
  #v8io-header .language-switch { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { #v8io-header a, #v8io-header .btn { transition: none; } }

/* Imported reading pages keep the main site's company identity. */
.v8io-content-page .site-footer .footer-brand { color: #f1f3f5; background: none; -webkit-text-fill-color: currentColor; font-weight: 500; letter-spacing: 0; }
.v8io-content-page .site-footer .footer-watermark { font-size: clamp(80px, 10vw, 144px); letter-spacing: -.04em; }

@media(max-width:860px){:root{--header-inset:0px}}

/* Match FDE's 1.33x ultrawide header scale; the animation still receives its physical height. */
@media(min-width:2400px){
 :root,html.v8io-content-page{--nav:101.08px;--header-inset:0px}
 #v8io-header>.wrap{zoom:1.33;height:100%}
}
@media(min-width:2400px) and (max-height:820px){:root,html.v8io-content-page{--nav:90.44px}}

@media(min-width:761px) and (max-width:860px){#v8io-header .language-switch{height:36px;min-height:36px;font-size:13px;padding-inline:15px}}

/* Reading pages already inherit FDE's document zoom; avoid scaling their header twice. */
@media(min-width:2400px){
 html.v8io-content-page{--nav:76px;--header-inset:0px}
 .v8io-content-page #v8io-header>.wrap{zoom:1}
}
@media(min-width:2400px) and (max-height:820px){html.v8io-content-page{--nav:68px}}
