/* console: stats round (Nov 4) — All stats drawer: even spacing, chart cards, hover read-outs (js/pages.js analytics / st*) */

/* ---- spacing: Results and Analytics are siblings in the drawer body, so the body itself spaces them ---- */
.cx-db#cx-d-stats { display: flex; flex-direction: column; gap: 12px; }
.cx-db#cx-d-stats > * { flex: none; margin: 0 !important; }
.cx-db#cx-d-stats .page { gap: 12px; }
.cx .cx-db#cx-d-stats :is(.g5, .g4).stats { gap: 10px; }
.cx .cx-db#cx-d-stats .g2 { gap: 12px; }
.cx .cx-db#cx-d-stats .stat { padding: 12px 14px; min-height: 68px; align-content: start; }
.cx .cx-db#cx-d-stats .card { padding: 12px 14px; }
.cx .cx-db#cx-d-stats .ph { padding-bottom: 2px; }

/* ---- chart cards ---- */
.st-card { display: flex; flex-direction: column; min-width: 0; }
.st-card .ch { margin-bottom: 8px; }
.st-sum { font: 500 11.5px var(--f); color: var(--tx3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-sum.up { color: var(--up); } .st-sum.dn { color: var(--dn); }

.st-ch { position: relative; container-type: inline-size; border-radius: 8px; outline: none; cursor: crosshair; touch-action: pan-y; }
.st-ch:focus-visible { box-shadow: 0 0 0 2px rgba(143,179,217,.55); }
.st-plot { position: relative; height: 150px; border-radius: 6px; }
.st-plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-bars rect { transition: opacity .14s ease; }
.st-ch.hov .st-bars rect:not(.on) { opacity: .32; }
.st-bars .st-zl { stroke: var(--ln2, rgba(255,255,255,.1)); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }

/* crosshair (holders) / column band (net flow) and the point on the line */
.st-x { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(201,220,242,.05), rgba(201,220,242,.45) 30%, rgba(201,220,242,.45) 70%, rgba(201,220,242,.05));
  transition: transform .08s linear, opacity .14s ease; will-change: transform; }
.st-ch[data-st="flow"] .st-x { background: rgba(201,220,242,.07); border-radius: 4px; }
.st-dot { position: absolute; left: -4.5px; top: -4.5px; width: 9px; height: 9px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: var(--ac-hi, #c9dcf2); box-shadow: 0 0 0 3px rgba(143,179,217,.22), 0 0 14px rgba(143,179,217,.55); transition: transform .08s linear, opacity .14s ease; }
.st-ch.hov :is(.st-x, .st-dot, .st-tip) { opacity: 1; }

/* frosted tooltip, placed inside the plot so it never leaves the card */
.st-tip { position: absolute; top: 0; left: 0; z-index: 3; min-width: 176px; max-width: calc(100% - 12px); padding: 8px 10px 7px; border-radius: 10px; pointer-events: none; opacity: 0;
  background: rgba(14,19,27,.74); -webkit-backdrop-filter: blur(16px) saturate(1.35); backdrop-filter: blur(16px) saturate(1.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 0 1px rgba(201,220,242,.12), 0 14px 30px -14px rgba(0,0,0,.75);
  font: 400 11.5px/1.35 var(--f); color: var(--tx2); transition: opacity .12s ease, transform .08s linear; }
.st-tip header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 5px; padding: 0 0 5px; box-shadow: inset 0 -1px 0 rgba(201,220,242,.1); white-space: nowrap; }
.st-tip header b { font: 600 12px var(--f); color: var(--tx); }
.st-tip header small { font: 11px var(--fm, var(--f)); color: var(--tx3); }
.st-r { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 10px; padding: 2px 0; white-space: nowrap; }
.st-r:not(:has(small)) { grid-template-columns: minmax(0, 1fr) auto; }
.st-r > span { display: inline-flex; align-items: center; gap: 6px; }
.st-r b { font: 600 12px var(--f); font-variant-numeric: tabular-nums; color: var(--tx); text-align: right; }
.st-r small { min-width: 54px; font-size: 11px; color: var(--tx3); text-align: right; font-variant-numeric: tabular-nums; }
.st-r b.up { color: var(--up); }
.st-net { margin-top: 3px; padding-top: 5px; box-shadow: inset 0 1px 0 rgba(201,220,242,.1); }
.st-net > span { color: var(--tx); font-weight: 500; }
.st-net.up :is(b, small) { color: var(--up); } .st-net.dn :is(b, small) { color: var(--dn); }
.st-k { width: 8px; height: 8px; border-radius: 2px; } .st-k.u { background: var(--up); } .st-k.d { background: var(--dn); }

/* x-axis: launch … now, with two middle ticks when the card is wide enough */
.st-ax { position: relative; height: 14px; margin-top: 8px; font: 11px var(--fm, var(--f)); color: var(--tx3); }
.st-ax span { position: absolute; top: 0; white-space: nowrap; }
.st-ax .e:first-child { left: 0; } .st-ax .e:last-child { right: 0; }
.st-ax .m { transform: translateX(-50%); }
@container (max-width: 280px) { .st-ax .m { display: none; } }

@media (prefers-reduced-motion: reduce) { .st-x, .st-dot, .st-tip, .st-bars rect { transition: none; } }

/* ---- light theme ---- */
html[data-theme="light"] .st-tip { background: rgba(255,255,255,.84); color: var(--tx2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(20,40,70,.1), 0 14px 30px -14px rgba(30,50,80,.35); }
html[data-theme="light"] .st-tip header, html[data-theme="light"] .st-net { box-shadow: inset 0 -1px 0 rgba(20,40,70,.08); }
html[data-theme="light"] .st-net { box-shadow: inset 0 1px 0 rgba(20,40,70,.08); }
html[data-theme="light"] .st-x { background: linear-gradient(180deg, rgba(20,40,70,.04), rgba(20,40,70,.32) 30%, rgba(20,40,70,.32) 70%, rgba(20,40,70,.04)); }
html[data-theme="light"] .st-ch[data-st="flow"] .st-x { background: rgba(47,111,181,.08); }
html[data-theme="light"] .st-dot { background: var(--ac); box-shadow: 0 0 0 3px rgba(47,111,181,.18), 0 0 10px rgba(47,111,181,.35); }
html[data-theme="light"] .st-ch:focus-visible { box-shadow: 0 0 0 2px rgba(47,111,181,.5); }
html[data-theme="light"] .st-bars .st-zl { stroke: rgba(20,40,70,.18); }
