@font-face { font-family: Satoshi; src: url(fonts/satoshi-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Satoshi; src: url(fonts/satoshi-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Satoshi; src: url(fonts/satoshi-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Satoshi; src: url(fonts/satoshi-900.woff2) format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --blue: #0075ED; --blue-ink: #0b4fb0; --blue-pale: #e3efff; --navy: #0b1730; --ink2: #51607a; --ink3: #8a96ab;
  --line: #e6ebf3; --paper: #ffffff; --bg: #01030a; --up: #0f9d6b; --dn: #d93a55;
  --r-card: 22px; --r-pill: 18px; --shadow: 0 14px 40px rgba(2, 10, 30, .32);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
body { font: 500 15px/1.4 Satoshi, system-ui, -apple-system, Segoe UI, sans-serif; color: var(--navy); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
#app { position: fixed; inset: 0; }
#stage { position: absolute; inset: 0; touch-action: none; }
#stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#stage canvas:active { cursor: grabbing; }
#overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
#stage::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 34%; pointer-events: none; z-index: 1; background: linear-gradient(rgba(1, 3, 10, .78), rgba(1, 3, 10, 0)); }

/* labels over the agents */
.lab { position: absolute; left: 0; top: 0; background: var(--paper); border-radius: 13px; padding: 5px 11px 6px; text-align: center; white-space: nowrap; pointer-events: auto; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 20, 60, .35); will-change: transform; }
.lab b { display: block; font-weight: 700; font-size: 13px; line-height: 1.2; }
.lab i { display: block; font-style: normal; font-size: 11px; line-height: 1.25; color: var(--ink2); }
.lab.trader i { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 8px; background: #eef1f6; color: var(--ink2); font-weight: 700; }
.lab.trader i.qualified, .lab.trader i.funded { background: var(--blue-pale); color: var(--blue-ink); }
.lab.trader i.closed { background: #fde7eb; color: var(--dn); }
.lab.open { background: rgba(255, 255, 255, .82); cursor: default; }
.lab.sel { outline: 2.5px solid var(--blue); }
.tag3 { position: absolute; left: 0; top: 0; max-width: 250px; padding: 5px 10px; border-radius: 10px; background: rgba(6, 16, 40, .92); color: #fff; font-size: 12px; font-weight: 700; white-space: normal; text-align: center; opacity: 0; transition: opacity .25s; will-change: transform; border: 1px solid rgba(255, 255, 255, .14); }
.tag3.on { opacity: 1; } .tag3.up { color: #5fe3b0; } .tag3.dn { color: #ff8da0; } .tag3.ok { color: #8cc4ff; }

/* header */
.top { position: absolute; z-index: 5; left: 0; right: 0; top: calc(14px + var(--sat)); display: flex; justify-content: center; pointer-events: none; }
.pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; background: var(--paper); border-radius: var(--r-pill); padding: 7px 8px; box-shadow: var(--shadow); text-decoration: none; color: var(--navy); }
.brand img { display: block; border-radius: 11px; height: 37px; width: auto; }
.wordmark { font-weight: 700; letter-spacing: .34em; font-size: 14px; padding-left: 6px; }
.where { font-size: 13px; color: var(--ink2); padding: 0 14px 0 10px; border-left: 1px solid var(--line); }
.act { position: absolute; right: 18px; top: 0; padding: 7px 8px 7px 18px; font-weight: 500; }
.sq { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; background: var(--blue); color: #fff; }

.title { position: absolute; z-index: 3; left: 30px; top: calc(86px + var(--sat)); color: #fff; pointer-events: none; text-shadow: 0 2px 22px rgba(0, 0, 0, .55); }
.title h1 { margin: 0; font-weight: 700; font-size: clamp(34px, 5vw, 66px); line-height: 1; letter-spacing: -.03em; }
.title p { margin: 8px 0 0 3px; font-size: clamp(14px, 1.4vw, 19px); color: #dfe9ff; }

/* the side card */
.card { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); }
.side { position: absolute; z-index: 4; right: 18px; top: calc(82px + var(--sat)); width: 318px; max-height: calc(100% - 150px - var(--sat)); display: flex; flex-direction: column; overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 10px 10px 0; }
.tabs button { padding: 8px 13px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--ink3); }
.tabs button.on { color: var(--navy); background: #f1f4f9; }
.pane { display: none; overflow: auto; padding: 8px 16px 16px; min-height: 0; overscroll-behavior: contain; }
.pane.on { display: block; }
.events { list-style: none; margin: 0; }
.events li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.35; }
.events li:first-child { border-top: 0; }
.events time { display: block; font-size: 11px; color: var(--ink3); font-weight: 700; margin-bottom: 1px; }
.events small { display: block; color: var(--ink2); font-size: 12.5px; margin-top: 2px; }
.events .up b { color: var(--up); } .events .dn b { color: var(--dn); }
.events .empty { color: var(--ink3); }
.board { width: 100%; border-collapse: collapse; font-size: 13px; }
.board th { text-align: right; font-weight: 700; color: var(--ink3); font-size: 11px; padding: 6px 4px; }
.board th:nth-child(-n+2), .board td:nth-child(-n+2) { text-align: left; }
.board td { text-align: right; padding: 9px 4px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.board tr { cursor: pointer; } .board tbody tr.sel td { background: #f1f6ff; }
.board td.up { color: var(--up); font-weight: 700; } .board td.dn { color: var(--dn); font-weight: 700; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 8px; background: #eef1f6; color: var(--ink2); font-weight: 700; font-size: 11px; }
.chip.qualified, .chip.funded { background: var(--blue-pale); color: var(--blue-ink); } .chip.closed { background: #fde7eb; color: var(--dn); }
.fine { font-size: 12px; color: var(--ink3); margin: 12px 0 0; }

.agent h3 { margin: 6px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.agent .kind { color: var(--ink2); font-size: 13px; margin: 2px 0 8px; }
.agent .blurb { font-size: 13.5px; color: var(--ink2); margin: 0 0 10px; }
.agent canvas { display: block; width: 100%; height: 96px; border-radius: 14px; background: #f3f7fe; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin: 12px 0 4px; }
.kpis div b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.kpis div span { font-size: 12px; color: var(--ink2); }
.kpis .up { color: var(--up); } .kpis .dn { color: var(--dn); }
.bar { margin-top: 10px; font-size: 12px; color: var(--ink2); } .bar div { display: flex; justify-content: space-between; }
.bar s { display: block; height: 7px; border-radius: 4px; background: #e9eef6; margin-top: 4px; overflow: hidden; text-decoration: none; }
.bar s u { display: block; height: 100%; border-radius: 4px; background: var(--blue); text-decoration: none; }
.bar.hot s u { background: var(--dn); }
.agent h4 { margin: 16px 0 4px; font-size: 15px; font-weight: 700; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; }
.rules li { background: #f1f4f9; border-radius: 10px; padding: 6px 9px; color: var(--ink2); }
.rules li b { display: block; color: var(--navy); font-size: 14px; }
.rules li.ok { background: var(--blue-pale); } .rules li.ok b { color: var(--blue-ink); }
.trades { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.trades li { padding: 7px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: baseline; }
.trades .side-tag { font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: #e4f6ee; color: var(--up); } .trades .side-tag.sell { background: #fde7eb; color: var(--dn); }
.trades em { grid-column: 1 / -1; font-style: normal; color: var(--ink2); }
.agent .now { font-size: 13.5px; padding: 9px 11px; border-radius: 12px; background: #f1f4f9; margin: 10px 0 0; }
.agent .back { margin-top: 14px; font-weight: 700; color: var(--blue); font-size: 13px; padding: 4px 0; }

/* foot */
.foot { position: absolute; z-index: 4; left: 22px; bottom: calc(16px + var(--sab)); display: flex; align-items: center; gap: 14px; }
.zoom { display: flex; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.zoom button { width: 42px; height: 40px; font-size: 22px; font-weight: 500; line-height: 1; }
.zoom button + button { border-left: 1px solid var(--line); }
#status { margin: 0; color: #cfdcf5; font-size: 13px; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
#status.off { color: #ffb3bf; }

.about { position: absolute; inset: 0; z-index: 9; background: rgba(1, 4, 14, .62); display: grid; place-items: center; padding: 18px; }
.about[hidden] { display: none; }
.about .card { max-width: 520px; padding: 26px 26px 22px; max-height: 100%; overflow: auto; }
.about h2 { margin: 0 0 12px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.about p { margin: 0 0 11px; color: var(--ink2); font-size: 15px; } .about p b { color: var(--navy); }
.about .act { position: static; margin-top: 8px; background: var(--blue); color: #fff; padding: 11px 20px; box-shadow: none; font-weight: 700; }

.loading { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: var(--bg); color: #cfdcf5; transition: opacity .5s; }
.loading.off { opacity: 0; pointer-events: none; }

/* phone */
@media (max-width: 900px) {
  #stage { bottom: auto; height: 54%; }
  .top { top: calc(10px + var(--sat)); justify-content: flex-start; padding: 0 12px; }
  .where { display: none; } .wordmark { font-size: 12px; letter-spacing: .28em; padding-right: 10px; }
  .brand img { height: 32px; } .sq { width: 32px; height: 32px; }
  .act { right: 12px; padding: 6px; } .act > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .title { left: 16px; top: calc(62px + var(--sat)); } .title h1 { font-size: 30px; } .title p { display: none; }
  .side { left: 0; right: 0; top: 54%; bottom: 0; width: auto; max-height: none; border-radius: 22px 22px 0 0; padding-bottom: var(--sab); }
  .tabs button { padding: 10px 14px; min-height: 44px; }
  .foot { left: 12px; bottom: calc(46% + 10px); gap: 10px; } #status { font-size: 11.5px; max-width: 56vw; }
  .zoom button { width: 44px; height: 44px; }
  .lab { padding: 3px 8px 4px; border-radius: 10px; } .lab b { font-size: 11px; } .lab i { font-size: 9.5px; } .lab.role i { display: none; }
  .tag3 { font-size: 11px; max-width: 170px; }
  .about .card { padding: 20px; } .about h2 { font-size: 23px; }
}

/* inside the landing page (floor.html?embed): the 3D view only */
.embed .top, .embed .title, .embed .side, .embed .foot, .embed .about { display: none !important; }
.embed #stage { height: 100% !important; bottom: 0; pointer-events: none; }
.embed #stage::after { height: 12%; }
.embed .lab { pointer-events: none; }
