/* Demand Call Market - the exchange's public page. Same look as the brokerage app (web/style.css):
   its colours, panels, chips and type are copied here because this site is served from its own folder. */

:root {
  --bg: #0a0d12;
  --bg-2: #0d1117;
  --panel: #11161e;
  --panel-2: #161c26;
  --line: #1e2631;
  --line-2: #2a3442;
  --text: #e7ecf2;
  --text-2: #b3bdca;
  --muted: #8592a3;
  --faint: #5e6a7b;
  --buy: #27c07d;
  --buy-text: #5fe0a4;
  --buy-dim: rgba(39, 192, 125, 0.17);
  --sell: #f0525a;
  --sell-text: #ff8a90;
  --sell-dim: rgba(240, 82, 90, 0.17);
  --live: #f2b33d;
  --live-text: #f5c86e;
  --live-dim: rgba(242, 179, 61, 0.14);
  --accent: #4f8ff7;
  --accent-text: #a9c8ff;
  --accent-dim: rgba(79, 143, 247, 0.17);
  --radius: 10px;
  --pad-x: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
b { font-weight: 650; }
.muted { color: var(--muted); }
.buy { color: var(--buy-text); }
.sell { color: var(--sell-text); }
.num { text-align: right; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--panel-2); color: var(--text);
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: #1c2430; border-color: #364254; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #5d99fb; border-color: #5d99fb; }
.btn:focus-visible, .row-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap; background: rgba(255,255,255,.07); color: var(--text-2);
}
.out-UnderwriterWon { background: rgba(231,236,242,.11); color: var(--text); }
.out-NaturalsStand { background: var(--accent-dim); color: var(--accent-text); }
.out-HostRequirementNotMet, .out-CapExpired { background: var(--live-dim); color: var(--live-text); }
.out-FilledHostToHost { background: rgba(63,201,193,.15); color: #7fe3dc; }
.chip.early { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }

.spinner {
  display: inline-block; width: 12px; height: 12px; flex: none;
  border: 2px solid rgba(255,255,255,.18); border-top-color: currentColor; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------- top bar ---------- */
.top-sticky { position: sticky; top: 0; z-index: 20; background: var(--bg); padding-top: env(safe-area-inset-top); }
.topbar {
  min-height: 56px; padding: 0 var(--pad-x); display: flex; align-items: center; gap: 18px;
  background: #0c1016; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: none; }
.mark { width: 24px; height: 24px; flex: none; }
.wordmark { font-size: 15px; font-weight: 700; letter-spacing: .005em; white-space: nowrap; }
.brand-sub {
  padding-left: 10px; border-left: 1px solid var(--line-2); line-height: 16px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.badge-demo {
  font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 6px 2px; border-radius: 4px; background: var(--text); color: var(--bg); line-height: 1.2;
}
.topbar-right { display: flex; align-items: center; gap: 18px; flex: none; margin-left: auto; }
.tape { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.tape-label { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.tape-clock { font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.tape-tz { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.conn { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.conn .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--sell); box-shadow: 0 0 0 3px rgba(240,82,90,.18); }
.conn[data-state="ok"] .dot { background: var(--buy); box-shadow: 0 0 0 3px rgba(39,192,125,.18); }
.conn[data-state="warn"] .dot { background: var(--live); box-shadow: 0 0 0 3px rgba(242,179,61,.18); }
.conn[data-state="bad"] .dot { animation: pulse 1.2s ease-in-out infinite; }

.banner {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px;
  background: var(--live-dim); color: var(--live-text); font-size: 12.5px; border-bottom: 1px solid rgba(242,179,61,.28);
}

/* ---------- page ---------- */
.floor { max-width: 1760px; margin: 0 auto; padding: 0 var(--pad-x) 8px; }
.intro { margin: 0; padding: 16px 0 18px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.intro b { color: var(--text); font-weight: 650; }

.sect-head, .panel-head { display: flex; align-items: center; gap: 10px; min-height: 22px; }
.sect-head { margin-bottom: 10px; }
.panel-head { justify-content: space-between; margin-bottom: 12px; }
.sect-head h2, .panel-head h2 {
  margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.panel-meta { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.sect-head .panel-meta { margin-left: auto; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 16px; min-width: 0;
}
.empty-cell { color: var(--faint); text-align: center !important; padding: 16px 0 !important; white-space: normal !important; }

.lower { display: grid; gap: 16px; margin-top: 22px; grid-template-columns: minmax(360px, .78fr) minmax(0, 1.4fr); align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.footer { max-width: 980px; margin: 0 auto; padding: 22px var(--pad-x) calc(30px + env(safe-area-inset-bottom)); text-align: center; font-size: 11.5px; line-height: 1.55; color: var(--faint); }
.footer p { margin: 0 0 4px; }
.footer p:empty { display: none; }
.footer .foot-demo { color: var(--muted); }

/* ---------- live calls board ---------- */
.board-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--live); color: #1d1404; font-size: 11.5px; font-weight: 800;
}
.board-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.board-grid:empty { display: none; }
.board-empty {
  display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 148px; padding: 22px;
  border: 1px dashed var(--line-2); border-radius: 12px; background: rgba(17,22,30,.55);
  color: var(--muted); font-size: 14.5px; line-height: 1.5; text-align: left;
}
.board-empty p { margin: 0; max-width: 520px; }
.board-empty b { color: var(--text-2); font-weight: 650; }
.empty-ring { width: 54px; height: 54px; flex: none; }
.empty-ring circle { fill: none; stroke: var(--line-2); stroke-width: 6; stroke-dasharray: 4 9; }

.call-card {
  position: relative; container-type: inline-size; min-width: 0;
  display: flex; flex-direction: column;
  padding: 15px 18px 16px; border-radius: 12px;
  border: 1px solid rgba(242,179,61,.5);
  background: linear-gradient(180deg, rgba(242,179,61,.105), rgba(242,179,61,.03) 58%, var(--panel));
  transition: border-color .35s, background .35s, opacity .45s, transform .45s;
}
.call-card[data-state="done"] {
  border-color: rgba(79,143,247,.42);
  background: linear-gradient(180deg, rgba(79,143,247,.10), rgba(79,143,247,.025) 58%, var(--panel));
}
.call-card.entering { animation: card-in .5s ease-out; }
.call-card.leaving { opacity: 0; transform: scale(.985); }
@keyframes card-in {
  0% { opacity: 0; transform: translateY(6px); box-shadow: 0 0 0 0 rgba(242,179,61,0); }
  45% { opacity: 1; transform: none; box-shadow: 0 0 0 4px rgba(242,179,61,.22); }
  100% { box-shadow: 0 0 0 0 rgba(242,179,61,0); }
}

.cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cc-title { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.cc-sym { font-size: 19px; font-weight: 800; letter-spacing: .04em; line-height: 1.2; }
.cc-name { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-chips { display: flex; align-items: center; gap: 6px; flex: none; }
.cc-state {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; border-radius: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.call-card[data-state="live"] .cc-state { background: var(--live); color: #1d1404; }
.call-card[data-state="live"] .cc-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1d1404; animation: pulse 1s ease-in-out infinite; }
.call-card[data-state="auction"] .cc-state { background: transparent; color: var(--live-text); box-shadow: inset 0 0 0 1px var(--live); animation: pulse .9s ease-in-out infinite; }
.call-card[data-state="done"] .cc-state { background: var(--accent-dim); color: var(--accent-text); }
.cc-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-sub b { color: var(--text-2); font-weight: 650; }

.cc-body {
  --ring: clamp(108px, 31cqi, 150px);
  display: grid; grid-template-columns: var(--ring) minmax(0, 1fr); align-items: center;
  column-gap: clamp(14px, 5cqi, 26px); row-gap: 14px; margin-top: 14px;
}

.ring { position: relative; width: var(--ring); height: var(--ring); }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: rgba(255,255,255,.075); stroke-width: 6; }
.ring-bar { fill: none; stroke: var(--live); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 339.292; stroke-dashoffset: 0; }
.call-card[data-state="auction"] .ring-bar { animation: pulse .9s ease-in-out infinite; }
.call-card[data-state="done"] .ring-bar { stroke: var(--accent); transition: stroke .35s; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-label { font-size: max(9.5px, calc(var(--ring) * .068)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ring-val { margin-top: 2px; font-family: var(--mono); font-size: calc(var(--ring) * .25); font-weight: 700; line-height: 1.05; color: var(--live-text); white-space: nowrap; }
.ring-val[data-len="5"] { font-size: calc(var(--ring) * .21); }
.ring-val[data-len="6"] { font-size: calc(var(--ring) * .18); }
.ring-val[data-len="7"], .ring-val[data-len="8"] { font-size: calc(var(--ring) * .155); }
.call-card[data-state="auction"] .ring-val { font-family: var(--font); }
.call-card[data-state="done"] .ring-val { font-family: var(--font); color: var(--text); font-weight: 700; }

.cc-main { min-width: 0; }
.cc-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.cc-big { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; }
.cc-num {
  font-size: clamp(36px, 11.5cqi, 58px); font-weight: 700; line-height: 1.08; letter-spacing: -.02em;
  color: var(--text); white-space: nowrap;
}
.cc-num[data-len="long"] { font-size: clamp(30px, 9cqi, 50px); }
.cc-num.bump { animation: bump 1s ease-out; }
@keyframes bump {
  0% { color: var(--live-text); text-shadow: 0 0 22px rgba(242,179,61,.6); }
  100% { color: var(--text); text-shadow: 0 0 0 rgba(242,179,61,0); }
}
.cc-delta { font-size: 15px; font-weight: 700; color: var(--live-text); opacity: 0; white-space: nowrap; }
.cc-delta.show { animation: delta 1.8s ease-out forwards; }
@keyframes delta {
  0% { opacity: 0; transform: translateY(5px); }
  14% { opacity: 1; transform: none; }
  72% { opacity: 1; }
  100% { opacity: 0; }
}
.cc-unit { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.cc-unit b { color: var(--text-2); }
.cc-line { margin-top: 9px; padding: 6px 9px; border-radius: 7px; background: rgba(242,179,61,.10); color: var(--live-text); font-size: 13px; line-height: 1.4; }
.cc-line b { color: var(--text); }

.cc-aside { grid-column: 1 / -1; min-width: 0; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.07); }
.cc-note { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.cc-note svg { width: 16px; height: 16px; flex: none; color: var(--live-text); }
.call-card[data-state="done"] .cc-note svg { color: var(--accent-text); }
.steps { display: none; list-style: none; margin: 0 0 14px; padding: 0; counter-reset: step; }
.step { position: relative; padding: 0 0 0 31px; margin-bottom: 11px; font-size: 12.5px; line-height: 1.35; color: var(--faint); }
.step:last-child { margin-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--faint);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.step b { display: block; font-size: 13.5px; font-weight: 650; color: var(--muted); }
.step.on b { color: var(--live-text); }
.step.on::before { background: var(--live); color: #1d1404; box-shadow: none; }
.step.past::before { content: "\2713"; background: rgba(242,179,61,.16); color: var(--live-text); box-shadow: none; }
.step.past b { color: var(--text-2); }

/* the result, on a finished call */
.cc-outcome { margin: 0 0 10px; font-size: 14px; font-weight: 650; line-height: 1.4; color: var(--text); }
.cc-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.cc-kpis div { min-width: 0; padding: 7px 10px; border-radius: 8px; background: rgba(10,13,18,.55); border: 1px solid var(--line); }
.cc-kpis dt { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.cc-kpis dd { margin: 1px 0 0; font-size: 17px; font-weight: 700; white-space: nowrap; }
.legs-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.06); }
.legs-bar span { display: block; height: 100%; min-width: 3px; }
.legs-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-2); }
.legs-list b { color: var(--text); }
.legs-list .leg-px { color: var(--muted); }
.legs-none { margin: 0; font-size: 12.5px; color: var(--muted); }
.cc-who { margin: 9px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.cc-who b { color: var(--text-2); font-weight: 650; }

@container (min-width: 560px) {
  .cc-body { --ring: clamp(140px, 19cqi, 196px); grid-template-columns: var(--ring) minmax(0, 1fr) minmax(0, 1.08fr); column-gap: clamp(18px, 3.4cqi, 40px); }
  .cc-num { font-size: clamp(44px, 7.6cqi, 84px); }
  .cc-num[data-len="long"] { font-size: clamp(36px, 6cqi, 68px); }
  .cc-aside {
    grid-column: auto; align-self: stretch; display: flex; flex-direction: column; justify-content: center;
    padding: 2px 0 2px clamp(16px, 3cqi, 30px); border-top: 0; border-left: 1px solid rgba(255,255,255,.08);
  }
  .steps { display: block; }
  .cc-label { font-size: 14px; }
  .cc-unit { font-size: 13px; }
}

/* sources of the Host's fills (same colours as the brokerage app) */
.src { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--muted); }
.src-naturals, .lb-naturals { background: #7fb2ff; }
.src-sweep, .lb-sweep { background: #a7b0bc; }
.src-underwriter, .lb-underwriter { background: var(--live); }
.src-reverse-slippage, .lb-reverse-slippage { background: #b993ff; }
.src-host-to-host, .lb-host-to-host { background: #3fc9c1; }

/* ---------- stocks ---------- */
.stocks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.tile {
  min-width: 0; padding: 14px 16px 13px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); transition: border-color .3s;
}
.tile[data-live="true"] { border-color: rgba(242,179,61,.45); }
.tile-head { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 24px; }
.sym { font-size: 15px; letter-spacing: .04em; color: var(--text); font-weight: 800; }
.sym-name { min-width: 0; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-flags { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.tile-live {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--live); color: #1d1404; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap;
}
.tile-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1d1404; animation: pulse 1s ease-in-out infinite; }
.qstate { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: var(--live-dim); color: var(--live-text); white-space: nowrap; }
.tile-quote { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; margin-top: 10px; }
.q-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin-bottom: 1px; }
.tq-px { font-size: 27px; line-height: 1.1; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.tq-bid .tq-px { color: var(--buy-text); }
.tq-ask { text-align: right; }
.tq-ask .tq-px { color: var(--sell-text); }
.tq-sz { font-size: 12.5px; color: var(--text-2); margin-top: 1px; white-space: nowrap; }
.tq-mid { text-align: center; padding-bottom: 2px; }
.tq-midpx { font-size: 17px; font-weight: 600; white-space: nowrap; }
.tq-spread { font-size: 11px; color: var(--faint); margin-top: 1px; white-space: nowrap; }
.spark { display: block; width: 100%; height: 44px; margin-top: 11px; overflow: visible; }
.spark-line { fill: none; stroke: #d3dce8; stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: rgba(201,214,232,.08); stroke: none; }
.spark-bands rect { fill: rgba(242,179,61,.16); }
.spark-axis { display: flex; justify-content: space-between; margin-top: 3px; font-size: 10.5px; color: var(--faint); }
.tile-signal { margin-top: 11px; padding: 9px 11px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.sig-title { margin-bottom: 3px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.sig-text { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.sig-text b { color: var(--text); }
.sig-text b.sell { color: var(--sell-text); }
.sig-text b.buy { color: var(--buy-text); }
.tile-signal[data-avail="false"] { border-color: rgba(242,179,61,.28); }
.tile-signal[data-avail="false"] .sig-text { color: var(--live-text); }
.tile-replay { margin: 9px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--faint); }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  padding: 6px 6px; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: bottom;
}
.tbl th.num { text-align: right; }
.tbl td { padding: 7px 6px; border-bottom: 1px solid rgba(255,255,255,.045); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td:first-child, .tbl th:first-child { padding-left: 0; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }
.tbl .t-time { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.tbl .t-sym { font-weight: 800; letter-spacing: .03em; font-size: 12.5px; }
.tbl th .s { display: none; }
@keyframes fresh { from { background: rgba(79,143,247,.16); } to { background: rgba(79,143,247,0); } }
.tbl tr.fresh > td { animation: fresh 2.6s ease-out; }

/* recent results */
.p-results { container-type: inline-size; }
.results th { white-space: normal; line-height: 1.25; }
.results tr.r { cursor: pointer; }
.results tr.r:hover > td { background: rgba(255,255,255,.025); }
.results tr.r.open > td { border-bottom-color: transparent; }
.results .t-out .chip + .chip { margin-left: 5px; }
.row-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; border-radius: 4px; background: none;
  color: var(--text-2); font-size: 12.5px; font-weight: 650; cursor: pointer;
}
.row-btn:hover { color: var(--text); }
.caret { width: 6px; height: 6px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(45deg) translate(-1px, -1px); transition: transform .15s; }
tr.open .caret { transform: rotate(225deg) translate(-1px, -1px); }
.mix { display: flex; gap: 1px; width: 64px; height: 3px; margin: 3px 0 0 auto; border-radius: 2px; overflow: hidden; background: rgba(255,255,255,.06); }
.mix span { display: block; height: 100%; }
.results td.t-sh { padding-top: 6px; padding-bottom: 5px; }
.results tr.detail > td { padding: 2px 0 16px; white-space: normal; border-bottom: 1px solid var(--line); }
.rd { padding: 12px 14px 4px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.rd-line { margin: 0 0 10px; line-height: 1.55; color: var(--muted); }
.rd-line b { color: var(--text); }
.rd-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; margin-bottom: 10px; }
.rd-sub { margin: 0 0 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.rd .tbl { font-size: 12.5px; }
.rd .tbl td { padding: 4px 6px; }
.rd .tbl tr.tot td { font-weight: 700; border-top: 1px solid var(--line-2); }
.leg-call { margin-left: 6px; font-size: 11px; color: var(--faint); font-family: var(--mono); }
.rd-sub-who { margin-top: 12px; }
.rd-more { margin: 6px 0 0; font-size: 12px; }
.rd-link { color: var(--accent-text); text-decoration: none; font-weight: 650; }
.rd-link:hover { text-decoration: underline; }

/* ---------- who trades each stock (SEC 13F managers as anonymous agents) ---------- */
.p-crowd { container-type: inline-size; scroll-margin-top: 72px; }
.p-crowd .panel-head { flex-wrap: wrap; row-gap: 3px; }
.p-crowd .panel-head h2 { white-space: nowrap; }
.p-crowd .panel-meta { white-space: normal; }
.crowd-types th, .crowd-list th { white-space: normal; line-height: 1.25; }
.crowd-syms { display: flex; gap: 6px; margin: -2px 0 12px; }
.seg {
  height: 28px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent;
  color: var(--text-2); font-size: 12.5px; font-weight: 700; letter-spacing: .03em; cursor: pointer;
}
.seg[aria-pressed="true"] { background: var(--accent-dim); border-color: rgba(79,143,247,.5); color: var(--accent-text); }
.crowd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.stat { min-width: 0; padding: 9px 11px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); }
.stat-l { font-size: 10px; line-height: 1.3; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.stat-v { margin-top: 2px; font-size: 22px; line-height: 1.15; font-weight: 650; font-variant-numeric: proportional-nums; color: var(--text); }
.stat-s { margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.crowd-sub { margin: 0 0 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.crowd-sub-l { letter-spacing: .04em; text-transform: none; font-weight: 600; font-size: 11px; }
.crowd-types { margin-bottom: 18px; }
.crowd-types td { padding-top: 5px; padding-bottom: 5px; }
.crowd-types .ct-type { color: var(--text); }
.crowd-types .ct-n, .crowd-types .ct-hold { width: 1%; color: var(--text-2); }
.crowd-types th.ct-share { padding-left: 14px; }
.crowd-types td.ct-share { width: 46%; padding-left: 14px; }
.hbar { display: flex; align-items: center; gap: 8px; height: 22px; outline: none; cursor: default; }
.hbar-track { flex: 1 1 auto; min-width: 0; height: 10px; }
.hbar-track i { display: block; font-style: normal; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; transition: background .12s; }
.hbar:hover i, .hbar:focus-visible i { background: #73a6fa; }
.hbar:focus-visible { box-shadow: 0 0 0 1px var(--line-2); border-radius: 4px; }
.hbar-v { flex: none; min-width: 34px; text-align: right; font-size: 12.5px; color: var(--text); }
.crowd-list .ca { cursor: pointer; }
.crowd-list .ca:hover > td { background: rgba(255,255,255,.025); }
.crowd-list .ca.open > td { border-bottom-color: transparent; }
.crowd-list td { vertical-align: middle; }
.crowd-list .ca-who { white-space: normal; padding-top: 6px; padding-bottom: 6px; }
.ca-btn { color: var(--text); font-size: 13px; text-align: left; line-height: 1.3; }
.ca-meta { display: block; margin-top: 1px; font-size: 11.5px; color: var(--faint); }
.crowd-list .ca-spark { width: 96px; text-align: center; }
.cspark { display: inline-block; vertical-align: middle; overflow: visible; }
.cs-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cs-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.ca:hover .cs-dot { stroke: #141a23; }
.cs-pt { fill: var(--muted); }
.crowd-list .ca-now { color: var(--text); }
.crowd-list .ca-last { min-width: 74px; }
.crowd-list tr.ca-detail > td { padding: 2px 0 14px; white-space: normal; border-bottom: 1px solid var(--line); }
.ca-d { contain: inline-size; padding: 12px 14px 8px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; }
.ca-d .rd-line { margin-bottom: 4px; }
.crowd-find-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.crowd-find-row .crowd-sub { margin: 0 0 2px; }
.crowd-find {
  width: min(220px, 100%); height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 12.5px; outline: none;
}
.crowd-find::placeholder { color: var(--faint); }
.crowd-find:focus { border-color: rgba(79,143,247,.6); box-shadow: 0 0 0 3px rgba(79,143,247,.15); }
.crowd-btns { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.crowd-more { height: 30px; font-size: 12.5px; }
.crowd-count { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
.crowd-btns .crowd-count { margin: 0 0 0 4px; }
.ca-private { color: var(--text-2); font-style: italic; font-weight: 600; }
.ca-d-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.ca-sec { margin: 8px 0 2px; font-size: 12px; }
.who-tbl td.who-name { white-space: normal; color: var(--text); }
.crowd-note { margin: 14px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--faint); }

/* one manager's holdings at each quarter-end */
.qchart { --gut: 38px; margin: 18px 0 6px; }
.qc-plot { position: relative; height: 112px; margin-left: var(--gut); }
.qc-gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.qc-gl span { position: absolute; right: calc(100% + 7px); top: -8px; font-size: 10.5px; line-height: 1; color: var(--faint); white-space: nowrap; }
.qc-cols { position: absolute; inset: 0; display: flex; }
.qc-band { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; border-radius: 4px; }
.qc-band i { position: relative; display: block; font-style: normal; width: min(24px, 56%); min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; transition: background .12s; }
.qc-band:hover i, .qc-band:focus-visible i { background: #73a6fa; }
.qc-band:hover, .qc-band:focus-visible { background: rgba(255,255,255,.03); }
.qc-cap { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 650; color: var(--text); white-space: nowrap; }
.qc-x { display: flex; margin: 5px 0 0 var(--gut); }
.qc-x span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.qc-table { margin: 8px 0 2px; }
.qc-table summary { cursor: pointer; font-size: 12px; color: var(--accent-text); width: max-content; }
.qc-table .tbl { margin-top: 6px; font-size: 12.5px; }
.qc-table .tbl td { padding: 4px 6px; }

@container (max-width: 470px) {
  .crowd-stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .stat { padding: 8px 9px; }
  .stat-v { font-size: 19px; }
  .crowd-types .ct-hold { display: none; }
  .crowd-types td.ct-share { width: 50%; }
  .crowd-list .ca-spark { width: 76px; }
  .cspark { width: 70px; }
  .qc-x span:nth-last-child(even) { visibility: hidden; }
}
@container (max-width: 360px) {
  .stat-s { display: none; }
  .crowd-list .ca-spark { display: none; }
}

/* the chart tooltip: value first, then what it is */
.tip {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; max-width: min(300px, calc(100vw - 16px));
  padding: 7px 10px 8px; border-radius: 8px; background: #1b2230; border: 1px solid var(--line-2);
  box-shadow: 0 6px 24px rgba(0,0,0,.45); font-size: 12px; line-height: 1.4;
}
.tip-v { display: block; color: var(--text); font-size: 13px; font-weight: 650; }
.tip-l { display: block; color: var(--muted); }

@container (max-width: 600px) {
  /* only the results table's own rows and cells: the tables inside an opened result stay tables */
  .results, .results > thead, .results > tbody { display: block; }
  .results > thead > tr, .results > tbody > tr.r { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); }
  .results > thead > tr > th, .results > tbody > tr > td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; }
  .results > thead > tr { padding: 0 0 6px; border-bottom: 1px solid var(--line); }
  .results th .l { display: none; }
  .results th .s { display: inline; }
  .results th.t-time, .results th.t-sym, .results th.t-id, .results th.t-out { display: none; }
  .results .t-ni, .results .t-sh, .results .t-mid, .results .t-win, .results .t-sheets { grid-column: span 4; text-align: left; }
  .results tr.r { row-gap: 4px; padding: 10px 0 9px; border-bottom: 1px solid rgba(255,255,255,.055); }
  .results tr.r > td { border: 0; padding: 0; }
  .results td.t-time { grid-column: span 4; align-self: center; }
  .results td.t-sym { grid-column: span 3; align-self: center; }
  .results td.t-id { grid-column: span 3; align-self: center; }
  .results td.t-out { grid-column: span 10; justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
  .results .t-out .chip + .chip { margin-left: 0; }
  .results td.t-sh, .results td.t-ni, .results td.t-mid, .results td.t-win, .results td.t-sheets { font-size: 13px; color: var(--text); }
  .mix { margin-left: 0; width: 48px; }
  .results tr.detail { display: block; }
  .results tr.detail > td { display: block; padding: 0 0 12px; }
  .rd { padding: 10px 11px 2px; }
  .rd-cols { grid-template-columns: 1fr; gap: 10px; }
}

/* On-Demand prints */
.p-prints { container-type: inline-size; }
.prints tr.is-cancelled td { color: var(--faint); }
.prints tr.is-cancelled .t-sym { color: var(--muted); }
.prints .od-cxl { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.prints td.t-px { font-weight: 650; }
@container (max-width: 420px) {
  .prints th .l { display: none; }
  .prints th .s { display: inline; }
}

/* ---------- medium screens ---------- */
@media (max-width: 1099px) {
  .lower { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .col { display: contents; }
  #s-stocks { order: 1; }
  #p-results { order: 2; }
  #p-prints { order: 3; }
  #p-crowd { order: 4; }
}
@media (max-width: 980px) {
  .conn-text, .tape-label { display: none; }
  .topbar-right { gap: 14px; }
}

/* ---------- phone ---------- */
@media (max-width: 700px) {
  :root { --pad-x: 12px; }
  .topbar { flex-wrap: wrap; row-gap: 0; column-gap: 10px; padding-top: 9px; padding-bottom: 8px; min-height: 0; }
  .brand { gap: 8px; }
  .mark { width: 22px; height: 22px; }
  .wordmark { font-size: 14.5px; }
  .brand-sub { font-size: 13px; padding-left: 8px; }
  .topbar-right { width: 100%; margin: 7px 0 0; gap: 12px; }
  .tape-clock { font-size: 14px; }
  .btn-trade { margin-left: auto; height: 30px; padding: 0 11px; font-size: 12.5px; }
  .intro { padding: 13px 0 15px; font-size: 14px; }
  .board-grid { gap: 12px; }
  .call-card { padding: 13px 14px 14px; }
  .board-empty { flex-direction: column; text-align: center; min-height: 0; padding: 22px 18px; font-size: 14px; }
  .lower { margin-top: 20px; }
  .panel { padding: 13px 13px 14px; }
  .tile { padding: 13px 13px 12px; }
  .tq-px { font-size: 25px; }
}
@media (max-width: 370px) {
  .tape-label, .conn-text { display: none; }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.foot-link { margin-left: 6px; color: var(--accent-text); text-decoration: none; }
.foot-link:hover { text-decoration: underline; }
/* execution quality: where the shares executed relative to the quote */
.xq { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.xq-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.xq-head b { color: var(--text); }
.xq-asof { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.xq .linkish { padding: 0; border: 0; background: none; color: var(--accent-text, #a9c8ff); font: inherit; font-weight: 600; cursor: pointer; }
.xq .linkish:hover { text-decoration: underline; }
.xq-bar { display: flex; height: 8px; margin: 8px 0; border-radius: 4px; overflow: hidden; background: var(--line); }
.xq-bar i { display: block; height: 100%; }
.xq-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.xq-c { min-width: 0; padding-left: 8px; border-left: 3px solid; }
.xq-c b { display: block; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.xq-c span { display: block; font-size: 11px; color: var(--faint); line-height: 1.3; }
/* the same colors as each call's fill-mix bar */
.xq-mid { border-color: #7fb2ff; } .xq-bar .xq-mid { background: #7fb2ff; }
.xq-better { border-color: #b993ff; } .xq-bar .xq-better { background: #b993ff; }
.xq-under { border-color: var(--live); } .xq-bar .xq-under { background: var(--live); }
.xq-sweep { border-color: #a7b0bc; } .xq-bar .xq-sweep { background: #a7b0bc; }
@media (max-width: 760px) { .xq-cells { grid-template-columns: 1fr 1fr; } .xq-asof { margin-left: 0; } }
/* the liquidity sheet picture in a call's result */
.ss { display: block; width: 100%; max-width: 340px; height: auto; margin: 2px 0 8px; }
.ss-fill { fill: rgba(242,179,61,.12); }
.ss-line { fill: none; stroke: var(--live); stroke-width: 1.6; }
.ss-res { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.ss-win { stroke: var(--live); stroke-width: 1; stroke-dasharray: 2 3; opacity: .8; }
.ss-mid { stroke: #7fb2ff; stroke-width: 1; opacity: .8; }
.ss-t, .ss-ax { font-size: 9.5px; fill: var(--faint); font-family: var(--mono, monospace); }
.ss-ax.ss-won { fill: var(--live); }
.ss-ax.ss-mid { fill: #7fb2ff; }
