/* Markets theme tokens — built from The5ers Design System palette.
   Apply .mk-dark or .mk-light on an artboard root. */
.mk-dark {
  --bg: #06060C; --surface: #10111B; --surface-2: #12131F; --sunken: #0B0C14;
  --chip: #1B1C2C; --line: #1F2030; --line-2: #28293D; --line-3: #3E4155;
  --fg: #F9F9FF; --fg-body: #E6E7F0; --fg-2: #C9CBD6; --fg-3: #9FA1A4; --fg-muted: #8E98A8;
  --link: #AAB2FF; --up: #0DE77E; --down: #FE4B4B; --down-fg: #FE8080; --amber: #F9C509;
  --lime-fg: #DDFD6C; --lime-line: #DDFD6C; --lime-soft: rgba(221,253,108,0.35);
  --card-alt: #F9F9FF; --shadow-card: none;
  --color-fg-strong: #F9F9FF;
  color-scheme: dark;
}
.mk-light {
  --bg: #F9F9FF; --surface: #FFFFFF; --surface-2: #FFFFFF; --sunken: #F4F4F8;
  --chip: #F0EBFF; --line: #E5E7EB; --line-2: #DCDDE4; --line-3: #BBBDBF;
  --fg: #06060C; --fg-body: #28293D; --fg-2: #3E4145; --fg-3: #595D62; --fg-muted: #6B7280;
  --link: #5F2EE8; --up: #05894A; --down: #D80027; --down-fg: #C4001F; --amber: #9A7300;
  --lime-fg: #4F6E00; --lime-line: #9BC53D; --lime-soft: rgba(110,150,0,0.28);
  --card-alt: #F0EBFF; --shadow-card: 0 4px 12px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --color-fg-strong: #06060C;
  color-scheme: light;
}

/* headings inherit the theme colour; display font from the design system */
.mk-dark h1, .mk-dark h2, .mk-dark h3, .mk-light h1, .mk-light h2, .mk-light h3 { color: var(--color-fg-strong); }

/* ============================================================
   Interaction layer (shared by every board)
   Hover, press, focus, row highlight and tooltips. No board
   needs its own hover code; production maps these to the same
   tokens (CONVERSION.md §6, INTERACTIONS).
   ============================================================ */
:root { --hover: rgba(249,249,255,0.06); --press: rgba(249,249,255,0.11); --focus: #AAB2FF; --tip-bg: #1B1C2C; --tip-fg: #F9F9FF; --row-hover: rgba(114,63,255,0.07); }
.mk-light { --hover: rgba(6,6,12,0.045); --press: rgba(6,6,12,0.09); --focus: #5F2EE8; --tip-bg: #06060C; --tip-fg: #F9F9FF; --row-hover: rgba(114,63,255,0.06); }

a[href], button, [role="button"], [role="switch"], [role="tab"], [role="option"], select, summary, label:has(> input[type="checkbox"]) { cursor: pointer; }
a[href], button, [role="switch"], [role="tab"], [role="option"], .mk-row { transition: box-shadow .15s ease, color .15s ease, background-color .15s ease, transform .08s ease, opacity .15s ease; }

/* Blocks (buttons, cards, rows, pills that are links): a soft wash on hover, a deeper one on press */
button:not(:disabled):hover, [role="tab"]:hover, [role="option"]:hover, [role="switch"]:hover,
a[href][style*="display"]:hover { box-shadow: inset 0 0 0 9999px var(--hover); }
button:not(:disabled):active, a[href][style*="display"]:active, [role="option"]:active { box-shadow: inset 0 0 0 9999px var(--press); transform: translateY(1px); }

/* Inline text links: underline on hover */
a[href]:not([style*="display"]):hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Keyboard focus, never on mouse click */
a[href]:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, [role="switch"]:focus-visible, [role="tab"]:focus-visible, [role="option"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

button:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .55; }

/* Row highlight for lists and tables that are not links themselves */
.mk-row:hover { box-shadow: inset 3px 0 0 #723FFF, inset 0 0 0 9999px var(--row-hover) !important; }

/* Glossary terms: dotted underline means "hover me" */
[data-term] { text-decoration: underline dotted; text-decoration-color: var(--fg-muted, #8E98A8); text-underline-offset: 3px; cursor: help; }

/* Tooltips: data-tip="…" on any element; data-tip-pos="below" when the element sits at the top of a box */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  width: max-content; max-width: 260px; padding: 6px 10px; border-radius: 8px; background: var(--tip-bg); color: var(--tip-fg);
  font: 500 12px/16px 'General Sans', system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; font-style: normal;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 80; pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity .12s ease 0s, transform .12s ease 0s, visibility 0s linear .12s;
}
[data-tip][data-tip-pos="below"]::after { bottom: auto; top: calc(100% + 8px); transform: translate(-50%, -4px); }
[data-tip][data-tip-pos="left"]::after { left: auto; right: 0; transform: translate(0, 4px); }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .12s ease .35s, transform .12s ease .35s, visibility 0s linear .35s; }
[data-tip][data-tip-pos="left"]:hover::after, [data-tip][data-tip-pos="left"]:focus-visible::after { transform: translate(0, 0); }
[data-tip=""]::after { display: none; }

@media (hover: none) { [data-tip]::after { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; } }

/* Glossary tooltips: any element with data-term="<label>" shows the definition on hover (generated from glossary). */
[data-term="Daily move"], [data-term="Relative volume"], [data-term="Rel. volume"], [data-term="Rel vol"], [data-term="Volatility"], [data-term="ATR (14) / daily range"], [data-term="Next earnings"], [data-term="Next catalyst"], [data-term="Trade Talk"], [data-term="Trader Flow"], [data-term="Trader Flow"], [data-term="Delayed"], [data-term="Delayed 15 min"], [data-term="Share of trades"], [data-term="Bullish share"], [data-term="Trend score"], [data-term="Gap %"], [data-term="Premarket move"], [data-term="Float"], [data-term="Short interest"], [data-term="52-week range"], [data-term="52-week position"], [data-term="Open / Prev close"], [data-term="Average volume (30d)"], [data-term="Daily range"], [data-term="Contract month"], [data-term="Expiration"], [data-term="Tick size and value"], [data-term="Trading session"], [data-term="Economic catalysts"], [data-term="Sector performance"], [data-term="Standing"], [data-term="Lift"], [data-term="Profit target"], [data-term="Daily loss limit"], [data-term="Maximum loss"], [data-term="Market cap"], [data-term="Implied move"], [data-term="Typical move"], [data-term="Attention"], [data-term="Sentiment"], [data-term="Trader Flow: most ordered"], [data-term="Volume"] { position: relative; text-decoration: underline dotted; text-decoration-color: var(--fg-muted, #8E98A8); text-underline-offset: 3px; cursor: help; }
:where([data-term="Daily move"], [data-term="Relative volume"], [data-term="Rel. volume"], [data-term="Rel vol"], [data-term="Volatility"], [data-term="ATR (14) / daily range"], [data-term="Next earnings"], [data-term="Next catalyst"], [data-term="Trade Talk"], [data-term="Trader Flow"], [data-term="Trader Flow"], [data-term="Delayed"], [data-term="Delayed 15 min"], [data-term="Share of trades"], [data-term="Bullish share"], [data-term="Trend score"], [data-term="Gap %"], [data-term="Premarket move"], [data-term="Float"], [data-term="Short interest"], [data-term="52-week range"], [data-term="52-week position"], [data-term="Open / Prev close"], [data-term="Average volume (30d)"], [data-term="Daily range"], [data-term="Contract month"], [data-term="Expiration"], [data-term="Tick size and value"], [data-term="Trading session"], [data-term="Economic catalysts"], [data-term="Sector performance"], [data-term="Standing"], [data-term="Lift"], [data-term="Profit target"], [data-term="Daily loss limit"], [data-term="Maximum loss"], [data-term="Market cap"], [data-term="Implied move"], [data-term="Typical move"], [data-term="Attention"], [data-term="Sentiment"], [data-term="Trader Flow: most ordered"], [data-term="Volume"])::after { content: ""; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); width: max-content; max-width: 260px; padding: 6px 10px; border-radius: 8px; background: var(--tip-bg); color: var(--tip-fg); font: 500 12px/16px 'General Sans', system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; font-style: normal; box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 80; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s ease 0s, transform .12s ease 0s, visibility 0s linear .12s; }
:where([data-term="Daily move"], [data-term="Relative volume"], [data-term="Rel. volume"], [data-term="Rel vol"], [data-term="Volatility"], [data-term="ATR (14) / daily range"], [data-term="Next earnings"], [data-term="Next catalyst"], [data-term="Trade Talk"], [data-term="Trader Flow"], [data-term="Trader Flow"], [data-term="Delayed"], [data-term="Delayed 15 min"], [data-term="Share of trades"], [data-term="Bullish share"], [data-term="Trend score"], [data-term="Gap %"], [data-term="Premarket move"], [data-term="Float"], [data-term="Short interest"], [data-term="52-week range"], [data-term="52-week position"], [data-term="Open / Prev close"], [data-term="Average volume (30d)"], [data-term="Daily range"], [data-term="Contract month"], [data-term="Expiration"], [data-term="Tick size and value"], [data-term="Trading session"], [data-term="Economic catalysts"], [data-term="Sector performance"], [data-term="Standing"], [data-term="Lift"], [data-term="Profit target"], [data-term="Daily loss limit"], [data-term="Maximum loss"], [data-term="Market cap"], [data-term="Implied move"], [data-term="Typical move"], [data-term="Attention"], [data-term="Sentiment"], [data-term="Trader Flow: most ordered"], [data-term="Volume"]):hover::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .12s ease .35s, transform .12s ease .35s, visibility 0s linear .35s; }
[data-term][data-tip-pos="below"]::after { bottom: auto; top: calc(100% + 8px); }
[data-term="Daily move"]::after { content: "Change since the previous session’s close."; }
[data-term="Relative volume"]::after { content: "Volume so far today ÷ the 20-day average at the same time of day. 2x means twice as busy as usual."; }
[data-term="Rel. volume"]::after { content: "Volume so far today ÷ the 20-day average at the same time of day. 2x means twice as busy as usual."; }
[data-term="Rel vol"]::after { content: "Volume so far today ÷ the 20-day average at the same time of day."; }
[data-term="Volatility"]::after { content: "How much the price typically swings, from the average true range (ATR) of recent sessions."; }
[data-term="ATR (14) / daily range"]::after { content: "Average true range over 14 sessions: the typical high-to-low distance, next to today’s range."; }
[data-term="Next earnings"]::after { content: "The company’s next scheduled results. Moves are often larger around earnings."; }
[data-term="Next catalyst"]::after { content: "The next scheduled event likely to move this asset, such as CPI or an FOMC decision."; }
[data-term="Trade Talk"]::after { content: "Community sentiment: Bullish vs Bearish votes in the last 24 hours. Shown from 25 votes."; }
[data-term="Trader Flow"]::after { content: "How much of all order activity this asset is drawing. Pooled and anonymous, delayed 15 min, hidden under 20 trades from 10 traders."; }
[data-term="Trader Flow"]::after { content: "Trader Flow shows where orders are moving between assets right now. Anonymous, delayed 15 minutes, shown only with 20+ orders from 10+ traders."; }
[data-term="Delayed"]::after { content: "Trader data is shown at least 15 minutes late so no one’s live positions can be read from it."; }
[data-term="Delayed 15 min"]::after { content: "Trader data is shown at least 15 minutes late so no one’s live positions can be read from it."; }
[data-term="Share of trades"]::after { content: "This asset’s share of all orders in the session (Trader Flow)."; }
[data-term="Bullish share"]::after { content: "Share of Trade Talk votes that are Bullish in the last 24 hours (from 25 votes)."; }
[data-term="Trend score"]::after { content: "How fast attention is rising (views, watchlist adds, searches, trades) vs this asset’s normal level. 0–100."; }
[data-term="Gap %"]::after { content: "Today’s open vs yesterday’s close."; }
[data-term="Premarket move"]::after { content: "Change in trading before the 09:30 ET open."; }
[data-term="Float"]::after { content: "Shares available to trade, excluding insiders and locked-up holdings."; }
[data-term="Short interest"]::after { content: "Shares sold short as a share of the float."; }
[data-term="52-week range"]::after { content: "Lowest and highest price over the past year."; }
[data-term="52-week position"]::after { content: "Where today’s price sits between the 52-week low (0%) and high (100%)."; }
[data-term="Open / Prev close"]::after { content: "Today’s opening price and the previous session’s closing price."; }
[data-term="Average volume (30d)"]::after { content: "Average daily contracts or shares traded over the last 30 sessions."; }
[data-term="Daily range"]::after { content: "Today’s low to high."; }
[data-term="Contract month"]::after { content: "The delivery month of the futures contract shown (the front month)."; }
[data-term="Expiration"]::after { content: "Last trading day of this contract. Positions roll to the next month before it."; }
[data-term="Tick size and value"]::after { content: "The smallest price step and what one step is worth per contract."; }
[data-term="Trading session"]::after { content: "Hours this market trades, in ET."; }
[data-term="Economic catalysts"]::after { content: "Scheduled releases that usually move this market."; }
[data-term="Sector performance"]::after { content: "How the asset’s sector is doing today, for context."; }
[data-term="Standing"]::after { content: "Community standing from helpful posts and ideas over time. See How our scores work."; }
[data-term="Lift"]::after { content: "How much more often traders of one asset also trade the other, compared with chance."; }
[data-term="Profit target"]::after { content: "The gain the account must reach to pass the evaluation."; }
[data-term="Daily loss limit"]::after { content: "The most the account can lose in one day before the rule is breached."; }
[data-term="Maximum loss"]::after { content: "The total loss limit for the account."; }
[data-term="Market cap"]::after { content: "Share price × shares outstanding."; }
[data-term="Implied move"]::after { content: "The move options are pricing in around the event (when available)."; }
[data-term="Typical move"]::after { content: "Average absolute move after the last 8 similar events."; }
[data-term="Attention"]::after { content: "Change in views, watchlist adds, searches and trades vs normal."; }
[data-term="Sentiment"]::after { content: "Bullish vs Bearish votes in Trade Talk, last 24 hours."; }
[data-term="Trader Flow: most ordered"]::after { content: "Ranked by share of all orders. Anonymous, delayed 15 min."; }
[data-term="Volume"]::after { content: "Shares or contracts traded so far this session."; }
[data-term]:not([data-term="Daily move"], [data-term="Relative volume"], [data-term="Rel. volume"], [data-term="Rel vol"], [data-term="Volatility"], [data-term="ATR (14) / daily range"], [data-term="Next earnings"], [data-term="Next catalyst"], [data-term="Trade Talk"], [data-term="Trader Flow"], [data-term="Trader Flow"], [data-term="Delayed"], [data-term="Delayed 15 min"], [data-term="Share of trades"], [data-term="Bullish share"], [data-term="Trend score"], [data-term="Gap %"], [data-term="Premarket move"], [data-term="Float"], [data-term="Short interest"], [data-term="52-week range"], [data-term="52-week position"], [data-term="Open / Prev close"], [data-term="Average volume (30d)"], [data-term="Daily range"], [data-term="Contract month"], [data-term="Expiration"], [data-term="Tick size and value"], [data-term="Trading session"], [data-term="Economic catalysts"], [data-term="Sector performance"], [data-term="Standing"], [data-term="Lift"], [data-term="Profit target"], [data-term="Daily loss limit"], [data-term="Maximum loss"], [data-term="Market cap"], [data-term="Implied move"], [data-term="Typical move"], [data-term="Attention"], [data-term="Sentiment"], [data-term="Trader Flow: most ordered"], [data-term="Volume"]) { text-decoration: none; cursor: inherit; }

/* ============================================================
   Brand layer (SITE_V3 brand theming). Apply brand-ttp or
   brand-the5ers next to mk-dark / mk-light on the board root.
   No brand class (or brand-group) = the Markets / The5ers look.
   Production: these become the brand tokens; the attribute
   selectors below only re-skin the mockups' hard-coded purples.
   ============================================================ */
.brand-ttp.mk-light {
  --bg: #FFFFFB; --surface: #FFFFFF; --surface-2: #FFFFFF; --sunken: #F3F7FB;
  --chip: #E6EFF8; --line: #E3E8EE; --line-2: #C9D6E3; --line-3: #9FB3C8;
  --fg: #000000; --fg-body: #111111; --fg-2: #2B2B2B; --fg-3: #55595E; --fg-muted: #6B7078;
  --link: #C7391F; --card-alt: #BFD6EC; --color-fg-strong: #000000;
  --lime-fg: #3F6B00; --lime-line: #8CCB3A; --lime-soft: rgba(192,247,119,0.45);
  --focus: #000000; --row-hover: rgba(191,214,236,0.25); --hover: rgba(0,0,0,0.045); --press: rgba(0,0,0,0.09);
  --brand: #BFD6EC; --brand-fg: #000000; --brand-text: #C7391F; --brand-chart: #FA593B;
  --brand-tint: rgba(191,214,236,0.45); --brand-outline: #000000; --brand-shadow: #000000;
  --brand-soft: #BFD6EC; --brand-lime: #C0F777;
}
.brand-ttp.mk-dark {
  --bg: #000000; --surface: #0D0E10; --surface-2: #111215; --sunken: #060607;
  --chip: #1A1D22; --line: #1E2126; --line-2: #2C3138; --line-3: #4A515B;
  --fg: #FFFFFB; --fg-body: #EDEEF0; --fg-2: #C9CDD2; --fg-3: #9DA3AA; --fg-muted: #8A9099;
  --link: #BFD6EC; --card-alt: #BFD6EC; --color-fg-strong: #FFFFFB;
  --lime-fg: #C0F777; --lime-line: #C0F777; --lime-soft: rgba(192,247,119,0.30);
  --focus: #BFD6EC; --row-hover: rgba(191,214,236,0.06);
  --brand: #BFD6EC; --brand-fg: #000000; --brand-text: #BFD6EC; --brand-chart: #BFD6EC;
  --brand-tint: rgba(191,214,236,0.14); --brand-outline: #BFD6EC; --brand-shadow: #FA593B;
  --brand-soft: #BFD6EC; --brand-lime: #C0F777;
}
