:root {
  color-scheme: dark;
  --page: #0b1523;
  --panel: #111f31;
  --ink: #edf3fc;
  --muted: #a1b2c8;
  --line: #27394e;
  --blue: #b6d0ff;
  --up: #ff8986;
  --down: #65ddb4;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-variant-numeric: tabular-nums;
}
h1, h2, p, dl, dd { margin: 0; }
button, input { font: inherit; }
button { color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.top { border-bottom: 1px solid var(--line); }
.top-inner, main, footer { max-width: 1150px; margin: auto; }
.top-inner, .top-actions, .index-head, .pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-inner { min-height: 72px; padding: 0 20px; }
.top-actions { gap: 12px; }
h1 { font-size: 26px; letter-spacing: .035em; }
.poll-label {
  color: #c4d2e7;
  border: 1px solid #344962;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11px;
}
.search-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid #344962;
  border-radius: 8px;
}
.search-icon::before, .search-icon::after { content: ''; position: absolute; }
.search-icon::before {
  width: 10px; height: 10px; left: 9px; top: 8px;
  border: 1.5px solid var(--blue); border-radius: 50%;
}
.search-icon::after {
  width: 7px; height: 1.5px; left: 19px; top: 21px;
  background: var(--blue); transform: rotate(45deg);
}
main { padding: 16px 20px 0; }
.index {
  align-self: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}
.index-head { gap: 4px; }
.index-head h2 { font-size: 15px; letter-spacing: .025em; }
.index-head span, .change span, .breadth p, .index-foot { color: var(--muted); font-size: 12px; }
.change { display: flex; align-items: baseline; gap: 10px; padding: 2px 0 8px; }
#net { font-size: 47px; line-height: 1.2; letter-spacing: -.045em; }
.chart { position: relative; height: 138px; }
#trend { display: block; width: 100%; height: 100%; }
#chart-state {
  position: absolute;
  inset: 10px 47px 27px 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.breadth { border-top: 1px solid var(--line); padding-top: 10px; }
.bar { display: flex; height: 6px; overflow: hidden; border-radius: 6px; background: #33465d; margin: 8px 0; }
.bar span { flex: 0; }
#up-bar { background: var(--up); }
#down-bar { background: var(--down); }
#flat-bar { background: #93a7c1; }
#missing-bar { background: #425872; }
.pair { align-items: flex-start; }
.pair div:last-child { text-align: right; }
.pair strong { margin-left: 3px; font-size: 19px; line-height: 1; }
.pair small { display: block; color: var(--muted); font-size: 11px; padding-top: 2px; }
.up { color: var(--up); }
.down { color: var(--down); }
.neutral { color: var(--muted); }
#coverage { margin-top: 6px; }
.index-foot { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: flex-start; justify-content: space-between; }
.index-foot summary { color: var(--blue); cursor: pointer; }
.index-foot details[open] { width: 100%; }
.index-foot details p { max-width: 42em; margin-top: 4px; }
.market { min-width: 0; margin-top: 20px; }
.market h2 { font-size: 20px; letter-spacing: .025em; margin-bottom: 8px; }
.search-box { display: block; margin-bottom: 8px; }
.search-box input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--panel); color: var(--ink);
}
.search-box input::placeholder { color: var(--muted); }
.tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.tabs button { min-height: 40px; padding: 0 1px; color: var(--muted); }
.tabs button[aria-pressed='true'] {
  color: var(--blue); background: #192b45;
  border-radius: 5px 5px 0 0; box-shadow: 0 2px 0 -1px var(--blue);
  font-weight: 650;
}
table { width: 100%; table-layout: fixed; border-collapse: collapse; }
col:first-child { width: 44%; }
col:nth-child(2) { width: 32%; }
col:nth-child(3) { width: 24%; }
td, th { text-align: right; border-bottom: 1px solid #203145; }
td:first-child, th:first-child { text-align: left; }
th { font-size: 11px; font-weight: 500; color: var(--muted); height: 31px; }
td { height: 48px; font-size: 15px; font-weight: 620; }
.asset { display: block; width: 100%; padding: 4px 0; text-align: left; font-weight: 650; }
.asset:focus-visible { outline-offset: -2px; }
.asset:hover { color: var(--blue); }
.asset small, .price small { display: block; font-weight: 450; font-size: 10px; color: var(--muted); line-height: 1.25; }
.price { white-space: nowrap; }
.more { display: block; width: 100%; min-height: 44px; color: var(--blue); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 14px 0; }
footer { padding: 14px 20px 20px; color: var(--muted); font-size: 11px; }
dialog { width: min(360px, calc(100% - 36px)); padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
dialog::backdrop { background: #050c17cc; }
dialog h2 { font-size: 19px; margin-bottom: 12px; }
dialog dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
dialog dt { color: var(--muted); }
dialog dd { text-align: right; }
dialog button { margin-top: 16px; padding: 5px 12px; background: #243951; border-radius: 5px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
@media (min-width: 850px) {
  main { display: grid; grid-template-columns: minmax(350px, .9fr) minmax(400px, 1.2fr); gap: 32px; padding-top: 28px; }
  .index { padding: 22px; }
  .chart { height: 193px; }
  .market { margin: 0; }
}
