/**
 * Fork launch chip. Matches the header live pill: surface fill, hairline
 * border, Geist type, and the same 38px control height.
 */

/* Never flash upstream sprite marks if SPA injects them */
use[href="#ts-wordmark"],
use[href="#ts-icon"] {
  display: none !important;
}

/* Route loading spinner: hide upstream candlestick paths before/at swap */
svg.ld-mark .ld-c1,
svg.ld-mark .ld-c2,
svg.ld-mark .ld-c3 {
  display: none !important;
}

svg.ld-mark:not([data-fork-brand]) {
  color: var(--muted, #afb5bf);
}

.mobname:not([data-mob-brand]) {
  visibility: hidden;
}

.fork-bsc-launch {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 38px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--border, #1e242b);
  border-radius: 999px;
  background: var(--surface, #0e1114);
  color: var(--text-2, #a6afba);
  font: 500 12.5px/1.2 var(--f-ui, ui-sans-serif, system-ui, sans-serif);
}

body[data-layout="top"] .topbar .fork-bsc-launch {
  flex: 0 1 auto;
  justify-content: flex-start;
  max-width: min(560px, 46vw);
  margin: 0;
}

header.innerbar .fork-bsc-launch,
.fork-bsc-launch--compact {
  flex: 1 1 auto;
  max-width: min(100%, 460px);
  height: 31px;
  margin-left: auto;
  margin-right: 8px;
  padding-left: 11px;
  font-size: 12.5px;
}

header.innerbar .fork-bsc-copy,
.fork-bsc-launch--compact .fork-bsc-copy {
  height: 23px;
  padding: 0 10px;
}

section.stage .copy .fork-bsc-launch {
  margin-bottom: 10px;
  border-radius: 12px;
  width: 100%;
  max-width: min(100%, 560px);
  height: 40px;
}

.fork-bsc-soon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 12.5px/1 var(--f-ui, ui-sans-serif, system-ui, sans-serif);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text, #edf0f3);
  background: none;
  border: 0;
  padding: 0;
  white-space: nowrap;
}

.fork-bsc-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn, #f2b33d);
}

.fork-bsc-net {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12.5px/1 var(--f-ui, ui-sans-serif, system-ui, sans-serif);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text, #edf0f3);
  white-space: nowrap;
}

.fork-bsc-soon+.fork-bsc-net::before,
.fork-bsc-net+.fork-bsc-field::before {
  content: "";
  flex: none;
  width: 1px;
  height: 14px;
  margin-right: 2px;
  background: var(--border-strong, #2c343d);
}

.fork-bsc-logo {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.fork-bsc-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.fork-bsc-lbl {
  font: 500 12.5px/1 var(--f-ui, ui-sans-serif, system-ui, sans-serif);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3, #85909c);
  white-space: nowrap;
}

.fork-bsc-ca {
  font: 500 12px/1 var(--f-num, ui-monospace, monospace);
  color: var(--text, #edf0f3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.fork-bsc-copy {
  font: 600 12px/1 var(--f-ui, ui-sans-serif, system-ui, sans-serif);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text, #edf0f3);
  background: var(--surface-2, #141820);
  border: 1px solid var(--border, #1e242b);
  border-radius: 999px;
  height: 28px;
  padding: 0 11px;
  margin-left: 2px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.fork-bsc-copy:hover {
  border-color: var(--green, #00bc62);
  color: var(--text, #edf0f3);
}

.fork-bsc-copy:focus-visible {
  outline: 2px solid var(--green, #00bc62);
  outline-offset: 2px;
}

.fork-bsc-copy:active {
  transform: translateY(1px);
}

.fork-bsc-copy.ok {
  color: var(--brand-text, #34d987);
  border-color: var(--green, #00bc62);
  background: var(--surface-2, #141820);
}

@media (max-width: 1200px) {
  body[data-layout="top"] .topbar .fork-bsc-launch .fork-bsc-lbl {
    display: none;
  }

  body[data-layout="top"] .topbar .fork-bsc-launch {
    max-width: min(420px, 40vw);
  }
}

@media (max-width: 980px) {
  body[data-layout="top"] .topbar .fork-bsc-soon {
    display: none;
  }
}

html[lang|="zh"] {
  --f-ui: "Geist", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
}

.fork-lang {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 38px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border, #1e242b);
  border-radius: 999px;
  background: var(--surface, #0e1114);
}

header.innerbar .fork-lang {
  height: 31px;
  padding: 2px;
}

.fork-lang button {
  appearance: none;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3, #85909c);
  font: 600 12px/1 var(--f-ui, ui-sans-serif, system-ui, sans-serif);
  padding: 0 9px;
  cursor: pointer;
}

.fork-lang button[aria-pressed="true"] {
  background: var(--surface-3, #1b2029);
  color: var(--text, #edf0f3);
}

.fork-lang button:hover {
  color: var(--text, #edf0f3);
}

.fork-lang button:focus-visible {
  outline: 2px solid var(--green, #00bc62);
  outline-offset: 2px;
}

/* Fork: hide upstream snapshot skew line and referral promo banners */
.hero-skew,
.promo,
.promo-slot,
[data-promo],
[data-promo-slot],
[data-promo-card],
.ref-banner {
  display: none !important;
}

/* Long captions only — never flatten KPI rows, bar lists, or logo rows */
html[lang|="zh"] .stat,
html[lang|="zh"] .ent-board .stat,
html[lang|="zh"] .kpi {
  min-width: 0;
}

html[lang|="zh"] .cap:not(.kpi *):not(.stat *):not(.bars *):not(.ent-wbars *),
html[lang|="zh"] .ent-cap,
html[lang|="zh"] .ent-sr,
html[lang|="zh"] .pp-bfoot {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  max-width: 100%;
}

/* KPI / stat labels keep English inline layout */
html[lang|="zh"] .kpi .l,
html[lang|="zh"] .kpi .s,
html[lang|="zh"] .kpi .prov,
html[lang|="zh"] .stat .s,
html[lang|="zh"] .stat .l {
  display: revert;
  white-space: revert;
  overflow-wrap: revert;
  line-height: revert;
}

html[lang|="zh"] .tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  white-space: nowrap;
  font: 600 10px/1.2 var(--f-num, var(--mono));
}

html[lang|="zh"] .lg,
html[lang|="zh"] .lg svg,
html[lang|="zh"] .lg img {
  flex: none;
  font-family: var(--f-ui, ui-sans-serif, system-ui, sans-serif);
}

html[lang|="zh"] .bars .row,
html[lang|="zh"] .bars>a,
html[lang|="zh"] .ent-wbars .ent-wrow,
html[lang|="zh"] .hc-tape a,
html[lang|="zh"] .marquee a {
  min-width: 0;
}

html[lang|="zh"] .bars .lg,
html[lang|="zh"] .bars .nm,
html[lang|="zh"] .ent-wbars .lg,
html[lang|="zh"] .fchip .lg,
html[lang|="zh"] .ent-glyph {
  flex: none;
  max-width: none;
}

html[lang|="zh"] #tip {
  max-width: min(28rem, 92vw);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

html[lang|="zh"] #tip .hc-k,
html[lang|="zh"] #tip small,
html[lang|="zh"] #tip p {
  white-space: normal;
}

html[lang|="zh"] .ent-varow,
html[lang|="zh"] .ent-tradedrow,
html[lang|="zh"] .vl-cell {
  min-width: 0;
}

.fork-data-notice {
  position: fixed;
  z-index: 10000;
  inset: auto 16px 16px auto;
  max-width: min(600px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid #6b572a;
  border-radius: 10px;
  background: #17170f;
  color: #eddeb6;
  font: 500 12px/1.5 system-ui, sans-serif;
}

.fork-data-notice button {
  margin-left: 8px;
  padding: 3px 9px;
  border: 1px solid #8b7744;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

@media (max-width: 639px) {
  .fork-data-notice { bottom: 76px; }
}

/* StonkScope wordmark + loading mark */
.mark svg.wordmark[data-fork-brand] .ss-stonk,
.footer-brand svg.wordmark[data-fork-brand] .ss-stonk {
  fill: var(--ink, #f1f3f5);
}

.mark svg.wordmark[data-fork-brand] .ss-scope,
.footer-brand svg.wordmark[data-fork-brand] .ss-scope {
  fill: var(--brand-green, #00bc62);
}

.mark .wordmark,
.footer-brand .wordmark {
  width: auto;
  max-width: min(280px, 58vw);
  height: auto;
  overflow: visible;
}

.mark svg.wordmark[data-fork-brand],
.footer-brand svg.wordmark[data-fork-brand] {
  max-width: min(340px, 94vw);
}

.topbar .mark .wordmark {
  width: auto;
  height: 38px;
}

/* Combined lockup already includes the mark — hide the extra rail icon */
.mark svg.wordmark[data-fork-brand]~svg.rail-icon,
.mark svg.wordmark[data-fork-brand]~svg.brandicon.rail-icon {
  display: none !important;
}

/* Side rail: center lockup + scale (~1.15× upstream 200px / 40px icon) */
aside.rail>a.mark {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-inline: 4px;
}

aside.rail>a.mark svg.wordmark[data-fork-brand] {
  width: 320px;
  max-width: calc(100% - 8px);
  margin-inline: auto;
  overflow: visible;
}

.mark svg.wordmark[data-fork-brand] .ss-mark-img,
.footer-brand svg.wordmark[data-fork-brand] .ss-mark-img {
  overflow: visible;
}

html[data-sidebar="collapsed"] aside.rail>a.mark svg.rail-icon[data-fork-brand],
html[data-layout="rail"]:not([data-sidebar]) aside.rail>a.mark svg.rail-icon[data-fork-brand] {
  width: 46px;
  height: auto;
  margin-inline: auto;
}

.mobname {
  line-height: 1.05;
  font-family: Tomorrow, "Arial Black", Arial, ui-sans-serif, sans-serif;
  font-style: italic;
  font-weight: 800;
}

.mobname span {
  color: var(--brand-green, #00bc62);
  font-size: 1.08em;
}

svg.ld-mark.stonkscope-ld-mark {
  width: 48px;
  height: 48px;
  overflow: visible;
  animation: stonkscope-ld-pulse 1.4s ease-in-out infinite;
}

svg.ld-mark.stonkscope-ld-mark .ss-mark-img {
  opacity: 1;
}

.mark svg.wordmark .ss-chain-path,
.footer-brand svg.wordmark .ss-chain-path,
.mark svg.brandicon .ss-chain-path,
.mark svg.rail-icon .ss-chain-path {
  fill: var(--brand-green, #00bc62);
}

@keyframes stonkscope-ld-pulse {

  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}
