/* The home's 3D chart chapters, back to back after "A trading day": the fixed stage they render into, the ghost
   layer a leaving scene dissolves on, the light on every seam, the page-wide ombre, the copy and the labels. */
.cx { position: relative; height: calc(var(--len, 5) * 100vh); height: calc(var(--len, 5) * 100svh); }
.cx__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.cx__frame { position: absolute; inset: 0; }
/* the one fixed layer every 3D scene renders into: above the sky, below the page */
.cx-stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; visibility: hidden; }
.cx-stage__frame { position: absolute; inset: 0; overflow: hidden; will-change: opacity; }
.cx-stage__tags { position: absolute; inset: 0; }
.cx-stage__tags .cx-tags { display: none; }
.cx-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cx-no-gl .cx-stage__frame { background: radial-gradient(80% 60% at 60% 50%, rgba(242, 192, 99, .12), transparent 70%), #04050a; }
.cx-fade { display: none; }

/* copy */
.cxb { position: absolute; z-index: 4; opacity: 0; visibility: hidden; pointer-events: none; will-change: opacity, transform; }
.cxb.is-live { pointer-events: auto; }
.cxb--left, .cxb--right { top: 0; bottom: 0; width: min(560px, 42vw); display: flex; flex-direction: column; justify-content: center; padding-top: 72px; }
.cxb--left { left: max(24px, calc(50vw - 600px)); }
.cxb--right { right: max(24px, calc(50vw - 600px)); }
.cxb--low { justify-content: flex-end; padding-bottom: 9vh; width: min(760px, 70vw); }
.cxb--center { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 72px 24px 0; }
.cxb--left::before, .cxb--right::before, .cxb--center::before { content: ""; position: absolute; z-index: -1; inset: -10% -40% -10% -30%; background: radial-gradient(50% 50% at 45% 50%, rgba(4, 5, 10, .62), rgba(4, 5, 10, .22) 60%, transparent 78%); pointer-events: none; }
.cx-h { text-transform: uppercase; }
.cx-h .ml { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.cx-h .ml > span { display: inline-block; will-change: transform; }
.cxb .lead { margin-top: 18px; }

/* the session HUD */
.cx-hud { top: 96px; right: max(24px, calc(50vw - 600px)); width: 260px; padding: 14px 16px; border-radius: 14px; background: rgba(8, 10, 20, .62); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-variant-numeric: tabular-nums; }
.cx-hud__k { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--gold-1); }
.cx-hud__k i { width: 6px; height: 6px; border-radius: 50%; background: var(--dn); box-shadow: 0 0 8px var(--dn); animation: blink 1.6s ease-in-out infinite; }
.cx-hud__k time { margin-left: auto; color: var(--ink-2); font-weight: 500; letter-spacing: .08em; }
.cx-hud dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.cx-hud dt { font-size: 10px; letter-spacing: .14em; color: var(--ink-3); }
.cx-hud dd { font-size: 13px; font-weight: 600; color: var(--ink); }
.cx-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.cx-chips li { padding: 8px 13px; border-radius: 10px; font-size: 13px; color: var(--ink-2); background: rgba(8, 10, 20, .6); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cx-chips li b { margin-left: 6px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.cx-chips li.up b { color: var(--up); }

/* labels pinned to the scene */
.cx-tags { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.cx-tag { position: absolute; left: 0; top: 0; visibility: hidden; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 8px; white-space: nowrap; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: rgba(8, 10, 20, .74); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8); will-change: transform, opacity; }
.cx-tag b { color: var(--gold-1); font-variant-numeric: tabular-nums; }
.cx-tag--gold { border-color: rgba(242, 192, 99, .55); color: var(--gold-1); box-shadow: 0 0 24px -6px rgba(242, 192, 99, .55); }
.cx-tag--blue { border-color: rgba(126, 156, 232, .55); } .cx-tag--blue b { color: #c9d6ff; }
.cx-tag--violet { border-color: rgba(169, 139, 255, .55); } .cx-tag--violet b { color: #ddd2ff; }
.cx-tag--up { color: #06140d; background: var(--up); border-color: transparent; } .cx-tag--up b { color: #06140d; }
.cx-tag--dn { color: #fff; background: var(--dn); border-color: transparent; } .cx-tag--dn b { color: #fff; }
.cx-tag--entry { color: #1b1307; background: #f4ead6; border-color: transparent; } .cx-tag--entry b { color: #1b1307; }
.cx-tag--warn { border-color: rgba(242, 192, 99, .6); color: var(--gold-1); }
.cx-tag--head { gap: 10px; padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cx-tag--head b { padding: 5px 9px; border-radius: 7px; color: #1b1307; background: var(--gold-grad); }
.cx-tag--head em { font-style: normal; color: var(--ink); text-shadow: 0 0 10px rgba(0, 0, 0, .8); }
.cx-tag--head em.up { color: var(--up); } .cx-tag--head em.dn { color: var(--dn); }


/* the ghost: the scene that is leaving keeps playing here and dissolves off the one arriving underneath */
.cx-ghost { position: absolute; inset: 0; width: 100%; height: 100%; display: block; visibility: hidden; will-change: opacity; }
/* a band of light that rides every chapter seam, page or 3D: above the sky and the scenes, under the copy */
.seam { position: fixed; left: -10%; right: -10%; top: 0; height: 60vh; z-index: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(50% 50% at 50% 50%, rgba(255, 214, 140, .4), rgba(155, 123, 255, .17) 42%, rgba(80, 140, 255, .05) 62%, transparent 74%); will-change: transform, opacity; }
/* the page-wide ombre: each chapter's colours, blended by scroll position into the sky behind the page */
.ombre { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; --oa: rgba(0, 0, 0, 0); --ob: rgba(0, 0, 0, 0); --oc: rgba(0, 0, 0, 0); }
.ombre i { position: absolute; inset: -25%; animation: ombreDrift 26s ease-in-out infinite alternate; }
.ombre__a { background: radial-gradient(42% 38% at 74% 22%, var(--oa), transparent 72%); }
.ombre__b { background: radial-gradient(48% 42% at 22% 82%, var(--ob), transparent 74%); animation-duration: 32s !important; animation-direction: alternate-reverse !important; }
.ombre__c { inset: 0 !important; background: linear-gradient(180deg, var(--oc), transparent 58%); animation: none !important; }
@keyframes ombreDrift { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.08); } }
html.motion-off .ombre i { animation: none; }

/* the passport's milestones: the seal that just landed opens its line */
.cx-pass__lead { max-width: 460px; }
.cx-ms { display: grid; margin-top: 24px; max-width: 460px; }
.cx-ms li { position: relative; padding: 11px 0 11px 34px; border-top: 1px solid rgba(255, 255, 255, .08); opacity: .4; transition: opacity .5s var(--ease); }
.cx-ms li.is-done { opacity: .72; }
.cx-ms li.is-on { opacity: 1; }
.cx-ms li::before { content: ""; position: absolute; left: 0; top: 15px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed rgba(244, 234, 214, .45); transition: background .4s, box-shadow .4s, border-color .4s; }
.cx-ms li.is-done::before { border-color: transparent; background: var(--gold-grad); box-shadow: 0 0 14px rgba(242, 192, 99, .7); }
.cx-ms li.is-done::after { content: ""; position: absolute; left: 5px; top: 20px; width: 8px; height: 4px; border-left: 2px solid #1b1307; border-bottom: 2px solid #1b1307; transform: rotate(-45deg); }
.cx-ms span { margin-right: 10px; font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.cx-ms b { font-family: var(--display); font-size: 17px; font-weight: 600; }
.cx-ms p { max-height: 0; overflow: hidden; opacity: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); transition: max-height .5s var(--ease), opacity .4s, margin .5s var(--ease); }
.cx-ms li.is-on p { max-height: 5em; margin-top: 5px; opacity: 1; }

/* the validator ring */
.cx-ring { position: relative; display: grid; place-items: center; align-content: center; width: 150px; height: 150px; margin-top: 28px; text-align: center; }
.cx-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cx-ring circle { fill: none; stroke-width: 5; }
.cx-ring__track { stroke: rgba(255, 255, 255, .1); }
.cx-ring__fill { stroke: var(--gold-2); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; filter: drop-shadow(0 0 6px rgba(242, 192, 99, .8)); transition: stroke-dashoffset .5s cubic-bezier(.2, .8, .2, 1); }
.cx-ring b { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.cx-ring span { margin-top: 4px; font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.cx-ring strong { position: absolute; right: -40px; top: -8px; padding: 2px 12px; border-radius: 8px; font-family: var(--display); font-size: 22px; font-weight: 700; color: #1b1307; background: var(--gold-grad); box-shadow: 0 0 30px rgba(242, 192, 99, .7); opacity: 0; transform: scale(2.4) rotate(-14deg); filter: blur(6px); transition: opacity .3s, transform .55s cubic-bezier(.34, 1.56, .64, 1), filter .4s; }
.cx-ring.is-done strong { opacity: 1; transform: rotate(-8deg); filter: none; }

/* the order ticket */
.cx-ticket { margin-top: 26px; width: min(430px, 100%); border-radius: 16px; overflow: hidden; background: rgba(8, 10, 20, .66); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); font-variant-numeric: tabular-nums; }
.cx-ticket header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 13px; }
.cx-ticket__side { padding: 3px 8px; border-radius: 6px; font-weight: 700; color: #06140d; background: var(--up); }
.cx-ticket header span { font-weight: 600; }
.cx-ticket header em { font-style: normal; color: var(--ink-3); }
.cx-ticket__state { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: var(--gold-1); border: 1px solid rgba(242, 192, 99, .4); }
.cx-ticket__state.is-live { color: #06140d; background: var(--up); border-color: var(--up); }
.cx-ticket__state.is-hit, .cx-ticket__state.is-record { color: #1b1307; background: var(--gold-grad); border-color: transparent; box-shadow: 0 0 18px rgba(242, 192, 99, .7); }
.cx-ticket dl { display: grid; grid-template-columns: repeat(3, 1fr); }
.cx-ticket dl div { padding: 12px 16px; border-right: 1px solid rgba(255, 255, 255, .07); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.cx-ticket dl div:nth-child(3n) { border-right: 0; }
.cx-ticket dl div:nth-last-child(-n+3) { border-bottom: 0; }
.cx-ticket dt { font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.cx-ticket dd { margin-top: 4px; font-size: 14px; font-weight: 600; }
.cx-ticket dd.up, .cx-kpis dd.up { color: var(--up); } .cx-ticket dd.dn, .cx-kpis dd.dn { color: var(--dn); }

/* the hit */
.cxb--hit { left: 34%; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none !important; }
.cx-hit__k { font-size: 13px; font-weight: 700; letter-spacing: .4em; text-transform: uppercase; color: var(--up); text-shadow: 0 0 18px rgba(79, 212, 157, .6); }
.cx-hit__r { font-family: var(--display); font-size: clamp(96px, 14vw, 230px); font-weight: 700; line-height: .92; letter-spacing: -.04em; filter: drop-shadow(0 0 40px rgba(242, 192, 99, .5)); }
.cx-hit__cash { font-size: clamp(20px, 2.2vw, 30px); font-weight: 700; color: #c9ffe3; font-variant-numeric: tabular-nums; text-shadow: 0 0 20px rgba(79, 212, 157, .55); }

/* the record */
.cx-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 24px; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.cx-kpis div { padding: 14px 16px; background: rgba(8, 10, 20, .76); }
.cx-kpis dt { font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.cx-kpis dd { margin-top: 4px; font-family: var(--display); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cx-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; font-size: 13px; color: var(--ink-2); }
.cx-legend li { display: inline-flex; align-items: center; gap: 8px; }
.cx-legend i { width: 12px; height: 12px; border-radius: 3px; }
.cx-legend i.g { background: linear-gradient(180deg, #ffd27a, #c98a33); box-shadow: 0 0 10px rgba(242, 192, 99, .6); }
.cx-legend i.b { background: linear-gradient(180deg, #7e9ce8, #2b45b8); box-shadow: 0 0 10px rgba(126, 156, 232, .6); }

/* small screens: the scene sits up top, the copy below it */
@media (max-width: 900px), (max-aspect-ratio: 9/10) {
  .cxb--left, .cxb--right, .cxb--low { left: 16px; right: 16px; top: auto; bottom: 28px; width: auto; justify-content: flex-end; padding: 0; }
  .cxb--left::before, .cxb--right::before { inset: -60% -16px -28px; background: linear-gradient(180deg, transparent, rgba(4, 5, 10, .82) 36%, rgba(4, 5, 10, .94)); }
  .cxb .lead { font-size: 15px; margin-top: 12px; }
  .cx-hud { top: 78px; left: 16px; right: 16px; width: auto; }
  .cx-ring { width: 104px; height: 104px; margin-top: 14px; }
  .cx-ring b { font-size: 24px; }
  .cx-ticket { margin-top: 14px; }
  .cx-ticket dl div { padding: 9px 12px; }
  .cxb--hit { left: 0; }
  .cx-kpis { grid-template-columns: repeat(3, 1fr); }
  .cx-kpis div { padding: 9px 11px; }
  .cx-kpis dd { font-size: 17px; }
  .cx-tag { font-size: 9.5px; padding: 4px 8px; }
  .cx-pass__lead { display: none; }
  .cx-ms { margin-top: 12px; }
  .cx-ms li:not(.is-on) { display: none; }
  .cx-ms li { border-top: 0; padding-top: 6px; }
}
