/* HL Radar — calm, low-glare palette; profit / loss are soft mint / coral, never neon */
:root {
  color-scheme: light;
  --bg: #f3f4f7; --bg-glow: rgba(71, 103, 216, .06);
  --surface: #ffffff; --surface-2: #f8f9fb; --surface-3: #eef1f5;
  --line: #e2e6ec; --line-soft: #edf0f4;
  --text: #1a2130; --text-2: #556173; --text-3: #8b95a4;
  --accent: #4f6fe0; --accent-2: #8a6fe6; --accent-soft: rgba(79, 111, 224, .10); --on-accent: #ffffff;
  --pos: #1c9a68; --neg: #d14f49; --pos-soft: rgba(28, 154, 104, .10); --neg-soft: rgba(209, 79, 73, .10);
  --warn: #b7852a; --warn-soft: rgba(183, 133, 42, .12);
  --shadow: 0 1px 2px rgba(20, 30, 50, .04), 0 6px 20px rgba(20, 30, 50, .05);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0f14; --bg-glow: rgba(142, 166, 255, .07);
    --surface: #13181f; --surface-2: #171d25; --surface-3: #1d242e;
    --line: #232a35; --line-soft: #1b212a;
    --text: #e1e5eb; --text-2: #a2acb9; --text-3: #6c7786;
    --accent: #8ea6ff; --accent-2: #b39cff; --accent-soft: rgba(142, 166, 255, .12); --on-accent: #0c0f14;
    --pos: #5ec79a; --neg: #ef8179; --pos-soft: rgba(94, 199, 154, .12); --neg-soft: rgba(239, 129, 121, .12);
    --warn: #e2b665; --warn-soft: rgba(226, 182, 101, .12);
    --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 10px 30px rgba(0, 0, 0, .22);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f14; --bg-glow: rgba(142, 166, 255, .07);
  --surface: #13181f; --surface-2: #171d25; --surface-3: #1d242e;
  --line: #232a35; --line-soft: #1b212a;
  --text: #e1e5eb; --text-2: #a2acb9; --text-3: #6c7786;
  --accent: #8ea6ff; --accent-2: #b39cff; --accent-soft: rgba(142, 166, 255, .12); --on-accent: #0c0f14;
  --pos: #5ec79a; --neg: #ef8179; --pos-soft: rgba(94, 199, 154, .12); --neg-soft: rgba(239, 129, 121, .12);
  --warn: #e2b665; --warn-soft: rgba(226, 182, 101, .12);
  --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 10px 30px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  background: radial-gradient(1200px 500px at 70% -10%, var(--bg-glow), transparent 70%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.num, td, .kpi b, .tile b { font-variant-numeric: tabular-nums; }
.mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .92em; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warn { color: var(--warn); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; letter-spacing: .2px; }
.brand-text small { color: var(--text-3); font-size: 11.5px; }
.tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  margin: 0 auto; overflow-x: auto; max-width: 100%;
}
.tabs button {
  border: 0; background: none; cursor: pointer;
  padding: 6px 14px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: 13px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.top-right { display: flex; align-items: center; gap: 12px; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); position: relative; }
.live.ok i { background: var(--pos); }
.live.ok i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--pos); opacity: 0; animation: ping 2.4s ease-out infinite; }
.live.err i { background: var(--neg); }
@keyframes ping { 0% { transform: scale(.5); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; color: var(--text-2);
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); }

/* ---------------------------------------------------------------- layout */
.layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; padding: 20px 24px 40px; max-width: 1640px; margin: 0 auto; }
.side { position: sticky; top: 78px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 16px; container-type: inline-size; }

.ov-card {
  display: block; padding: 14px 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .15s;
}
.ov-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ov-card.on { border-color: var(--accent); }
.ov-card .t { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.ov-card .t small { font-weight: 400; color: var(--text-3); font-size: 12px; }
.ov-card .v { display: flex; gap: 14px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.ov-card .v b { color: var(--text); font-weight: 600; }
.lsbar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; margin-top: 10px; background: var(--surface-3); gap: 2px; }
.lsbar i { display: block; height: 100%; }
.lsbar i.l { background: var(--pos); border-radius: 4px 0 0 4px; }
.lsbar i.s { background: var(--neg); border-radius: 0 4px 4px 0; }

.side-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); font-weight: 600; }
.side-head .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.wallets { display: flex; flex-direction: column; gap: 6px; }
.side-note { color: var(--text-3); font-size: 11.5px; padding: 8px 4px; margin: 0; }

.w-card {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 2px 11px; align-items: center;
  padding: 11px 12px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.w-card:hover { background: var(--surface); border-color: var(--line-soft); }
.w-card.on { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.w-card.on .rank { color: var(--accent); }
.w-card .av { grid-row: span 2; position: relative; }
.w-card .rank { position: absolute; right: -5px; bottom: -4px; font-size: 10px; font-weight: 700; background: var(--bg); border-radius: 6px; padding: 0 4px; color: var(--text-3); border: 1px solid var(--line); }
.w-card .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.w-card .ret { font-weight: 600; font-size: 13px; text-align: right; }
.w-card .sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-card .meta { grid-column: 2 / 4; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.w-card .meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.w-card .spark { flex: none; }
.w-card .meta b { color: var(--text); font-weight: 600; }
.w-card .spark { display: block; }

.avatar { width: 36px; height: 36px; border-radius: 11px; display: block; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.avatar.big { width: 56px; height: 56px; border-radius: 16px; }
.avatar.sm { width: 22px; height: 22px; border-radius: 7px; flex: none; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 500; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.dex { font-size: 10px; padding: 0 5px; border-radius: 5px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.side-pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; }
.side-pill.long { background: var(--pos-soft); color: var(--pos); }
.side-pill.short { background: var(--neg-soft); color: var(--neg); }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-h .muted { font-size: 12.5px; }
.card-h .sp { flex: 1; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }

.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 4px 2px; flex-wrap: wrap; }
.page-h h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.2px; }
.page-h p { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }

.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; cursor: pointer; color: var(--text-3); font-size: 12px; font-weight: 500; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.seg button:hover { color: var(--text); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow); min-width: 0; }
.tile > span { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; white-space: nowrap; }
.tile b { font-size: 19px; font-weight: 650; letter-spacing: -.3px; white-space: nowrap; }
.tile b.b-sm { font-size: 16px; }
.tile small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.tiles-in .tile { border: 0; border-radius: 0; box-shadow: none; }

/* wallet hero */
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 18px; padding: 18px; align-items: center; }
.hero h2 { margin: 0; font-size: 20px; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero .addr { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--text-2); flex-wrap: wrap; }
.hero .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 12px; cursor: pointer; }
.link-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.hero-kpis { grid-column: 1 / -1; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 11.5px; padding: 9px 12px; white-space: nowrap; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); position: sticky; top: 0; }
th.r, td.r { text-align: right; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th .arr { opacity: .7; margin-left: 3px; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tbody tr.row { cursor: pointer; transition: background .12s; }
tbody tr.row:hover { background: var(--surface-2); }
tbody tr.row.open { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td .coin { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
td .sub { display: block; font-size: 11.5px; color: var(--text-3); }
.caret { display: inline-block; width: 14px; color: var(--text-3); transition: transform .15s; }
tr.open .caret { transform: rotate(90deg); color: var(--accent); }
tr.detail > td { padding: 0; background: var(--surface-2); }
.detail-in { padding: 14px 16px 16px; border-bottom: 1px solid var(--line-soft); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 18px; margin-bottom: 12px; }
.facts div span { display: block; font-size: 11px; color: var(--text-3); }
.facts div b { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.empty { padding: 34px 18px; text-align: center; color: var(--text-3); }
.more { display: block; width: 100%; padding: 11px; border: 0; border-top: 1px solid var(--line-soft); background: none; color: var(--accent); cursor: pointer; font-weight: 500; border-radius: 0 0 var(--radius) var(--radius); }
.more:hover { background: var(--surface-2); }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text, .chart text.ax { fill: var(--text-3); font-size: 10.5px; font-family: Inter, system-ui, sans-serif; }
.chart .grid line { stroke: var(--line-soft); stroke-width: 1; }
.chart-msg { height: 100%; display: grid; place-items: center; color: var(--text-3); font-size: 12.5px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 14px; height: 0; border-top: 2px dashed currentColor; vertical-align: middle; margin-right: 5px; }
.legend i.solid { border-top-style: solid; }
.legend i.tri-up { width: 0; height: 0; border: 5px solid transparent; border-bottom: 8px solid var(--pos); border-top: 0; }
.legend i.tri-dn { width: 0; height: 0; border: 5px solid transparent; border-top: 8px solid var(--neg); border-bottom: 0; }
.legend i.band { width: 14px; height: 9px; border: 0; background: var(--accent-soft); border-radius: 2px; }

/* diverging exposure bars */
.dv { display: grid; grid-template-columns: 92px 1fr 1fr 96px; align-items: center; gap: 6px 10px; font-size: 12.5px; }
.dv .c { font-weight: 600; display: flex; gap: 5px; align-items: center; white-space: nowrap; overflow: hidden; }
.dv .l, .dv .r { height: 18px; display: flex; align-items: center; }
.dv .l { justify-content: flex-end; border-right: 1px solid var(--line); padding-right: 1px; }
.dv .r { padding-left: 1px; }
.dv .l i, .dv .r i { display: block; height: 12px; min-width: 2px; }
.dv .l i { background: var(--neg); border-radius: 4px 0 0 4px; }
.dv .r i { background: var(--pos); border-radius: 0 4px 4px 0; }
.dv .n { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-h { display: grid; grid-template-columns: 92px 1fr 1fr 96px; gap: 10px; font-size: 11px; color: var(--text-3); margin-bottom: 8px; }
.dv-h span:nth-child(2) { text-align: right; padding-right: 6px; }
.dv-h span:nth-child(4) { text-align: right; }
.dv-row { display: contents; cursor: default; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select.sel { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 12.5px; }

/* tooltip, toast, skeleton */
.tip {
  position: fixed; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font-size: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); max-width: 280px;
}
.tip.show { opacity: 1; }
.tip .tt { color: var(--text-3); font-size: 11px; margin-bottom: 3px; }
.tip .tr { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.tip .tr span { color: var(--text-2); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; transition: .2s; background: var(--surface-3); border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px; font-size: 13px; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.sk { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.loading-note { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 10px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@container (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; padding: 14px 16px 30px; }
  .side { position: static; max-height: none; }
  .top { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .top-right { margin-left: auto; }
  .dv, .dv-h { grid-template-columns: 70px 1fr 1fr 74px; }
  .search-btn span, .search-btn kbd { display: none; }
}

/* ---------------------------------------------------------------- search button, badge */
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; color: var(--text-3); font-size: 12.5px;
}
.search-btn:hover { color: var(--text); background: var(--surface-3); }
kbd { font: 500 10.5px/1 Inter, system-ui, sans-serif; padding: 3px 5px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line); color: var(--text-2); }
.icon-btn { position: relative; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.badge[hidden] { display: none; }

/* ---------------------------------------------------------------- live feed: a third column on wide screens, a drawer below */
.feed { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
@media (min-width: 1480px) {
  .layout { grid-template-columns: 310px minmax(0, 1fr) 340px; max-width: 1900px; }
  .feed { position: sticky; top: 78px; align-self: start; height: calc(100vh - 96px); }
  .feed-toggle { display: none; }
}
@media (max-width: 1479px) {
  .feed { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); z-index: 40; transform: translateX(105%); transition: transform .22s ease; border-radius: 0; }
  body.feed-open .feed { transform: none; box-shadow: -20px 0 60px rgba(0, 0, 0, .35); }
  body.feed-open .scrim { opacity: 1; pointer-events: auto; }
}
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 35; }
.feed-h { padding: 13px 14px 10px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 9px; }
.feed-h .row1 { display: flex; align-items: center; gap: 8px; }
.feed-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.feed-h .st { font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }
.feed-h .st i { width: 6px; height: 6px; border-radius: 50%; background: var(--neg); }
.feed-h .st.ok i { background: var(--pos); }
.feed-h .row2 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bell { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); cursor: pointer; font-size: 11.5px; }
.bell.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.notif-row { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.feed-list { flex: 1; overflow-y: auto; padding: 4px 0; scrollbar-width: thin; }
.feed-foot { padding: 8px 14px; font-size: 11px; color: var(--text-3); border-top: 1px solid var(--line-soft); }
.fi { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 14px 9px 11px; border-left: 3px solid transparent; cursor: pointer; transition: background .12s; }
.fi:hover { background: var(--surface-2); }
.fi.c-pos { border-left-color: var(--pos); }
.fi.c-neg { border-left-color: var(--neg); }
.fi.c-acc { border-left-color: var(--accent); }
.fi.c-mut { border-left-color: var(--line); }
.fi .avatar { margin-top: 1px; }
.fi-t { font-size: 12.5px; display: flex; gap: 6px; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.fi-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.fi-time { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.fi-d { grid-column: 2 / 4; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.fi-d .kind { font-weight: 600; color: var(--text); }
.fi-s { grid-column: 2 / 4; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.fi.hist .fi-d, .fi.hist .fi-t { opacity: .85; }
.fi.fresh { animation: fiIn 1.8s ease; }
@keyframes fiIn { 0% { background: var(--accent-soft); transform: translateX(8px); } 25% { transform: none; } 100% { background: transparent; } }
.day-sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); padding: 10px 14px 4px; font-weight: 600; }

/* ---------------------------------------------------------------- a value that changed flashes once */
.fl-up, .fl-dn { border-radius: 4px; animation: flUp 1.4s ease; }
.fl-dn { animation-name: flDn; }
@keyframes flUp { 0% { background: var(--pos-soft); box-shadow: 0 0 0 3px var(--pos-soft); } 100% { background: transparent; box-shadow: 0 0 0 3px transparent; } }
@keyframes flDn { 0% { background: var(--neg-soft); box-shadow: 0 0 0 3px var(--neg-soft); } 100% { background: transparent; box-shadow: 0 0 0 3px transparent; } }

/* ---------------------------------------------------------------- coin links, consensus radar, coin page */
a.dv-row > * { cursor: pointer; }
a.dv-row:hover .c .coin { color: var(--accent); }
a.coin-link { border-radius: 5px; }
a.coin-link:hover .coin { color: var(--accent); }
.stack { display: inline-flex; align-items: center; }
.stack .avatar { width: 22px; height: 22px; border-radius: 7px; box-shadow: 0 0 0 2px var(--surface); }
.stack .avatar + .avatar { margin-left: -6px; }
.chip.new { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip.opp { background: var(--warn-soft); color: var(--warn); }
.coin-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.coin-h .big { font-size: 26px; font-weight: 700; letter-spacing: -.4px; display: flex; align-items: center; gap: 8px; }
.coin-h .px { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.back { font-size: 12.5px; color: var(--text-3); }
.back:hover { color: var(--text); }

/* ---------------------------------------------------------------- heatmap + timeline */
.hm-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); }
.hm-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.style-tag { font-size: 12px; color: var(--text-2); }
.style-tag b { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- search palette (Ctrl+K) */
.pal { position: fixed; inset: 0; z-index: 70; background: rgba(5, 8, 12, .45); backdrop-filter: blur(3px); display: grid; justify-items: center; align-items: start; padding-top: 12vh; }
.pal[hidden] { display: none; }
.pal-box { width: min(620px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; animation: fade .15s ease; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text-3); }
.pal-in input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; }
.pal-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.pal-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); padding: 8px 10px 4px; font-weight: 600; }
.pal-it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pal-it.on { background: var(--surface-3); }
.pal-it .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-it .s { font-size: 12px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.pal-ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 700; flex: none; }
.pal-foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.pal-foot kbd { margin-right: 3px; }
.pal-empty { padding: 26px; text-align: center; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
