:root {
  --bg: #07090e;
  --glass: rgba(16, 19, 27, .78);
  --raised: rgba(255, 255, 255, .045);
  --hover: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .08);
  --text: #edeff5;
  --muted: #8b91a1;
  --quiet: #636a7b;
  --accent: #7aa2ff;
  --up: #34d399;
  --down: #fb7185;
  --warn: #e8b23d;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  display: flex; flex-direction: column; overflow: hidden; background: var(--bg); color: var(--text);
  font: 13px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "tnum";
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }

.beta-tag { flex-shrink: 0; margin-left: -12px; padding: 2px 8px; border: 1px solid rgba(232, 178, 61, .5); border-radius: 999px; background: rgba(232, 178, 61, .12); color: #e8b23d; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: help; }
#topbar { display: flex; align-items: center; gap: 20px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #0a0c12; z-index: 3; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
#query { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
.search { display: flex; flex: 1; align-items: center; gap: 2px; max-width: 780px; min-width: 0; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--raised); transition: border-color .15s; }
.search:focus-within { border-color: rgba(122, 162, 255, .55); }
#subject { flex: 1; min-width: 0; padding: 5px 10px; border: 0; background: none; outline: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
#subject::placeholder { color: var(--quiet); font-family: Inter, system-ui, sans-serif; }
.seg { display: flex; flex-shrink: 0; padding: 2px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.seg button { padding: 3px 10px; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 500; transition: background .15s, color .15s; }
.seg .on { background: rgba(255, 255, 255, .11); color: var(--text); }
.primary { flex-shrink: 0; padding: 5px 15px; border-radius: 8px; background: var(--accent); color: #07101f; font-weight: 600; transition: filter .15s; }
.primary:hover { filter: brightness(1.1); }
.ghost { flex-shrink: 0; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.ghost:hover { background: var(--hover); color: var(--text); }

#banner { padding: 6px 16px; background: rgba(232, 178, 61, .1); color: #f0d48a; border-bottom: 1px solid rgba(232, 178, 61, .16); font-size: 12px; }
#banner.demo { background: rgba(181, 123, 255, .09); color: #cdb4ff; border-bottom-color: rgba(181, 123, 255, .16); }
#banner.error { background: rgba(251, 113, 133, .1); color: #fda4af; border-bottom-color: rgba(251, 113, 133, .18); }

main {
  position: relative; flex: 1; min-height: 0;
  background:
    radial-gradient(1000px 640px at 42% 42%, rgba(122, 162, 255, .055), transparent 70%),
    radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--bg);
}
/* The faint logo sits in the middle of the part of the map the panel doesn't cover. */
main::before { content: ""; position: absolute; inset: 0 376px 0 0; background: url(watermark.svg) 50% 45% / min(46%, 360px) auto no-repeat; pointer-events: none; }
body.embed main::before { right: 324px; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#map.over-node { cursor: pointer; }
#map.dragging { cursor: grabbing; }
#empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; pointer-events: none; color: var(--muted); }
#empty img { margin-bottom: 16px; border-radius: 12px; }
#empty h1 { margin: 0 0 8px; color: var(--text); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
#empty p { margin: 0; max-width: 430px; }

#legend, #zoom, #panel { background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
#legend { position: absolute; left: 12px; bottom: 12px; right: 376px; width: fit-content; max-width: calc(100% - 388px); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 7px 12px; border-radius: 11px; color: var(--muted); font-size: 11.5px; }
.control { display: inline-flex; align-items: center; gap: 6px; }
.check { cursor: pointer; }
.check input { margin: 0; accent-color: var(--accent); }
.key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.line { display: inline-block; width: 16px; border-top: 2px solid #c8cedc; border-radius: 2px; }
.line.likely { border-top-width: 1px; opacity: .75; }
.line.weak { border-top-width: 1px; opacity: .45; }
.line.via { border-top: 2px dotted #c8cedc; }
.line.soft { border-top: 1px dashed #8a92a5; opacity: .8; }
.soft-row { display: flex; gap: 8px; width: 100%; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; text-align: left; }
.soft-row:hover { background: var(--hover); }
.soft-row[aria-pressed="true"] { background: var(--hover); box-shadow: inset 0 0 0 1px rgba(138, 146, 165, .45); }
.soft-row .line { margin-top: 8px; flex-shrink: 0; }
.soft-row b { font-size: 12px; font-weight: 600; }
.soft-row p { margin: 1px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.fund { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; color: #0a0b0f; font: 700 9px/1 Inter, system-ui, sans-serif; font-style: normal; }

#zoom { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; }
#zoom button { min-width: 32px; height: 30px; padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 500; transition: background .15s, color .15s; }
#zoom button:first-child, #zoom button:nth-child(2) { font-size: 16px; font-weight: 400; }
#zoom button + button { border-top: 1px solid var(--line); }
#zoom button:hover { background: var(--hover); color: var(--text); }

#tooltip { position: absolute; z-index: 5; max-width: 270px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 10, 15, .94); box-shadow: 0 8px 28px rgba(0, 0, 0, .45); pointer-events: none; font-size: 12px; }
#tooltip b { display: block; font-weight: 600; }
#tooltip span { display: block; color: var(--muted); }

#panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 352px; display: flex; flex-direction: column; overflow-y: auto; border-radius: var(--radius); box-shadow: 0 16px 48px rgba(0, 0, 0, .35); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
#verdict { padding: 14px 16px; border-bottom: 1px solid var(--line); }
#verdict strong { display: block; margin-bottom: 2px; font-size: 15px; font-weight: 600; }
#verdict.connected strong { color: var(--down); }
#verdict.none strong { color: var(--up); }
#verdict ul { margin: 6px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; }

.hero { padding: 16px 16px 12px; }
.eyebrow { display: block; color: var(--muted); font-size: 12px; }
.hero strong { display: block; margin: 1px 0 10px; font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.stack { display: flex; gap: 2px; height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .07); }
.stack i { display: block; min-width: 2px; transition: width .4s; }
.facts { margin: 0; padding: 0 16px 12px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.shares { display: flex; flex-direction: column; gap: 9px; padding: 12px 16px; border-top: 1px solid var(--line); }
.share[title] { cursor: help; }
.share { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; column-gap: 7px; row-gap: 4px; }
.share-name { min-width: 0; }
.share-count { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.share b { min-width: 46px; font-weight: 600; text-align: right; }
.share-bar { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .07); }
.share-bar i { display: block; height: 100%; border-radius: 2px; }
.share.none { opacity: .55; }
.shares p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }

#detail { margin: 0 10px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--raised); }
#detail header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
#detail h2 { margin: 0; font-size: 13px; font-weight: 600; }
#detail .close { width: 22px; height: 22px; border-radius: 6px; color: var(--muted); font-size: 15px; line-height: 1; }
#detail .close:hover { background: var(--hover); color: var(--text); }
.meta { margin: 3px 0; color: var(--muted); font-size: 12px; }
.meta b { color: var(--text); font-weight: 500; }
.link-card { margin-top: 8px; padding: 9px 10px; border-radius: 9px; background: rgba(255, 255, 255, .04); }
.link-card .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 500; }
.tier { font-size: 11px; font-weight: 600; }
.tier.strong { color: var(--down); }
.tier.likely { color: var(--warn); }
.tier.weak { color: var(--muted); }
.ev { margin: 5px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 11.5px; }
.ev li { display: flex; justify-content: space-between; gap: 8px; }
.ev .mono { font-size: 11px; }

.tabs { position: sticky; top: 0; z-index: 1; display: flex; gap: 2px; margin: 0 10px; padding: 3px; border-radius: 9px; background: rgba(28, 32, 42, .96); }
.tabs button { flex: 1; padding: 5px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 500; transition: background .15s, color .15s; }
.tabs .on { background: rgba(255, 255, 255, .1); color: var(--text); }
#tab-body { flex: 1; padding: 6px 6px 8px; }
.row, .group-row { display: flex; width: 100%; padding: 7px 10px; border-radius: 8px; text-align: left; transition: background .12s; }
.row { align-items: center; gap: 8px; }
.group-row { flex-direction: column; gap: 6px; padding: 9px 10px; }
.row:hover, .group-row:hover { background: var(--hover); }
.wallet-group { position: relative; padding: 9px 0 6px; }
.wallet-group + .wallet-group { border-top: 1px solid var(--line); }
.wallet-group > .group-top, .wallet-group > .track { margin-inline: 10px; width: auto; }
.wallet-group > .track { margin-top: 6px; }
.list-action { display: block; margin: 5px 10px 3px auto; padding: 2px 4px; border-radius: 5px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.list-action:hover { color: var(--text); }
.list-note { margin: 6px 10px 4px; color: var(--quiet); font-size: 11.5px; line-height: 1.45; }
.wallet-row { display: flex; align-items: center; gap: 2px; }
.wallet-row .row { flex: 1; min-width: 0; }
.wallet-row.off .row { opacity: .5; }
.wallet-row.off .grow { text-decoration: line-through; }
.eye { flex-shrink: 0; width: 28px; height: 28px; margin-right: 4px; border-radius: 7px; color: var(--muted); transition: background .12s, color .12s; }
.eye:hover { background: var(--hover); color: var(--text); }
.eye::before { content: ""; display: block; width: 15px; height: 15px; margin: auto; background: currentColor; -webkit-mask: var(--eye) center / contain no-repeat; mask: var(--eye) center / contain no-repeat; --eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.600-7 10-7 10 7 10 7-3.600 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.wallet-row.off .eye::before { --eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.600-7 10-7c1.900 0 3.500.6 4.900 1.500M22 12s-3.600 7-10 7c-1.900 0-3.500-.6-4.900-1.500M3 3l18 18'/%3E%3C/svg%3E"); }
.group-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.group-top b { font-weight: 600; }
.exchange-ring { display: inline-block; width: 12px; height: 12px; border: 1.5px dashed #e8b23d; border-radius: 50%; }
.exchange-dot { background: transparent !important; border: 1.5px dashed; }
.list-heading { margin: 14px 10px 2px; font-size: 13px; font-weight: 600; }
.quiet { color: var(--quiet); font-size: 12px; }
.track { display: block; width: 100%; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .07); }
.track i { display: block; height: 100%; border-radius: 2px; transition: width .4s; }
.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #454c5c; }
.badge { padding: 0 6px; border-radius: 5px; background: rgba(232, 178, 61, .13); color: #f0d48a; font-size: 10.5px; white-space: nowrap; }
.placeholder { padding: 16px 10px; color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

#status { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 5px 16px; border-top: 1px solid var(--line); background: #0a0c12; color: var(--quiet); font-size: 11.5px; }
#phase { color: var(--muted); }
#live { display: inline-flex; align-items: center; margin-left: auto; color: var(--muted); }
#live .pulse { width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); animation: pulse 2s infinite; }
#live .pulse.off { background: var(--warn); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

body.embed #topbar { display: none; }
body.embed #panel { width: 300px; }
body.embed #legend { right: 324px; max-width: calc(100% - 336px); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (max-width: 1040px) {
  #legend .key:not(.funding) { display: none; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  #topbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .search { flex-wrap: wrap; }
  #subject { flex-basis: 100%; order: 3; }
  main { display: flex; flex-direction: column; flex: none; }
  #map { position: relative; inset: auto; height: 58vh; }
  main::before, body.embed main::before { inset: 0 0 auto; height: 58vh; }
  #empty { height: 58vh; bottom: auto; }
  #legend { position: static; width: auto; max-width: none; margin: 8px 12px 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #panel { position: static; width: auto; margin: 12px; }
}

.solscan { display: block; margin: 8px 0; padding: 7px 10px; border: 1px solid rgba(122, 162, 255, .35); border-radius: 8px; background: rgba(122, 162, 255, .1); color: var(--accent); font-size: 12px; font-weight: 500; text-align: center; transition: background .15s; }
a.solscan:hover { background: rgba(122, 162, 255, .18); text-decoration: none; }
.solscan.off { border-color: var(--line); background: none; color: var(--quiet); cursor: not-allowed; }

#refreshBar { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
#refresh { width: 100%; padding: 7px; }
#refresh:disabled { background: var(--raised); color: var(--muted); cursor: not-allowed; filter: none; }
#refreshBar p { margin: 0; color: var(--muted); font-size: 11.5px; }
#refreshError { color: var(--down) !important; }
#disclaimer { flex-basis: 100%; color: var(--quiet); font-size: 10.5px; }

.tip-title { margin-top: 3px; }
.funding-note { margin: 8px 0; padding: 8px 10px; border-left: 3px solid; border-radius: 6px; background: rgba(255, 255, 255, .04); font-size: 12px; }
.funding-note strong { display: block; font-weight: 600; }
.funding-note p { margin: 3px 0 0; color: var(--muted); }
.funding-key { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid var(--line); }
.funding-row { display: flex; gap: 8px; }
.funding-row .fund { margin-top: 2px; }
.funding-row b { font-size: 12px; font-weight: 600; }
.funding-row p { margin: 1px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }

.legend-heading { color: var(--text); font-weight: 500; }
.fund-pill { flex-shrink: 0; padding: 1px 6px; border-radius: 8px; color: #0a0b0f; font: 700 10px/1.4 Inter, system-ui, sans-serif; font-style: normal; white-space: nowrap; }
.funded-list { display: flex; flex-direction: column; gap: 1px; margin: -2px -6px 2px; }
.funded-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; border-radius: 7px; font-size: 12px; text-align: left; transition: background .12s; }
.funded-row:hover { background: var(--hover); }
.funded-row b { font-weight: 600; }

#assessment { position: absolute; top: 12px; left: 56px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 68px); padding: 5px 12px; border: 1px solid color-mix(in srgb, var(--level) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--level) 16%, #0b0d12); color: var(--level); font-size: 12.5px; font-weight: 600; cursor: default; }
.level-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--level); }
.level-high { --level: #fb7185; }
.level-caution { --level: #e8b23d; }
.level-clear { --level: #34d399; }
.level-limited, .level-scanning { --level: #8b91a1; }
