:root {
  color-scheme: dark;
  --bg:#000;
  --card:#1C1C20;
  --card-raised:#222227;
  --divider:rgba(255,255,255,.1);
  --text-1:#FFF;
  --text-2:rgba(255,255,255,.8);
  --text-3:rgba(255,255,255,.5);
  --brand:#5B55E0;
  --link:#9F99FC;
  --s1:#8079FF;
  --s2:#2E9FC4;
  --s3:#C98421;
  --s4:#B76A9E;
  --up:#00B42A;
  --down:#F53F3F;
  --warn:#FF7D00;
  --radius:8px;
  --radius-lg:20px;
  font-family:Gilroy,Avenir,Helvetica,Arial,"PingFang SC",system-ui,sans-serif;
}

* { box-sizing:border-box; }
html { background:var(--bg); scroll-behavior:smooth; }
body {
  margin:0;
  min-width:320px;
  background:var(--bg);
  color:var(--text-1);
  font-family:inherit;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input,select { font:inherit; }
button { color:inherit; }
a { color:inherit; }
[hidden] { display:none !important; }

.site-nav {
  position:sticky;
  top:0;
  z-index:20;
  border-bottom:1px solid var(--divider);
  background:rgba(0,0,0,.88);
  backdrop-filter:blur(18px);
}
.nav-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  width:min(1680px,100%);
  min-height:62px;
  margin:0 auto;
  padding:0 30px;
}
.site-brand {
  flex:0 0 auto;
  color:var(--text-1);
  font-size:14px;
  font-weight:650;
  letter-spacing:-.01em;
  text-decoration:none;
}
.nav-links { display:flex; align-items:center; gap:4px; }
.nav-links a {
  border-radius:999px;
  padding:8px 12px;
  color:var(--text-3);
  font-size:12px;
  text-decoration:none;
  transition:background-color .18s ease,color .18s ease;
}
.nav-links a:hover { color:var(--text-1); background:rgba(255,255,255,.05); }
.nav-links a[aria-current="page"] { color:var(--text-1); background:var(--brand); }

.page { width:min(1680px,100%); margin:0 auto; padding:34px 28px 24px; }
.page-header,.topbar {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  padding:10px 2px 28px;
  border-bottom:1px solid var(--divider);
}
.title-group { min-width:0; }
h1 {
  margin:0;
  font-size:clamp(28px,3vw,42px);
  line-height:1;
  letter-spacing:-.035em;
  font-weight:650;
}
.eyebrow {
  margin:0 0 11px;
  color:var(--link);
  font-size:10px;
  font-weight:650;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.as-of { margin:12px 0 0; color:var(--text-3); font-size:13px; letter-spacing:.015em; }
.header-copy { max-width:620px; margin:12px 0 0; color:var(--text-3); font-size:12px; line-height:1.65; }

.range-control {
  display:inline-flex;
  flex:0 0 auto;
  gap:3px;
  padding:4px;
  border:1px solid var(--divider);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  white-space:nowrap;
}
.range-control button {
  min-width:58px;
  border:0;
  border-radius:999px;
  padding:8px 13px;
  background:transparent;
  color:var(--text-3);
  cursor:pointer;
  transition:background-color .18s ease,color .18s ease;
}
.range-control button:hover { color:var(--text-1); }
.range-control button[aria-pressed="true"] { background:var(--brand); color:var(--text-1); }

.section { margin-top:34px; }
.section-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin:0 2px 14px;
}
.section-head h2 { margin:0; font-size:17px; line-height:1.2; font-weight:620; letter-spacing:-.012em; }
.section-note { color:var(--text-3); font-size:12px; }
.section-actions { display:flex; align-items:center; gap:10px; }

.card,.kpi-card,.line-row {
  background:var(--card);
  border:1px solid rgba(255,255,255,.055);
  border-radius:var(--radius-lg);
}
.kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.kpi-grid.six { grid-template-columns:repeat(6,minmax(0,1fr)); }
.kpi-card { position:relative; min-height:154px; overflow:hidden; padding:19px 18px 17px; }
.kpi-card::after {
  content:"";
  position:absolute;
  inset:auto 18px 0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(128,121,255,.42),transparent);
  opacity:.7;
}
.kpi-label,.metric-label-row { color:var(--text-2); font-size:13px; line-height:1.35; }
.metric-label-row { display:flex; align-items:center; gap:7px; }
.kpi-value {
  margin-top:15px;
  font-size:clamp(25px,2.1vw,33px);
  line-height:1;
  font-weight:620;
  letter-spacing:-.035em;
  white-space:nowrap;
}
.kpi-subline { min-height:16px; margin-top:8px; color:var(--text-3); font-size:11px; line-height:1.45; }
.kpi-changes { display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:14px; font-size:11px; line-height:1.4; }
.change,.delta { color:var(--text-3); white-space:nowrap; }
.change.up,.delta.up { color:var(--up); }
.change.down,.delta.down { color:var(--down); }
.change.neutral { color:var(--text-3); }

.info-button {
  display:inline-grid;
  width:16px;
  height:16px;
  place-items:center;
  flex:0 0 auto;
  border:1px solid rgba(255,255,255,.22);
  border-radius:50%;
  padding:0;
  background:transparent;
  color:var(--text-3);
  font-size:10px;
  line-height:1;
  cursor:pointer;
}
.info-button:hover,.info-button[aria-expanded="true"] { border-color:var(--link); color:var(--text-1); }
.metric-popover {
  position:fixed;
  z-index:50;
  width:min(340px,calc(100vw - 24px));
  padding:15px 16px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(28,28,32,.98);
  box-shadow:0 18px 50px rgba(0,0,0,.5);
}
.metric-popover h3 { margin:0 0 10px; font-size:13px; font-weight:650; }
.metric-popover p { margin:7px 0 0; color:var(--text-2); font-size:11px; line-height:1.55; white-space:pre-line; }
.metric-popover strong { color:var(--text-3); font-weight:500; }

.line-list { display:grid; gap:12px; }
.line-row {
  position:relative;
  display:grid;
  grid-template-columns:minmax(150px,.8fr) repeat(3,minmax(120px,1fr)) minmax(210px,1.25fr) 22px;
  align-items:center;
  gap:18px;
  min-height:128px;
  overflow:hidden;
  padding:20px 22px;
  text-decoration:none;
  transition:border-color .18s ease,background-color .18s ease,transform .18s ease;
}
.line-row::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--accent,var(--s1)); }
.line-row:hover { border-color:rgba(159,153,252,.35); background:var(--card-raised); transform:translateY(-1px); }
.line-name { min-width:0; }
.line-kicker { color:var(--text-3); font-size:10px; letter-spacing:.12em; text-transform:uppercase; }
.line-name h2 { margin:7px 0 0; font-size:21px; font-weight:620; }
.line-metric { min-width:0; }
.line-metric-label { display:flex; align-items:center; gap:6px; color:var(--text-3); font-size:10px; }
.line-metric-value { margin-top:8px; overflow:hidden; color:var(--text-1); font-size:20px; font-weight:620; letter-spacing:-.025em; text-overflow:ellipsis; white-space:nowrap; }
.line-spark { position:relative; height:72px; min-width:0; }
.line-arrow { color:var(--link); font-size:22px; text-align:right; }
.line-row.is-updating { grid-template-columns:minmax(150px,.8fr) 1fr 22px; min-height:94px; }
.line-updating { color:var(--text-3); font-size:12px; }

.chart-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.chart-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.chart-card { position:relative; min-width:0; min-height:310px; overflow:hidden; padding:18px 16px 14px; }
.chart-card::before {
  content:"";
  position:absolute;
  top:0;
  left:24px;
  width:44px;
  height:2px;
  border-radius:0 0 2px 2px;
  background:var(--accent,var(--s1));
}
.chart-head { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:26px; padding:0 4px; }
.chart-title-wrap { min-width:0; }
.chart-title { margin:0; color:var(--text-2); font-size:13px; font-weight:600; }
.chart-legend { display:flex; flex-wrap:wrap; gap:7px 12px; margin-top:5px; color:var(--text-3); font-size:10px; }
.legend-item,.tooltip-row { display:flex; align-items:center; gap:7px; }
.legend-key,.tooltip-key { display:inline-block; width:14px; height:2px; flex:0 0 auto; border-radius:999px; background:currentColor; }
.view-toggle { flex:0 0 auto; border:0; padding:4px 0 4px 10px; background:transparent; color:var(--link); font-size:11px; cursor:pointer; }
.view-toggle:hover { color:var(--text-1); }
.chart-canvas { position:relative; height:242px; margin-top:7px; }
.chart-canvas.compact { height:150px; }
.chart-canvas svg,.line-spark svg { display:block; width:100%; height:100%; overflow:visible; outline:none; }
.chart-tooltip {
  position:absolute;
  z-index:4;
  width:max-content;
  min-width:148px;
  max-width:min(230px,calc(100% - 16px));
  padding:10px 11px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:var(--radius);
  background:rgba(17,17,20,.96);
  box-shadow:0 12px 30px rgba(0,0,0,.38);
  pointer-events:none;
}
.chart-tooltip.spark { min-width:112px; padding:8px 9px; }
.tooltip-date { margin-bottom:7px; color:var(--text-2); font-size:11px; }
.tooltip-row { justify-content:space-between; gap:12px; min-height:21px; color:var(--text-3); font-size:10px; }
.tooltip-label { display:flex; align-items:center; gap:6px; }
.tooltip-row strong { color:var(--text-1); font-size:11px; font-weight:650; font-variant-numeric:tabular-nums; }
.tooltip-new { max-width:205px; margin-top:6px; padding-top:7px; border-top:1px solid var(--divider); color:var(--text-2); font-size:10px; line-height:1.45; word-break:break-word; }
.chart-table-wrap { height:242px; margin-top:7px; overflow:auto; border-top:1px solid var(--divider); }
.chart-table { width:100%; border-collapse:collapse; font-size:10px; }
.chart-table th,.chart-table td { padding:8px 7px; border-bottom:1px solid rgba(255,255,255,.06); text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.chart-table th:first-child,.chart-table td:first-child { text-align:left; }
.chart-table th { position:sticky; top:0; z-index:1; background:var(--card); color:var(--text-3); font-weight:500; }
.chart-table td { color:var(--text-2); }

.empty-state,.updating-state { display:grid; place-items:center; min-height:210px; color:var(--text-3); font-size:13px; }
.table-card { overflow:hidden; }
.table-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 18px; border-bottom:1px solid var(--divider); }
.toolbar-left,.toolbar-right { display:flex; align-items:center; gap:10px; }
.filter-label { position:relative; display:block; width:min(360px,100%); }
.filter-label::before { content:""; position:absolute; left:12px; top:50%; width:8px; height:8px; border:1.5px solid var(--text-3); border-radius:50%; transform:translateY(-62%); pointer-events:none; }
.filter-label::after { content:""; position:absolute; left:20px; top:calc(50% + 4px); width:5px; height:1.5px; background:var(--text-3); transform:rotate(45deg); transform-origin:left center; pointer-events:none; }
.filter-input,.week-select {
  height:38px;
  border:1px solid var(--divider);
  border-radius:var(--radius);
  outline:none;
  background:rgba(0,0,0,.18);
  color:var(--text-1);
  font-size:12px;
  transition:border-color .18s ease;
}
.filter-input { width:100%; padding:0 12px 0 34px; }
.week-select { min-width:150px; padding:0 32px 0 12px; }
.filter-input::placeholder { color:var(--text-3); }
.filter-input:focus,.week-select:focus { border-color:var(--link); }
.table-count { color:var(--text-3); font-size:11px; white-space:nowrap; }
.export-button,.copy-button {
  border:1px solid var(--divider);
  border-radius:var(--radius);
  background:rgba(255,255,255,.035);
  color:var(--text-2);
  cursor:pointer;
  transition:border-color .18s ease,color .18s ease;
}
.export-button { min-height:34px; padding:0 12px; font-size:11px; white-space:nowrap; }
.copy-button { border:0; padding:2px 0; background:transparent; color:var(--link); font-size:11px; }
.export-button:hover,.copy-button:hover { border-color:var(--link); color:var(--text-1); }
.table-scroll { overflow-x:auto; }
.data-table { width:100%; min-width:920px; border-collapse:collapse; font-size:12px; }
.data-table.wide { min-width:1380px; }
.data-table th,.data-table td { padding:13px 16px; border-bottom:1px solid rgba(255,255,255,.07); text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.data-table th:first-child,.data-table td:first-child { text-align:left; }
.data-table thead th { color:var(--text-3); font-size:10px; font-weight:500; letter-spacing:.025em; }
.data-table tbody tr:last-child td { border-bottom:0; }
.sort-button { display:inline-flex; align-items:center; justify-content:flex-end; gap:5px; width:100%; border:0; padding:0; background:transparent; color:inherit; cursor:pointer; }
th:first-child .sort-button { justify-content:flex-start; }
.sort-button:hover { color:var(--text-1); }
.sort-mark { width:9px; color:var(--link); }
.clickable-row,.asset-row { cursor:pointer; transition:background-color .15s ease; }
.clickable-row:hover,.asset-row:hover { background:rgba(255,255,255,.025); }
.asset-button { display:inline-flex; align-items:center; gap:9px; border:0; padding:0; background:transparent; color:var(--text-1); font-size:12px; font-weight:650; cursor:pointer; }
.asset-chevron { display:inline-block; width:10px; color:var(--text-3); font-size:17px; line-height:1; transform-origin:45% 50%; transition:transform .16s ease,color .16s ease; }
.asset-button[aria-expanded="true"] .asset-chevron { color:var(--link); transform:rotate(90deg); }
.address-cell { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.address-cell code { color:var(--text-2); font:inherit; }

.util-cell { min-width:132px; }
.util-wrap { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.util-track { width:54px; height:5px; overflow:hidden; border-radius:999px; background:rgba(128,121,255,.18); }
.util-fill { height:100%; border-radius:inherit; background:var(--s1); }
.util-number.warn { color:var(--warn); }
.market-detail-row>td,.detail-row>td { padding:0 16px 16px 44px; background:rgba(0,0,0,.13); }
.subtable-shell,.detail-shell { overflow:hidden; border:1px solid var(--divider); border-radius:12px; }
.subtable { width:100%; min-width:700px; border-collapse:collapse; font-size:11px; }
.subtable th,.subtable td { padding:10px 13px; border-bottom:1px solid rgba(255,255,255,.055); text-align:right; font-variant-numeric:tabular-nums; }
.subtable tr:last-child td { border-bottom:0; }
.subtable th:first-child,.subtable td:first-child { text-align:left; }
.subtable th { color:var(--text-3); font-size:9px; font-weight:500; }
.subtable td { color:var(--text-2); }
.vault-detail { display:grid; grid-template-columns:minmax(220px,.65fr) minmax(360px,1.35fr); gap:18px; align-items:center; padding:16px; }
.detail-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.detail-fact span { display:block; color:var(--text-3); font-size:9px; }
.detail-fact strong { display:block; margin-top:5px; color:var(--text-2); font-size:12px; font-weight:600; }

.movement-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.movement-card { min-width:0; overflow:hidden; padding:16px; }
.movement-card h3 { margin:0 0 12px; color:var(--text-2); font-size:12px; font-weight:600; }
.movement-table { width:100%; border-collapse:collapse; font-size:10px; }
.movement-table th,.movement-table td { padding:8px 0; border-bottom:1px solid rgba(255,255,255,.06); text-align:right; white-space:nowrap; }
.movement-table th:first-child,.movement-table td:first-child { max-width:160px; overflow:hidden; text-align:left; text-overflow:ellipsis; }
.movement-table th { color:var(--text-3); font-weight:500; }
.movement-table td { color:var(--text-2); }
.alerts-card { margin-top:12px; overflow:hidden; }
.alerts-card h3 { margin:0; padding:16px 18px; border-bottom:1px solid var(--divider); color:var(--text-2); font-size:12px; font-weight:600; }
.alert-list { margin:0; padding:0; list-style:none; }
.alert-item { display:grid; grid-template-columns:auto minmax(150px,.8fr) 1.4fr; align-items:center; gap:12px; padding:12px 18px; border-bottom:1px solid rgba(255,255,255,.06); color:var(--text-2); font-size:11px; text-decoration:none; }
.alert-item:last-child { border-bottom:0; }
a.alert-item:hover { background:rgba(255,255,255,.025); }
.alert-market { overflow:hidden; color:var(--text-1); font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.alert-detail { color:var(--text-3); }
.badge { display:inline-flex; align-items:center; width:max-content; min-height:22px; border:1px solid rgba(128,121,255,.24); border-radius:999px; padding:0 8px; background:rgba(128,121,255,.1); color:var(--link); font-size:9px; white-space:nowrap; }
.badge.warn { border-color:rgba(255,125,0,.28); background:rgba(255,125,0,.1); color:#FFAD5C; }
.badge.up { border-color:rgba(0,180,42,.24); background:rgba(0,180,42,.08); color:var(--up); }
.badge.down { border-color:rgba(245,63,63,.24); background:rgba(245,63,63,.08); color:#FF7777; }

.warn-banner { margin-top:22px; border:1px solid rgba(255,125,0,.36); border-left:3px solid var(--warn); border-radius:14px; padding:13px 16px; background:rgba(255,125,0,.07); color:var(--text-2); font-size:12px; line-height:1.5; }
.estimated { color:var(--warn); }
.reverse-grid { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:12px; }
.reverse-card { min-width:0; overflow:hidden; }
.reverse-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:58px; padding:11px 18px; border-bottom:1px solid var(--divider); }
.reverse-card h3 { margin:0; color:var(--text-2); font-size:13px; font-weight:600; }
.reverse-card .data-table { min-width:0; }
.reverse-card:last-of-type .data-table { min-width:620px; }

.footer { margin-top:36px; padding:20px 2px 6px; border-top:1px solid var(--divider); color:var(--text-3); font-size:11px; line-height:1.75; }
.footer p { margin:0; }
.footer p+p { margin-top:4px; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }

@media (max-width:1280px) {
  .kpi-grid.six { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .chart-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .movement-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .line-row { grid-template-columns:minmax(140px,.8fr) repeat(3,minmax(110px,1fr)) minmax(170px,1.1fr) 18px; gap:12px; }
}
@media (max-width:900px) {
  .nav-inner { align-items:flex-start; flex-direction:column; gap:10px; padding-block:13px; }
  .nav-links { width:100%; overflow-x:auto; padding-bottom:1px; }
  .nav-links a { flex:0 0 auto; }
  .page { padding:24px 16px 20px; }
  .page-header,.topbar { align-items:flex-start; flex-direction:column; gap:20px; }
  .range-control { align-self:stretch; }
  .range-control button { flex:1; }
  .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .line-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .line-name { grid-column:1/3; }
  .line-arrow { grid-column:3; grid-row:1; }
  .line-spark { grid-column:1/-1; }
  .line-row.is-updating { grid-template-columns:1fr auto; }
  .line-row.is-updating .line-updating { grid-column:1/-1; }
  .reverse-grid { grid-template-columns:1fr; }
  .table-toolbar { align-items:flex-start; flex-direction:column; }
  .toolbar-left,.toolbar-right { width:100%; justify-content:space-between; }
  .filter-label { width:100%; }
  .vault-detail { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .nav-inner { padding-inline:14px; }
  .page { padding-inline:12px; }
  .kpi-grid,.kpi-grid.six,.chart-grid,.chart-grid.two,.movement-grid { grid-template-columns:1fr; }
  .kpi-card { min-height:148px; }
  .chart-card { min-height:300px; }
  .section { margin-top:28px; }
  .section-head { align-items:flex-start; flex-direction:column; gap:8px; }
  .section-actions { width:100%; justify-content:space-between; }
  .line-row { grid-template-columns:1fr 1fr; padding:18px; }
  .line-name { grid-column:1; }
  .line-arrow { grid-column:2; }
  .line-metric:nth-of-type(4) { grid-column:1/-1; }
  .line-spark { grid-column:1/-1; }
  .market-detail-row>td,.detail-row>td { padding-left:16px; }
  .alert-item { grid-template-columns:auto 1fr; }
  .alert-detail { grid-column:1/-1; }
  .toolbar-left,.toolbar-right { align-items:stretch; flex-direction:column; }
  .export-button { width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { transition-duration:.001ms!important; }
}

.show-more { color: var(--link); cursor: pointer; text-align: center !important; }
.show-more:hover { color: var(--text-1); }

/* Onchain data annotations */
.tag { display:table; margin-top:4px; padding:2px 6px; border-radius:var(--radius); background:var(--card-raised); color:var(--text-3); font-size:10px; font-weight:500; }
.info-banner { margin-bottom:16px; padding:12px 16px; border:1px solid var(--divider); border-radius:var(--radius); background:var(--card); color:var(--text-2); font-size:12px; }
