/* Market is a destination, not a gallery of clickable tiles.
   Fixed body-level panel prevents Home's legacy grid and PWA scroll clamps
   from clipping the embedded Market page on iOS and desktop. */
html[data-inj-page="index"] body>#injMarketTabHead[hidden]{
  display:none!important;visibility:hidden!important;pointer-events:none!important;
}
html[data-inj-page="index"] body>#injMarketTabPanel[hidden]{
  display:none!important;visibility:hidden!important;pointer-events:none!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body>#injMarketTabPanel:not([hidden]){
  display:flex!important;position:fixed!important;
  inset:calc(max(14px,env(safe-area-inset-top,0px)) + 76px) 0 calc(84px + env(safe-area-inset-bottom,0px)) 0!important;
  z-index:2147483380!important;
  flex-direction:column!important;
  width:100%!important;height:auto!important;min-height:0!important;
  overflow:hidden!important;box-sizing:border-box!important;
  padding:0!important;margin:0!important;
  background:var(--theme-canvas,var(--bg,#09191a))!important;
  color:var(--text,#eef8f4)!important;
  pointer-events:auto!important;isolation:isolate!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body #entryGate#entryGate
 .entry-gate-shell:not(.first-access)>:is(#injTabHeading,.entry-actions.entry-flat-v44){
  display:none!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body #entryGate.entry-gate.visible{
  pointer-events:none!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body>#injMarketTabHead:not([hidden]){
  display:block!important;position:fixed!important;
  top:0!important;left:0!important;right:0!important;bottom:auto!important;
  height:calc(max(14px,env(safe-area-inset-top,0px)) + 76px)!important;
  z-index:2147483600!important;
  pointer-events:auto!important;overflow:hidden!important;
}
#injMarketTabHead{
  position:relative!important;flex:0 0 auto!important;box-sizing:border-box!important;
  width:100%!important;padding:max(14px,env(safe-area-inset-top,0px)) 0 0!important;
  background:color-mix(in srgb,var(--surface,#102323) 86%,var(--theme-canvas,#07171a))!important;
  border-bottom:1px solid color-mix(in srgb,var(--accent,#9dddcf) 15%,var(--line,#375855))!important;
}
#injMarketTabHead .inj-market-tab-kicker{
  display:block!important;padding:0 max(18px,calc((100vw - 1400px)/2)) 12px!important;
  font-size:10px!important;font-weight:600!important;letter-spacing:.15em!important;
  line-height:1.2!important;color:var(--muted-strong,var(--muted,#a5b8b7))!important;
}
#injMarketTabHead .inj-market-tab-rail{
  display:flex!important;align-items:stretch!important;
  flex-wrap:nowrap!important;gap:5px!important;
  box-sizing:border-box!important;
  padding:0 max(12px,calc((100vw - 1400px)/2)) 8px!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  scrollbar-width:none!important;overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-x!important;
  scroll-snap-type:x proximity!important;
}
#injMarketTabHead .inj-market-tab-rail::-webkit-scrollbar{display:none!important}
#injMarketTabHead .inj-market-tab-link{
  position:relative!important;display:inline-flex!important;
  flex:0 0 auto!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;min-height:38px!important;
  margin:0!important;padding:8px clamp(12px,3vw,17px)!important;
  border:1px solid transparent!important;border-radius:12px!important;
  background:transparent!important;box-shadow:none!important;
  color:var(--muted-strong,var(--muted,#a1b6b1))!important;
  font-family:var(--inj-chosen-face,var(--inj-node-terminal-font,system-ui,sans-serif))!important;
  font-size:clamp(11px,2.8vw,13px)!important;font-weight:550!important;
  letter-spacing:0!important;line-height:1.25!important;
  white-space:nowrap!important;cursor:pointer!important;
  scroll-snap-align:center!important;touch-action:manipulation!important;
  transition:background .2s,color .2s,border-color .2s!important;
}
#injMarketTabHead .inj-market-tab-link.is-active{
  color:var(--text,#eafff7)!important;
  background:color-mix(in srgb,var(--accent,#8bdfce) 12%,var(--surface,#102323))!important;
  border-color:color-mix(in srgb,var(--accent,#8bdfce) 23%,transparent)!important;
}
#injMarketTabHead .inj-market-tab-link.is-active::after{
  content:"";position:absolute;left:20%;right:20%;bottom:2px;height:2px;
  background:var(--accent,#8cddc9);border-radius:5px;
}
#injMarketTabHead .inj-market-tab-link:focus-visible{
  outline:2px solid var(--accent,#8bdfce)!important;outline-offset:-2px!important;
}
#injMarketTabPanel .inj-market-tab-content{
  display:flex!important;position:relative!important;flex:1 1 auto!important;
  min-height:0!important;width:100%!important;overflow:hidden!important;
  background:var(--theme-canvas,var(--bg,#09191a))!important;
}
#injMarketTabPanel .inj-market-tab-loading{
  position:absolute;inset:0;display:grid;place-items:center;
  color:var(--muted-strong,var(--muted,#9dadab));font-size:12px;
  letter-spacing:.22em;pointer-events:none;
}
#injMarketTabPanel .inj-market-tab-frame{
  position:relative!important;display:block!important;
  width:100%!important;height:100%!important;flex:1 1 auto!important;
  min-height:0!important;margin:0!important;padding:0!important;
  border:0!important;outline:0!important;
  background:transparent!important;overflow:auto!important;
  visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
#injMarketTabPanel .inj-market-tab-content.is-ready>.inj-market-tab-frame{
  opacity:1!important;visibility:visible!important;pointer-events:auto!important;
}
#injMarketTabPanel .inj-market-tab-content.is-ready>.inj-market-tab-loading{
  display:none!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body.inj-section-open>#injMarketTabPanel,
html[data-inj-page="index"][data-inj-home-tab="mercato"] body:has(#injMarketEventsOverlay:not([hidden]))>#injMarketTabPanel,
html[data-inj-page="index"][data-inj-home-tab="mercato"] body:has(#performanceTimelineView:not([hidden]))>#injMarketTabPanel{
  visibility:hidden!important;pointer-events:none!important;
}
@media(min-width:800px){
  html[data-inj-page="index"][data-inj-home-tab="mercato"] body>#injMarketTabPanel:not([hidden]){
    bottom:104px!important;top:calc(max(20px,env(safe-area-inset-top,0px)) + 80px)!important;
  }
  #injMarketTabHead{padding-top:max(20px,env(safe-area-inset-top,0px))!important;height:calc(max(20px,env(safe-area-inset-top,0px)) + 80px)!important}
  #injMarketTabHead .inj-market-tab-kicker{padding-bottom:14px!important}
  #injMarketTabHead .inj-market-tab-rail{gap:9px!important;padding-bottom:12px!important}
}
@media(prefers-reduced-motion:reduce){
  #injMarketTabHead .inj-market-tab-link{transition:none!important}
}
/* The same Market rail remains available over native Calendar and Performance.
   Only the content pane is covered; switching tabs closes the native overlay. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body #injMarketEventsOverlay:not([hidden]){
  padding-top:calc(max(14px,env(safe-area-inset-top,0px)) + 85px)!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView:not([hidden]) .performance-timeline-shell{
  padding-top:calc(max(14px,env(safe-area-inset-top,0px)) + 86px)!important;
}


/* MARKET IMMERSIVE / AUTO-REVEAL · 31 October 2026
   The tab body is viewport-sized when controls disappear; there are no
   fixed blank bands above the chart or underneath the order book. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 > #injMarketTabPanel:not([hidden]){
  top:calc(max(14px,env(safe-area-inset-top,0px)) + 76px)!important;
  bottom:calc(84px + env(safe-area-inset-bottom,0px))!important;
  left:0!important;right:0!important;
  transition:top .34s ease,bottom .34s ease!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"][data-inj-market-chrome="hidden"] body
 > #injMarketTabPanel:not([hidden]){
  top:0!important;bottom:0!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 > #injMarketTabHead:not([hidden]){
  transition:opacity .30s ease,transform .34s ease,visibility .34s ease!important;
  opacity:1!important;visibility:visible!important;transform:translateY(0)!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"][data-inj-market-chrome="hidden"] body
 > #injMarketTabHead:not([hidden]){
  opacity:0!important;visibility:hidden!important;
  transform:translateY(-105%)!important;
  pointer-events:none!important;
}
/* The base dock stylesheet intentionally hides itself for other immersive
   modes. Only Market overrides it while the user browses these six views. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body.entry-gate-open:not(
  .boot-loading,.menu-overlay-open,.drawer-open,.inj-section-open
) > #injPrimaryBottomNav{
  display:grid!important;opacity:1!important;visibility:visible!important;
  pointer-events:auto!important;
  transition:opacity .30s ease,transform .34s ease,visibility .34s ease!important;
  transform:translate(-50%,0)!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"][data-inj-market-chrome="hidden"]
 body.entry-gate-open > #injPrimaryBottomNav{
  display:grid!important;opacity:0!important;visibility:hidden!important;
  pointer-events:none!important;transform:translate(-50%,19px)!important;
}
/* Performance is an existing native Home overlay, not an iframe.
   Raise it above Market's content; otherwise the chart seems to open
   underneath the previous page. Leave the Market rail and dock higher. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView.open:not([hidden]){
  display:flex!important;position:fixed!important;flex-direction:column!important;
  top:calc(max(14px,env(safe-area-inset-top,0px)) + 76px)!important;
  bottom:calc(84px + env(safe-area-inset-bottom,0px))!important;
  left:0!important;right:0!important;
  width:100%!important;height:auto!important;min-height:0!important;
  max-height:none!important;margin:0!important;
  opacity:1!important;visibility:visible!important;
  z-index:2147483480!important;
  overflow:hidden!important;
  background:var(--theme-canvas,var(--bg,#09191a))!important;
  transition:top .34s ease,bottom .34s ease!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"][data-inj-market-chrome="hidden"]
 body #performanceTimelineView.open:not([hidden]){
  top:0!important;bottom:0!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView.open:not([hidden]) > .performance-timeline-shell{
  display:flex!important;flex-direction:column!important;
  flex:1 1 auto!important;width:100%!important;height:100%!important;
  min-height:0!important;max-height:100%!important;
  box-sizing:border-box!important;
  padding-top:0!important;
  overflow:hidden!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView.open:not([hidden]) .performance-timeline-main{
  flex:1 1 auto!important;min-height:0!important;
  overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView.open:not([hidden]) #entryPnlTimeline{
  min-height:0!important;width:100%!important;
}
/* The real macro-events overlay should remain readable below the controls;
   with them hidden, it can use its own full height again. */
html[data-inj-page="index"][data-inj-home-tab="mercato"][data-inj-market-chrome="shown"]
 body #injMarketEventsOverlay:not([hidden]){
  padding-top:calc(max(14px,env(safe-area-inset-top,0px)) + 85px)!important;
  padding-bottom:calc(85px + env(safe-area-inset-bottom,0px))!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"][data-inj-market-chrome="hidden"]
 body #injMarketEventsOverlay:not([hidden]){
  padding-top:calc(env(safe-area-inset-top,0px) + 12px)!important;
  padding-bottom:calc(env(safe-area-inset-bottom,0px) + 16px)!important;
}
@media(min-width:800px){
 html[data-inj-page="index"][data-inj-home-tab="mercato"] body
  >#injMarketTabPanel:not([hidden]){top:calc(max(20px,env(safe-area-inset-top,0px)) + 80px)!important;bottom:104px!important}
 html[data-inj-page="index"][data-inj-home-tab="mercato"] body
  #performanceTimelineView.open:not([hidden]){top:calc(max(20px,env(safe-area-inset-top,0px)) + 80px)!important;bottom:104px!important}
 html[data-inj-page="index"][data-inj-home-tab="mercato"][data-inj-market-chrome="hidden"] body
  >#injMarketTabPanel:not([hidden]),
 html[data-inj-page="index"][data-inj-home-tab="mercato"][data-inj-market-chrome="hidden"] body
  #performanceTimelineView.open:not([hidden]){top:0!important;bottom:0!important}
}
@media(prefers-reduced-motion:reduce){
 html[data-inj-page="index"][data-inj-home-tab="mercato"] body
  :is(#injMarketTabPanel,#injMarketTabHead,#injPrimaryBottomNav,#performanceTimelineView){
  transition:none!important;
 }
}


/* MARKET · TOP-ONLY NAVIGATION · 31 Oct 2026
   The primary five-tab dock disappears completely inside Market.
   A dedicated Home icon is the first control, pinned to the left of the
   horizontal rail; the six market destinations remain swipeable. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body.entry-gate-open
 > #injPrimaryBottomNav#injPrimaryBottomNav#injPrimaryBottomNav,
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 > #injPrimaryBottomNav#injPrimaryBottomNav#injPrimaryBottomNav:popover-open{
 display:none!important;opacity:0!important;visibility:hidden!important;
 pointer-events:none!important;
}
#injMarketTabHead .inj-market-tab-row{
 display:flex!important;align-items:center!important;gap:7px!important;
 width:100%!important;min-width:0!important;box-sizing:border-box!important;
 padding:0 max(12px,calc((100vw - 1400px)/2))!important;
}
#injMarketTabHead #injMarketHomeLink{
 display:inline-flex!important;position:relative!important;
 align-items:center!important;justify-content:center!important;
 flex:0 0 41px!important;width:41px!important;height:39px!important;
 min-width:41px!important;min-height:39px!important;
 margin:0 0 8px!important;padding:0!important;
 color:var(--text,#e8f5f2)!important;
 border:1px solid color-mix(in srgb,var(--accent,#8bdfce) 22%,var(--line,#48615c))!important;
 border-radius:12px!important;
 background:color-mix(in srgb,var(--accent,#8bdfce) 10%,var(--surface,#0a2528))!important;
 box-shadow:none!important;
 cursor:pointer!important;touch-action:manipulation!important;
 -webkit-tap-highlight-color:transparent!important;
 transition:background .2s ease,color .2s ease,border-color .2s ease!important;
}
#injMarketTabHead #injMarketHomeLink svg{
 display:block!important;width:20px!important;height:20px!important;
 flex:none!important;stroke:currentColor!important;fill:none!important;
}
#injMarketTabHead #injMarketHomeLink:active{
 background:color-mix(in srgb,var(--accent,#8bdfce) 20%,var(--surface,#0a2528))!important;
}
#injMarketTabHead #injMarketHomeLink:focus-visible{
 outline:2px solid var(--accent,#8bdfce)!important;outline-offset:2px!important;
}
#injMarketTabHead .inj-market-tab-row > .inj-market-tab-rail{
 flex:1 1 auto!important;width:auto!important;min-width:0!important;
 padding:0 0 8px 0!important;
}
/* Every Market subpage can use the entire screen below the top rail;
   no phantom gap is reserved for the now-absent bottom navigation. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 > #injMarketTabPanel:not([hidden]){
 bottom:0!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView.open:not([hidden]){
 bottom:0!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #injMarketEventsOverlay:not([hidden]){
 padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;
}
/* Single Home icon in Market's main rail replaces the old close/back glyphs
   on native Performance and the macro-event calendar. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView #closePerformanceTimelineButton,
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #injMarketEventsOverlay #injEventsClose{
 display:none!important;visibility:hidden!important;pointer-events:none!important;
}
@media(min-width:800px){
 html[data-inj-page="index"][data-inj-home-tab="mercato"] body
  >#injMarketTabPanel:not([hidden]),
 html[data-inj-page="index"][data-inj-home-tab="mercato"] body
  #performanceTimelineView.open:not([hidden]){
  bottom:0!important;
 }
}
@media(prefers-reduced-motion:reduce){
 #injMarketTabHead #injMarketHomeLink{transition:none!important}
}


/* MARKET · SINGLE SECTION HEADING · 31 Oct 2026
   The persistent swipeable rail is the section title. The embedded pages
   hide only their redundant header; these two native views follow suit. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #injMarketEventsOverlay:not([hidden]) .inj-events-header{
 display:none!important;
 height:0!important;min-height:0!important;
 margin:0!important;padding:0!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView.open:not([hidden]) .performance-timeline-header{
 display:none!important;
 height:0!important;min-height:0!important;
 margin:0!important;padding:0!important;
}
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView.open:not([hidden]) .entry-pnl-heading-copy>span{
 display:none!important;
}
/* Old side-navigation shell applied a separate top gap inside Performance:
   that gap is no longer needed with the unified Market rail. */
html[data-inj-page="index"][data-inj-home-tab="mercato"] body
 #performanceTimelineView.open:not([hidden]) >.performance-timeline-shell{
 padding-top:0!important;
}


/* Market · live chart price shares the same always-visible tab label. */
#injMarketTabHead .inj-market-tab-link[data-market-destination="charts"]{
  gap:8px!important;
}
#injMarketTabHead .inj-market-tab-link .inj-market-tab-price{
  display:none!important;white-space:nowrap!important;flex:0 0 auto!important;
  font-size:clamp(10px,2.5vw,12px)!important;line-height:1.1!important;
  font-weight:650!important;font-variant-numeric:tabular-nums!important;
  letter-spacing:-.02em!important;color:var(--accent,#8bdfce)!important;
}
#injMarketTabHead .inj-market-tab-link.is-active .inj-market-tab-price{
  display:inline-block!important;
}


/* Always-on INJ USD quote, anchored above the horizontally swipeable Market
   destinations so the price remains readable on every page. */
#injMarketTabHead .inj-market-kicker-row{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  box-sizing:border-box!important;
  width:100%!important;min-width:0!important;
  padding:0 max(13px,calc((100vw - 1400px)/2)) 9px!important;
  gap:6px!important;
}
#injMarketTabHead .inj-market-kicker-row .inj-market-tab-kicker{
  flex:0 1 auto!important;min-width:0!important;
  display:block!important;padding:0!important;margin:0!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  font-size:clamp(8px,2vw,10px)!important;letter-spacing:.12em!important;
}
#injMarketTabHead .inj-market-persistent-quote{
  display:inline-flex!important;align-items:baseline!important;justify-content:flex-end!important;
  flex:0 0 auto!important;max-width:63%!important;
  gap:clamp(4px,1vw,8px)!important;
  white-space:nowrap!important;font-variant-numeric:tabular-nums!important;
  font-family:var(--inj-chosen-face,var(--inj-node-terminal-font,system-ui,sans-serif))!important;
  font-size:clamp(10px,2.6vw,13px)!important;
  color:var(--text,#e8f5f2)!important;
}
#injMarketTabHead .inj-market-persistent-quote .inj-quote-symbol{
  font-size:9px!important;color:var(--muted,#a5bbb7)!important;
  letter-spacing:.05em!important;
}
#injMarketTabHead .inj-market-persistent-quote .inj-quote-value{
  font-weight:700!important;color:inherit!important;
  font-size:clamp(12px,3vw,16px)!important;letter-spacing:-.018em!important;
}
#injMarketTabHead .inj-market-persistent-quote .inj-quote-day{
  color:inherit!important;font-size:clamp(9px,2.3vw,11px)!important;
  font-weight:600!important;
}
#injMarketTabHead .inj-market-persistent-quote[data-tone="up"],
#injMarketTabHead .inj-market-tab-price[data-tone="up"]{color:var(--positive,#35d69b)!important}
#injMarketTabHead .inj-market-persistent-quote[data-tone="down"],
#injMarketTabHead .inj-market-tab-price[data-tone="down"]{color:var(--negative,#ff738b)!important}
#injMarketTabHead .inj-market-persistent-quote[data-tone="neutral"],
#injMarketTabHead .inj-market-tab-price[data-tone="neutral"]{color:var(--muted-strong,var(--text,#e8f5f2))!important}
#injMarketTabHead .inj-market-persistent-quote[data-stale="true"]{opacity:.63!important}
@media(max-width:370px){
 #injMarketTabHead .inj-market-kicker-row{padding-inline:10px!important}
 #injMarketTabHead .inj-market-persistent-quote{gap:4px!important}
 #injMarketTabHead .inj-market-persistent-quote .inj-quote-symbol{display:none!important}
 #injMarketTabHead .inj-market-kicker-row .inj-market-tab-kicker{letter-spacing:.06em!important}
}
