/* ============================================================
   Alpha Finance: /etf/, every crypto ETF on one page.
   Built on the asset dashboards' skin (etf.css: hero, stat tiles, flow
   panels) and the house tables (funding.css). This file only adds the
   asset legend, the side-by-side panels, the split bars and tone colours.
   ============================================================ */

.eh .etfstat-v.up { color: var(--pos-text); }
.eh .etfstat-v.down { color: var(--neg-text); }

/* coin marks beside every asset name */
.eh-ic {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -2px;
  background: var(--panel-2);
  box-shadow: 0 0 0 1px var(--line-2);
}

/* the asset key over the daily chart */
.eh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0 18px 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--text-2);
}
.eh-legend span { display: inline-flex; align-items: center; }
.eh-legend span > i { width: 9px; height: 9px; margin-right: 8px; border-radius: 2px; opacity: 0.85; }
.eh canvas { display: block; width: 100%; cursor: crosshair; touch-action: pan-y; }

/* two panels side by side */
.eh-pair { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: stretch; }
.eh-pair .flowpanel { display: flex; flex-direction: column; min-width: 0; }

/* where the money went: one diverging bar per asset around a centre line */
.eh-split { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 18px 16px; }
.eh-srow {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  color: var(--text);
  font-size: 12.5px;
}
a.eh-srow:hover .eh-sname { color: var(--lime); }
.eh-sname { display: inline-flex; align-items: center; white-space: nowrap; transition: color 0.15s; }
.eh-sbar { position: relative; height: 10px; }
.eh-sbar::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--line-2); }
.eh-sbar i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: color-mix(in srgb, var(--c) 42%, transparent);
}
.eh-sbar i.pos { left: 50%; box-shadow: inset -1px 0 0 var(--c); }
.eh-sbar i.neg { right: 50%; box-shadow: inset 1px 0 0 var(--c); }
.eh-sval { text-align: right; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.eh-sval.up { color: var(--pos-text); }
.eh-sval.down { color: var(--neg-text); }
.eh-stot { border-bottom: 0; font-weight: 600; }
.eh-stot .eh-sname { color: var(--text-2); font-weight: 500; }

/* tables */
table.eh-assets, table.eh-funds { min-width: 780px; }
.eh .frates td.up { color: var(--pos-text); }
.eh .frates td.down { color: var(--neg-text); }
.eh .frates td.co .eh-ic { margin-right: 8px; }
.eh .frates td.l { text-align: left; }
.eh-assets tbody tr.eh-go { cursor: pointer; }
.eh-assets tbody tr.eh-go:hover td.co b, .eh-assets tbody tr.eh-go:focus-visible td.co b { color: var(--lime); }
.eh-asset { color: var(--text-2); display: inline-flex; align-items: center; }
.eh-asset:hover { color: var(--lime); }
.eh-more {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--bg);
  padding: 5px 10px;
  font: inherit;
  color: var(--text-2);
  cursor: pointer;
}
.eh-more:hover { color: var(--text); border-color: var(--muted); }
.eh .sess-note { font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; color: var(--faint); }

@media (max-width: 1080px) {
  .eh-pair { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .eh-srow { grid-template-columns: 96px minmax(0, 1fr) 70px; gap: 8px; font-size: 12px; }
  .eh-legend { padding: 0 12px 4px; gap: 6px 12px; }
}
