/* Tredye crypto & gold derivatives page. Colours, type and radii come from the Tredye design tokens;
   the page follows the site light/dark theme. */
.cfx{color:var(--foreground);font:13.5px/1.5 var(--font-sans)}
.cfx *{box-sizing:border-box}
.cfx-hero{background-color:var(--surface);background-image:var(--surface-sheen);box-shadow:var(--shadow-card),var(--shadow-glow);border-radius:var(--radius-xl);padding:22px 24px;display:flex;flex-wrap:wrap;gap:18px;align-items:flex-end;justify-content:space-between}
.cfx-kicker{font:600 12px/16px var(--font-sans);letter-spacing:.08em;color:var(--brand);text-transform:uppercase}
.cfx-panel .cfx-kicker{color:var(--subtle-foreground)}
.cfx h1{font:600 26px/1.2 var(--font-heading);letter-spacing:-.022em;margin:2px 0 4px;color:var(--foreground)}
.cfx-sub{color:var(--muted-foreground);font-size:12px;max-width:720px}
.cfx-assets{display:flex;gap:8px;flex-wrap:wrap}
.cfx-asset{min-width:148px;text-align:left;background:var(--surface-2);box-shadow:var(--shadow-control);border:0;border-radius:var(--radius);padding:9px 12px;color:var(--foreground);cursor:pointer;font-family:var(--font-sans);transition:box-shadow .15s,background-color .15s}
.cfx-asset:hover{box-shadow:var(--shadow-control),0 0 0 1px var(--spotlight-border)}
.cfx-asset b{display:block;font:600 13.5px var(--font-sans);letter-spacing:.04em}
.cfx-asset span{font:500 12px var(--font-num);font-variant-numeric:tabular-nums;color:var(--foreground-secondary)}
.cfx-asset.is-on{background:var(--brand-tint);box-shadow:0 0 0 1.5px var(--brand)}
.cfx-asset:focus-visible,.cfx-tab:focus-visible,.cfx-btn:focus-visible,.cfx-nse-btn:focus-visible,.cfx-nse-ghost:focus-visible,.cfx-nse-grid a:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
.cfx-tabs{display:inline-flex;gap:2px;flex-wrap:wrap;margin:14px 0;padding:3px;border-radius:var(--radius);background:var(--surface-3);max-width:100%;overflow-x:auto}
.cfx-tab{border:0;background:transparent;color:var(--muted-foreground);border-radius:8px;height:30px;padding:0 12px;font:500 13.5px var(--font-sans);cursor:pointer;white-space:nowrap;transition:color .15s}
.cfx-tab:hover{color:var(--foreground)}
.cfx-tab.is-on{background:var(--surface);color:var(--foreground);box-shadow:var(--shadow-control)}
.cfx-panel{background-color:var(--surface);background-image:var(--surface-sheen);box-shadow:var(--shadow-card);border-radius:var(--radius-xl);padding:20px 22px;margin-bottom:14px}
.cfx-panel h2{font:600 17px/1.3 var(--font-heading);letter-spacing:-.012em;margin:2px 0 10px}
.cfx-panel h3{font:600 13.5px var(--font-sans);margin:16px 0 8px;color:var(--foreground-secondary)}
.cfx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.cfx-m{padding:10px 12px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);min-width:0}
.cfx-m small{display:block;color:var(--muted-foreground);font-size:12px}
.cfx-m b{font:600 13.5px/1.6 var(--font-num);font-variant-numeric:tabular-nums;color:var(--foreground);word-break:break-word}
.cfx-m em{display:block;font-style:normal;font-size:12px;color:var(--subtle-foreground)}
.cfx-up{color:var(--up)!important}.cfx-dn{color:var(--down)!important}.cfx-mu{color:var(--muted-foreground)}
.cfx-note{color:var(--muted-foreground);font-size:12px;margin-top:10px}
.cfx-note a,.cfx-nse-legal a,.cfx-disc a{color:var(--brand)}
.cfx-tbl{width:100%;border-collapse:collapse;font:500 12px var(--font-num);font-variant-numeric:tabular-nums}
.cfx-tbl th{color:var(--subtle-foreground);font:600 12px/16px var(--font-sans);letter-spacing:.06em;text-transform:uppercase;text-align:right;padding:6px 8px;border-bottom:1px solid var(--border);white-space:nowrap}
.cfx-tbl td{text-align:right;padding:6px 8px;border-bottom:1px solid var(--hairline-strong);white-space:nowrap;color:var(--foreground)}
.cfx-tbl th:first-child,.cfx-tbl td:first-child{text-align:left}
.cfx-tbl td:first-child{font-family:var(--font-sans);font-weight:600}
.cfx-scroll{overflow-x:auto}
.cfx-chart{width:100%;height:auto;display:block;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--border);border-radius:var(--radius-md)}
.cfx-chart text{font:500 12px var(--font-num);fill:var(--chart-axis)}
.cfx-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.cfx-row{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.cfx-row label{display:flex;flex-direction:column;font-size:12px;color:var(--muted-foreground);gap:3px}
.cfx-row select,.cfx-row input{height:34px;background:var(--surface-2);color:var(--foreground);border:0;box-shadow:var(--shadow-inset);border-radius:var(--radius);padding:0 8px;min-width:90px;font:500 13.5px var(--font-sans)}
.cfx-row select:focus-visible,.cfx-row input:focus-visible{outline:2px solid var(--ring);outline-offset:1px}
.cfx-btn{height:34px;padding:0 16px;border-radius:var(--radius);background:var(--brand);color:var(--brand-foreground,#fff);border:0;font:600 13.5px var(--font-sans);cursor:pointer}
.cfx-btn:hover{filter:brightness(1.06)}
.cfx-btn:disabled{opacity:.5;cursor:default}
.cfx-pill{display:inline-flex;align-items:center;height:20px;font:600 12px var(--font-sans);background:var(--brand-tint);color:var(--brand);border-radius:999px;padding:0 8px;margin-left:6px;vertical-align:middle}
.cfx-loading{color:var(--muted-foreground);padding:20px 0}
.cfx-live{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.cfx-lv{background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--border);border-radius:var(--radius);padding:10px 12px}
.cfx-lv .bar{height:8px;border-radius:4px;background:var(--down);overflow:hidden;margin:6px 0}
.cfx-lv .bar i{display:block;height:100%;background:var(--up-bright)}
.cfx-disc{font-size:12px;color:var(--muted-foreground);background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--border);border-radius:var(--radius);padding:8px 12px;margin-top:12px}
@media(max-width:760px){.cfx-two{grid-template-columns:1fr}.cfx-hero{padding:16px}.cfx h1{font-size:20px}.cfx-asset{min-width:0;flex:1 1 30%}.cfx-panel{padding:14px 12px}.cfx-grid{grid-template-columns:1fr 1fr}}

.tob-forming-note{display:block;font-size:12px;letter-spacing:.3px;opacity:.9;margin-top:2px}

.tob-panel-title{white-space:normal;overflow-wrap:anywhere}

@keyframes tob-ob-fade{to{opacity:0}}
g.tob-zone-fade,rect.tob-zone-fade{animation:tob-ob-fade 2s ease forwards}
@media(prefers-reduced-motion:reduce){g.tob-zone-fade,rect.tob-zone-fade{animation:none;opacity:.35}}
/* crypto-first home: secondary NSE section */
.cfx-nse{display:block;max-width:1800px;margin:8px auto 28px;padding:0 12px}
@media (min-width:640px){.cfx-nse{padding:0 24px}}
.cfx-nse-in{background-color:var(--surface);background-image:var(--surface-sheen);box-shadow:var(--shadow-card);border-radius:var(--radius-xl);padding:20px 22px}
.cfx-nse h2{font:600 20px/1.3 var(--font-heading);letter-spacing:-.012em;margin:2px 0 6px}
.cfx-nse-head{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end;justify-content:space-between}
.cfx-nse-cta{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.cfx-nse-btn{background:var(--brand);color:var(--brand-foreground,#fff);border:0;border-radius:var(--radius);padding:9px 16px;font:600 13.5px var(--font-sans);cursor:pointer}
.cfx-nse-btn:hover{filter:brightness(1.06)}
.cfx-nse-ghost{background:var(--surface);color:var(--foreground);box-shadow:var(--shadow-control);border-radius:var(--radius);padding:9px 14px;text-decoration:none;font:500 13.5px var(--font-sans)}
.cfx-nse-ghost:hover{box-shadow:var(--shadow-control),0 0 0 1px var(--spotlight-border)}
.cfx-nse-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px;margin-top:16px}
.cfx-nse-grid a{display:block;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--border);border-radius:var(--radius);padding:11px 13px;color:var(--foreground);text-decoration:none;transition:box-shadow .15s}
.cfx-nse-grid a:hover{box-shadow:inset 0 0 0 1px var(--spotlight-border),var(--shadow-card)}
.cfx-nse-grid b{display:block;font:600 13.5px var(--font-sans)}
.cfx-nse-grid span{display:block;color:var(--muted-foreground);font-size:12px;margin-top:2px}
.cfx-nse-legal{color:var(--muted-foreground);font-size:12px;margin:14px 0 0;line-height:1.55}
.cfx-nse-legal b{color:var(--foreground);font-weight:600}
@media (max-width:1023px){header nav .cfx-sep{display:none!important}}
/* mobile navigation sheet on the crypto pages */
.cfx-menu{position:fixed;top:56px;left:8px;z-index:60;background-color:var(--popover);background-image:var(--surface-sheen);box-shadow:var(--shadow-pop);border-radius:var(--radius-xl);padding:8px;min-width:220px;max-height:calc(100dvh - 72px);overflow:auto;font-family:var(--font-sans)}
.cfx-menu-h{display:block;padding:10px 12px 4px;color:var(--subtle-foreground);font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.cfx-menu-a{display:block;padding:8px 12px;color:var(--foreground);text-decoration:none;border-radius:8px;font-size:13.5px;font-weight:500}
.cfx-menu-a:hover{background:var(--fill)}
.cfx-menu-a.is-on{background:var(--brand-tint);color:var(--brand);font-weight:600}
/* Order blocks now strip (BTC, ETH, gold), above the dashboard tabs */
.obx{margin-top:14px;background-color:var(--surface);background-image:var(--surface-sheen);box-shadow:var(--shadow-card);border-radius:var(--radius-xl);padding:18px 20px}
.obx[hidden]{display:none}
.obx h2{font:600 20px/1.25 var(--font-heading);letter-spacing:-.022em;margin:2px 0 4px;color:var(--foreground)}
.obx-key{display:inline-flex;align-items:center;gap:5px;margin-right:8px;font-weight:600;white-space:nowrap}
.obx-key.obx-fk{white-space:normal;font-weight:500}
.obx-key.obx-buy{color:var(--up)}
.obx-key.obx-sell{color:var(--down)}
.obx-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--muted-foreground);flex:none}
.obx-buy .obx-dot{background:var(--up-bright)}
.obx-sell .obx-dot{background:var(--down)}
.obx-fk .obx-dot{background:none;box-shadow:none;border:1.5px dashed var(--muted-foreground)}
.obx-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.obx-card{background:var(--surface-2);border-radius:var(--radius-md);box-shadow:inset 0 0 0 1px var(--hairline);padding:12px;min-width:0;display:flex;flex-direction:column;gap:6px}
.obx-card header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.obx-card header b{display:block;font:600 13.5px var(--font-sans);color:var(--foreground)}
.obx-inst{display:block;font:500 12px var(--font-mono);color:var(--subtle-foreground)}
.obx-price{text-align:right;font:600 15px var(--font-num);font-variant-numeric:tabular-nums;color:var(--foreground)}
.obx-price em{display:block;font:500 12px var(--font-num);font-style:normal}
.obx-chart svg{display:block;width:100%;height:auto}
.obx-chart .obx-ltp{font:600 12px var(--font-num);font-variant-numeric:tabular-nums}
.obx-chart .obx-ar{font:700 12px var(--font-sans);pointer-events:none}
.obx-empty{height:150px;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--muted-foreground);font-size:12px}
.obx-row{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;font-size:12px;padding:6px 8px;border-radius:var(--radius-md);background:color-mix(in oklab,var(--up) 7%,var(--surface))}
.obx-row.obx-sell{background:color-mix(in oklab,var(--down) 7%,var(--surface))}
.obx-row.is-none{background:var(--surface);color:var(--muted-foreground)}
.obx-row.is-forming{box-shadow:inset 0 0 0 1px color-mix(in oklab,var(--muted-foreground) 45%,transparent)}
.obx-row b{font-weight:600;color:var(--foreground)}
.obx-row.obx-buy b{color:var(--up)}
.obx-row.obx-sell b{color:var(--down)}
.obx-row.is-none b{color:var(--muted-foreground)}
.obx-px{font:600 12px var(--font-num);font-variant-numeric:tabular-nums;color:var(--foreground)}
.obx-st{color:var(--muted-foreground);font-size:12px}
.obx-also{flex-basis:100%}
.obx-go{align-self:flex-start;margin-top:2px;background:var(--surface);color:var(--foreground);box-shadow:var(--shadow-control);border:0;border-radius:var(--radius);padding:7px 12px;font:500 12px var(--font-sans);cursor:pointer}
.obx-go:hover{box-shadow:var(--shadow-control),0 0 0 1px var(--spotlight-border)}
.obx-go:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
@keyframes obx-pulse{0%,100%{opacity:.35}50%{opacity:1}}
@keyframes obx-dash{to{stroke-dashoffset:-14}}
.obx.is-onscreen .obx-bub.is-forming .obx-halo{animation:obx-pulse 1.6s ease-in-out infinite}
.obx.is-onscreen .obx-zone.is-forming{animation:obx-dash 1.2s linear infinite}
.obx.obx-still .obx-halo,.obx.obx-still .obx-zone{animation:none!important}
@media(max-width:900px){.obx-grid{grid-template-columns:minmax(0,1fr)}.obx{padding:14px}}
/* static crypto F&O pages: theme button wired by theme-toggle.js, shown on phones too */
header .ty-theme-btn{display:inline-flex!important}
header .ty-theme-btn svg *{transition:transform .25s ease,opacity .25s ease}
html[data-motion="reduced"] header .ty-theme-btn svg *{transition:none}
/* phones: room at the bottom so the floating Connect broker pill and Help button never cover the last cards */
@media(max-width:640px){
  #main{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
  .obx-card,.cfx-panel,.tob-card{scroll-margin-bottom:96px}
}
/* gold spot reference in the order-block strip */
.obx-price em.obx-spot{color:var(--muted-foreground)}
.obx-gref{font-size:12px;line-height:1.45;color:var(--muted-foreground);padding:6px 8px;border-radius:var(--radius-md);background:var(--surface)}
.obx-gref b{font:600 12px var(--font-num);font-variant-numeric:tabular-nums;color:var(--foreground)}
.obx-gref.is-gap{background:color-mix(in oklab,var(--warn) 8%,var(--surface));box-shadow:inset 0 0 0 1px color-mix(in oklab,var(--warn) 28%,transparent)}
/* Part B: 44 px tap targets on phones */
@media (max-width:767px){.cfx-tab,.cfx-nse-btn,.cfx-nse-ghost,#cfh-motion,.cfh-seg button{min-height:44px}.cfx-tab,.cfx-nse-ghost{display:inline-flex;align-items:center}body>div.relative>footer a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}}
