@font-face {
  font-family: "Geist";
  src: url("f/geist.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("f/geistmono.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #000000;
  --panel: #070707;
  --rule: #1b1b1b;
  --rule-2: #262626;
  --ink: #ededed;
  --ink-2: #8c8c8c;
  --ink-3: #575757;
  --red: #ec3750;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad: 32px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: #fff; }

a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-2); }
a:hover { border-bottom-color: var(--ink-2); }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- masthead ---------- */

.masthead {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--pad) 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}

.masthead h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.mh-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.mh-r {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 2px;
}

.asof {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--rule-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 11.5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.sync:hover { color: var(--ink); border-color: #3a3a3a; }
.sync[disabled] { cursor: default; opacity: .6; }

.sync-dot {
  width: 5px; height: 5px;
  background: var(--ink-3);
  transition: background .2s;
}
.sync-dot.live { background: var(--red); }
.sync-dot.busy { background: var(--ink-2); animation: pulse 1s steps(2, end) infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- main ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 96px;
}

/* ---------- lede ---------- */

.lede { padding: 52px 0 0; }

.total {
  font-family: var(--mono);
  font-size: clamp(42px, 7.4vw, 66px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.total .cents { color: var(--ink-3); font-size: .52em; letter-spacing: -0.02em; margin-left: -0.13em; }

.total-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-2);
  max-width: 46ch;
}

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 40px 0 0;
  border-top: 1px solid var(--rule);
}
.strip > div {
  padding: 14px 20px 0 0;
  border-right: 1px solid var(--rule);
}
.strip > div:last-child { border-right: 0; }
.strip > div:not(:first-child) { padding-left: 20px; }

.strip dt {
  font-size: 11.5px;
  color: var(--ink-3);
  margin: 0 0 5px;
}
.strip dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: -0.01em;
}
.strip dd .u { color: var(--ink-3); font-size: 11.5px; margin-left: 4px; letter-spacing: 0; }

/* ---------- panels ---------- */

.panel {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.panel-head { margin-bottom: 26px; }

.panel-head h2 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.panel-note {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }

.axis-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--mono);
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}

/* ---------- mix bars ---------- */

.mix { display: grid; gap: 0; }

.mix-row {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #101010;
}
.mix-row .lbl {
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mix-row .val {
  font-family: var(--mono);
  font-size: 12.5px;
  text-align: right;
  white-space: nowrap;
}
.mix-row .val .pc { color: var(--ink-3); margin-left: 8px; font-size: 11px; }
.mix-row .track {
  height: 6px;
  background: #131313;
  min-width: 40px;
}
.mix-row .track i {
  display: block;
  height: 100%;
  background: #3d3d3d;
  transition: width .5s cubic-bezier(.2,.7,.2,1);
}
.mix-row:first-child .track i { background: var(--red); }

/* ---------- table ---------- */

.tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 4px;
}

#q {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule-2);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  padding: 6px 0;
  width: 190px;
  outline: none;
}
#q::placeholder { color: var(--ink-3); }
#q:focus { border-bottom-color: var(--ink-2); }

.sorts { display: flex; gap: 2px; }
.sorts button {
  background: none;
  border: 0;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  padding: 6px 9px;
  cursor: pointer;
  transition: color .15s;
}
.sorts button:hover { color: var(--ink-2); }
.sorts button.on { color: var(--ink); }

.tbl {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.tbl thead th {
  text-align: left;
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-3);
  padding: 0 0 9px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.tbl thead th.num { text-align: right; }

.c-i { width: 34px; }
.c-s { width: 96px; }
.c-v { width: 108px; }
.c-b { width: 62px; }

.tbl tbody tr {
  border-bottom: 1px solid #111;
  cursor: pointer;
  transition: background .12s;
}
.tbl tbody tr:hover { background: #0b0b0b; }
.tbl tbody tr.on { background: #0d0d0d; }

.tbl td {
  padding: 9px 0;
  font-size: 13px;
  vertical-align: middle;
}

.tbl .i {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.tbl tr.top .i { color: var(--red); }

.tbl .nm { font-size: 13px; }

.tbl .v {
  text-align: right;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
.tbl .v .c { color: var(--ink-3); }
.tbl .v.zero { color: var(--ink-3); }
.tbl .burn { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }

.spark { display: block; }

.empty { font-size: 12.5px; color: var(--ink-3); padding: 20px 0; }

/* ---------- footer ---------- */

.foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 78ch;
}
.foot p { margin: 0 0 6px; }
.foot .credit { margin-top: 14px; color: #464646; }
.foot a { border-bottom-color: #2a2a2a; }
.foot a:hover { color: var(--ink-2); }

/* ---------- drawer ---------- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: #050505;
  border-left: 1px solid var(--rule);
  z-index: 50;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.3,.8,.2,1);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.open { transform: none; }

.d-head {
  position: sticky;
  top: 0;
  background: #050505;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--rule);
  z-index: 2;
}
.d-head h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.d-slug {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  border-bottom: 1px solid transparent;
}
.d-slug:hover { color: var(--ink-2); border-bottom-color: var(--rule-2); }

.d-close {
  position: absolute;
  top: 20px; right: 22px;
  background: none;
  border: 0;
  color: var(--ink-3);
  padding: 4px;
  cursor: pointer;
  line-height: 0;
}
.d-close:hover { color: var(--ink); }

.d-body { padding: 24px 26px 60px; }

.d-total {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.d-total .cents { color: var(--ink-3); font-size: .55em; margin-left: -0.13em; }
.d-total-lbl { font-size: 11.5px; color: var(--ink-3); margin: 0 0 8px; }

.d-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 24px 0 0;
}
.d-grid > div { background: #050505; padding: 11px 13px; }
.d-grid dt { font-size: 10.5px; color: var(--ink-3); margin: 0 0 3px; }
.d-grid dd { margin: 0; font-family: var(--mono); font-size: 12.5px; }

.d-sec {
  margin: 30px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.tx { list-style: none; margin: 0; padding: 0; }
.tx li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 14px;
  padding: 10px 0;
  border-bottom: 1px solid #101010;
}
.tx .memo {
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tx .meta {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
}
.tx .amt {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}
.tx .amt.pos { color: #6f9e7a; }

.tx-skel { height: 12px; background: #101010; margin: 12px 0; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  :root { --pad: 20px; }
  .pair { grid-template-columns: 1fr; gap: 0; }
  .pair .panel:last-child { margin-top: 44px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div { padding: 14px 16px 0 0; }
  .strip > div:nth-child(2) { border-right: 0; }
  .strip > div:nth-child(3) { padding-left: 0; border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 14px; }
  .strip > div:nth-child(4) { border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 14px; }
  .c-s { display: none; }
  .tbl td.c-s, .tbl th.c-s { display: none; }
  .c-b { width: 52px; }
  .c-v { width: 88px; }
  .masthead { flex-direction: column; align-items: flex-start; gap: 14px; }
  .mh-r { width: 100%; justify-content: space-between; }
  .drawer { width: 100%; }
  .tools { flex-direction: column; align-items: flex-start; gap: 10px; }
  #q { width: 100%; }
}

@media (max-width: 520px) {
  .total { font-size: 40px; }
  .c-b { display: none; }
  .tbl td.c-b, .tbl th.c-b, .tbl td.burn { display: none; }
}
