/* TradeX: the charting subscription. Loaded only when the server runs with TRADEX=1. */
/* charts only (no firm account picked): no trading parts at all */
body.tradex:not(.tx-trade) footer, body.tradex:not(.tx-trade) #ticket, body.tradex:not(.tx-trade) #qbar,
body.tradex:not(.tx-trade) header .stats, body.tradex:not(.tx-trade) #status, body.tradex:not(.tx-trade) #lockBadge,
body.tradex:not(.tx-trade) #billBar, body.tradex:not(.tx-trade) #tkToggle, body.tradex:not(.tx-trade) #btToggle2,
body.tradex:not(.tx-trade) #mnav [data-mv="trade"], body.tradex:not(.tx-trade) #mnav [data-mv="pos"],
body.tradex:not(.tx-trade) .market-filter, body.tradex:not(.tx-trade) #chartOnlyNotice { display: none !important; }
/* never in TradeX: the firm's own extras, and the old switcher / sign-in options (TradeX has its own) */
body.tradex #practiceBar, body.tradex #mentorsBtn, body.tradex #chatBtn, body.tradex #ytBtn, body.tradex #liveBtn,
body.tradex #dashBtn, body.tradex #wbBtn, body.tradex #accId, body.tradex #promo, body.tradex #switchAccount,
body.tradex #lgForm, body.tradex .lg-more, body.tradex .lg-links, body.tradex #guideBtn, body.tradex #shareBtn { display: none !important; }

/* logo + the account being traded, top left */
body.tradex header .brand { display: flex; align-items: center; gap: 10px; }
body.tradex header .brand img { height: 22px; width: auto; display: block; }
#txSwitch { position: relative; }
#txSwitch > button { display: flex; align-items: center; gap: 8px; max-width: 360px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2, transparent); color: var(--text); font-size: 12.5px; cursor: pointer; }
#txSwitch > button .tx-firm-name { font-weight: 600; white-space: nowrap; }
#txSwitch > button .tx-firm-meta { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#txSwitch > button .tx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
body.tx-trade #txSwitch > button .tx-dot { background: var(--green); }
#txMenu { position: fixed; z-index: 8500; min-width: 320px; max-width: calc(100vw - 16px); max-height: 60vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
#txMenu[hidden] { display: none; }
#txMenu .tx-mi { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer; font-size: 12.5px; }
#txMenu .tx-mi:hover, #txMenu .tx-mi.on { background: var(--panel2, rgba(255, 255, 255, .06)); }
#txMenu .tx-mi small { color: var(--muted); grid-column: 1; }
#txMenu .tx-mi .tx-st { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 11px; color: var(--muted); }
#txMenu .tx-mh { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
#txMenu .tx-empty { padding: 8px 10px; color: var(--muted); font-size: 12.5px; }
#txMenu a.tx-get { display: block; margin: 6px 4px 2px; text-align: center; text-decoration: none; padding: 8px; border-radius: 8px; background: var(--accent); color: #000; font-weight: 600; font-size: 12.5px; }

#txBadge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
#txBadge .tx-pill { padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
#txBadge .tx-pill.trial { color: var(--accent); border-color: var(--accent); }
#txBadge .tx-pill.firm, #txBadge .tx-pill.paid { color: var(--green); border-color: var(--green); }
#txBadge button { padding: 4px 10px; font-size: 12px; }

.tx-login-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* the ad strip under the chart, trial users only */
#txAd { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); background: var(--panel); font-size: 12.5px; min-height: 40px; }
#txAd[hidden] { display: none; }
#txAd .tx-ad-tag { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; flex: none; }
#txAd .tx-ad-img { height: 26px; width: auto; border-radius: 4px; flex: none; }
#txAd .tx-ad-copy { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#txAd .tx-ad-copy b { color: var(--text); margin-right: 6px; }
#txAd .tx-ad-copy span { color: var(--muted); }
#txAd a.tx-ad-cta { flex: none; background: var(--accent); color: #000; font-weight: 600; text-decoration: none; padding: 5px 12px; border-radius: 6px; }
#txAd .tx-ad-x { flex: none; background: none; border: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 0 4px; }

/* subscribe screen, daily offer card */
#txWall, #txCard { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .72); }
#txWall[hidden], #txCard[hidden] { display: none; }
.tx-box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; color: var(--text); }
.tx-box h2 { margin: 0 0 6px; font-size: 21px; }
.tx-box p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.tx-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.tx-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
@media (max-width: 520px) { .tx-plans { grid-template-columns: 1fr; } }
.tx-plan { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 6px; }
.tx-plan.best { border-color: var(--accent); }
.tx-plan .tx-price { font-size: 26px; font-weight: 700; }
.tx-plan .tx-price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.tx-plan .tx-save { font-size: 12px; color: var(--accent); min-height: 16px; }
.tx-plan button { margin-top: 6px; width: 100%; }
.tx-firm { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.tx-msg { min-height: 18px; font-size: 12.5px; color: var(--red); }
.tx-offer-firm { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.tx-offer-img { width: 100%; border-radius: 10px; margin-bottom: 12px; }
.tx-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tx-row a, .tx-row button { flex: 1; text-align: center; text-decoration: none; }

/* the Nexcharts sign-in page */
body.tradex #login { background: radial-gradient(1200px 600px at 15% 10%, rgba(245, 179, 1, .10), transparent 60%), var(--bg); padding: 16px; overflow: auto; }
body.tradex #login .lg-card { width: min(920px, 100%); max-width: none; padding: 0; overflow: hidden; }
body.tradex #login .lg-card > :not(#txLogin) { display: none !important; }
#txLogin { display: grid; grid-template-columns: 1.1fr 1fr; }
#txLogin .txl-pitch { padding: 36px 32px; background: linear-gradient(160deg, rgba(38, 166, 154, .12), rgba(245, 179, 1, .08)); border-right: 1px solid var(--line); }
#txLogin .txl-brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; margin-bottom: 28px; }
#txLogin .txl-brand img { width: 40px; height: 40px; }
#txLogin .txl-brand b { color: var(--accent); }
#txLogin h1 { font-size: 26px; line-height: 1.25; margin: 0 0 18px; }
#txLogin ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.7; font-size: 14px; }
#txLogin .txl-form { padding: 36px 32px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
#txLogin h2 { margin: 0 0 4px; font-size: 20px; }
#txLogin form { display: grid; gap: 10px; }
#txLogin form[hidden] { display: none; }
#txLogin label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
#txLogin input { font-size: 15px; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
#txLogin input#txlCodeIn { letter-spacing: .3em; font-family: var(--mono, monospace); }
#txLogin button { padding: 11px; font-size: 14px; }
#txLogin .txl-msg { min-height: 20px; font-size: 13px; color: var(--muted); }
#txLogin .txl-msg.bad { color: var(--red); }
#txLogin .txl-note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 760px) {
  #txLogin { grid-template-columns: 1fr; }
  #txLogin .txl-pitch { border-right: none; border-bottom: 1px solid var(--line); padding: 24px 20px; }
  #txLogin h1 { font-size: 21px; }
  #txLogin .txl-form { padding: 24px 20px; }
}
