/* Tredye · broker gate.
   html.tredye-gated  = market dashboard page, no broker session: the page's own content is hidden and the
                        "Connect your broker" panel (#tredye-gate, from /broker/live.js) is shown instead.
                        NSE data files are never requested in this state (fetch/XHR guard in live.js).
   html.tredye-nosess = no broker session on any page: NSE-only blocks (e.g. the homepage pulse teaser) are hidden.
   html.tredye-blur   = fallback only: a connected session whose live feed was refused. */
html.tredye-gated main,html.tredye-gated #main,html.tredye-gated #main-content{display:none!important}
html.tredye-nosess:not(.tredye-sample) .tredye-nse{display:none!important}
html:not(.tredye-nosess) #tredye-gate-inline{display:none!important}
/* sample mode: room for the fixed sample banner */
/* the example-data / broker line sits above the header and scrolls away; the header sticks at the very top */
html.tredye-sample:not(.tredye-answer) body,html.tredye-bkbar body{padding-top:34px!important}

html.tredye-blur main .num,
html.tredye-blur main .tabular-nums,
html.tredye-blur main .kpi,
html.tredye-blur #mood,
html.tredye-blur #vix,
html.tredye-blur #breadth,
html.tredye-blur #flow,
html.tredye-blur #headline,
html.tredye-blur #idx,
html.tredye-blur #sectors .up,
html.tredye-blur #sectors .dn,
html.tredye-blur #idx .up,
html.tredye-blur #idx .dn,
html.tredye-blur main .tob-price,
html.tredye-blur main .tob-chg,
html.tredye-blur main .tob-panel-price,
html.tredye-blur main .tob-metrics,
html.tredye-blur main .tob-positive,
html.tredye-blur main .tob-negative,
html.tredye-blur main .tob-chart,
html.tredye-blur main .tob-card-chart,
html.tredye-blur main .tob-chart-expanded,
html.tredye-blur main .tob-zones,
html.tredye-blur main canvas{
  filter:blur(5px)!important;
  user-select:none!important;
  -webkit-user-select:none!important;
}
/* Keep chart drag/zoom from leaking readable axis values via tooltips while blurred */
html.tredye-blur main canvas,
html.tredye-blur main .tob-chart,
html.tredye-blur main .tob-card-chart,
html.tredye-blur main .tob-chart-expanded{
  pointer-events:none;
}
/* Soft veil on order-flow SVG so price/chg text in the graph is unreadable; stock names stay roughly visible under light blur of whole flow numbers via metric overlays */
html.tredye-blur main .tob-flow{
  filter:blur(3px);
  user-select:none;
}

/* ---- Never blur Crypto / Academy / Buy-me-a-coffee (not NSE cash/F&O data) ---- */
html.tredye-noblur,
html.tredye-noblur main .num,
html.tredye-noblur main .tabular-nums,
html.tredye-noblur main .kpi,
html.tredye-noblur main canvas{
  filter:none!important;
  user-select:auto!important;
  pointer-events:auto!important;
}
html.tredye-noblur #tredye-blur-hint{display:none!important}

/* Crypto widgets/cards embedded on other pages (e.g. home/pulse) stay clear */
html.tredye-blur main [data-tredye-section="crypto"],
html.tredye-blur main [data-tredye-section="crypto"] .num,
html.tredye-blur main [data-tredye-section="crypto"] .tabular-nums,
html.tredye-blur main [data-tredye-section="crypto"] canvas,
html.tredye-blur main a[href="/crypto/"] .num,
html.tredye-blur main [class*="crypto"] .num,
html.tredye-blur main [class*="crypto"] canvas{
  filter:none!important;
  user-select:auto!important;
  pointer-events:auto!important;
}

/* Buy me a coffee / chai support block — QR + button stay crisp */
html.tredye-blur main img[src*="bmc_qr"],
html.tredye-blur main img[alt*="Buy me a coffee"],
html.tredye-blur main img[alt*="buy me a coffee"],
html.tredye-blur main .sp-cup,
html.tredye-blur main [data-tredye-section="coffee"],
html.tredye-blur main [data-tredye-section="coffee"] .num,
html.tredye-blur main [data-tredye-section="coffee"] canvas{
  filter:none!important;
  user-select:auto!important;
  pointer-events:auto!important;
}

/* Hint banner */
#tredye-blur-hint{
  display:none;
  position:fixed;
  top:0;left:0;right:0;
  z-index:34;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:7px 14px;
  font:600 12.5px/1.4 var(--font-sans,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif);
  background:color-mix(in oklab,var(--warn,#b45309) 13%,var(--surface,#fff));
  color:var(--foreground,#0b0b10);
  border-bottom:1px solid color-mix(in oklab,var(--warn,#b45309) 35%,transparent);
  cursor:pointer;
  text-align:center;
}
html.tredye-blur #tredye-blur-hint{display:flex}
html.tredye-noblur #tredye-blur-hint{display:none!important}
#tredye-blur-hint b{color:var(--brand,#512feb);font-weight:600}
#tredye-blur-hint:hover{background:color-mix(in oklab,var(--warn,#b45309) 18%,var(--surface,#fff))}
/* Push sticky headers down a bit when the hint is visible so content isn't covered */
html.tredye-blur body{scroll-padding-top:40px}
html.tredye-blur header.sticky,
html.tredye-blur body>header{
  top:36px!important;
}
html.tredye-noblur header.sticky,
html.tredye-noblur body>header{
  top:0!important;
}

html.tredye-sample .tob-session{visibility:hidden!important}
