@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin.woff2') format('woff2');
}
:root {
  --bg: oklch(15% 0.02 260);
  --panel: oklch(19% 0.02 260);
  --panel-2: oklch(23% 0.02 260);
  --border: oklch(45% 0.02 260 / 0.35);
  --border-soft: oklch(45% 0.02 260 / 0.18);
  --text: oklch(96% 0.01 260);
  --muted: oklch(68% 0.02 260);
  --muted-2: oklch(52% 0.02 260);
  --accent: oklch(75% 0.14 200);
  --accent-ink: oklch(18% 0.03 220);
  --amber: oklch(75% 0.13 80);
  --grey-node: oklch(46% 0.015 260);
  --danger: oklch(70% 0.16 25);
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 50% -8%, oklch(24% 0.035 205 / 0.45), transparent 55%);
  background-attachment: fixed;
  font-family: var(--font-body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: oklch(85% 0.1 200); }
::placeholder { color: var(--muted-2); }
[hidden] { display: none !important; }

.nav-link { color: var(--muted); font-size: 13px; transition: color 0.15s ease; }
.nav-link:hover { color: var(--text); }

#results { opacity: 0; transform: translateY(10px); transition: opacity 0.45s ease, transform 0.45s ease; }
#results.is-visible { opacity: 1; transform: translateY(0); }

#check-btn { transition: background 0.15s ease; }
#check-btn:hover:not(:disabled) { background: oklch(80% 0.14 200); }
#check-btn:disabled { cursor: default; opacity: 0.85; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 14px; height: 14px; border-radius: 999px; border: 2px solid oklch(18% 0.03 220 / 0.35); border-top-color: var(--accent-ink); animation: spin 0.7s linear infinite; }
.spinner-light { width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 0.7s linear infinite; }

#wallet-input:focus, .sybil-input:focus { border-color: var(--accent); }
#error-box { color: var(--danger); font-size: 13px; }

.graph-node { cursor: grab; }
.graph-node:hover { filter: brightness(1.25); }
.graph-node:active { cursor: grabbing; }

#node-tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  max-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
#node-tooltip .addr { font-family: var(--font-mono); color: var(--text); word-break: break-all; }
#node-tooltip .meta { color: var(--muted); margin-top: 4px; }
#node-tooltip .hint { color: var(--accent); margin-top: 6px; font-size: 11px; }

.entities-collapsed > .entity-row:nth-child(n+6) { display: none !important; }
.entity-row { cursor: pointer; border-radius: 6px; transition: background 0.1s ease; }
.entity-row:hover { background: var(--panel-2); }
a.entity-row, a.entity-link { color: inherit; text-decoration: none; }

.scam-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
  background: oklch(70% 0.16 25 / 0.12);
  border: 1px solid oklch(70% 0.16 25 / 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  cursor: pointer;
}
a.scam-badge:hover { color: var(--danger); background: oklch(70% 0.16 25 / 0.2); }

.detail-toggle {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 13px; border-radius: 6px; flex-shrink: 0;
  font-family: inherit;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  margin: -6px -2px -6px -6px;
}
.detail-toggle:hover { background: var(--border-soft); color: var(--text); }
.connection-detail { padding: 4px 6px 10px 30px; font-size: 12px; }
.connection-detail .tx-row { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border-soft); color: var(--muted); }
.connection-detail .tx-row:last-child { border-bottom: none; }

#loading-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#loading-toast.is-visible { opacity: 1; transform: translateY(0); }

.watchlist-btn { display: flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; font-family: inherit; color: var(--muted); font-size: 13px; padding: 0; }
.watchlist-btn:hover { color: var(--text); }
.watchlist-wrap { position: relative; }
.watchlist-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 40;
}
.watchlist-item { display: flex; align-items: center; gap: 6px; border-radius: 6px; padding: 2px; }
.watchlist-item:hover { background: var(--border-soft); }
.watchlist-item a { display: block; flex-grow: 1; min-width: 0; padding: 6px 8px; font-family: var(--font-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watchlist-remove { background: none; border: none; color: var(--muted-2); cursor: pointer; font-size: 15px; line-height: 1; flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px; }
.watchlist-remove:hover { background: var(--border-soft); color: var(--danger); }
.watchlist-empty { font-size: 12px; color: var(--muted-2); padding: 12px 10px; line-height: 1.5; }

#save-btn { background: none; border: none; cursor: pointer; color: var(--muted-2); font-size: 16px; line-height: 1; padding: 2px; border-radius: 6px; }
#save-btn:hover { color: var(--amber); background: var(--border-soft); }
#save-btn.is-saved { color: var(--amber); }

#reset-view-btn:hover { color: var(--text); border-color: var(--muted-2); }

@keyframes bunny-hop {
  0%, 22%, 100% { transform: translateY(0); }
  10% { transform: translateY(-4px); }
}
.logo-bunny { animation: bunny-hop 2.1s ease-in-out infinite; transform-origin: bottom center; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .logo-bunny { animation: none; }
}

.ghost-btn { background: none; border: 1px solid var(--border); color: var(--muted); font-size: 11px; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-family: var(--font-body); transition: color 0.15s ease, border-color 0.15s ease; }
.ghost-btn:hover { color: var(--text); border-color: var(--muted); }

.time-filter-select {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.time-filter-select:focus { border-color: var(--accent); }

/* Simple static page (e.g. /how-it-works) content styling. */
.prose h2 { font-family: var(--font-display); font-size: 20px; margin: 32px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { line-height: 1.7; color: var(--muted); margin: 0 0 14px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { color: var(--muted); line-height: 1.7; margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose .note { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 18px; color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.prose code { font-family: var(--font-mono); background: var(--panel-2); padding: 2px 6px; border-radius: 5px; font-size: 0.92em; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding: 14px 48px; margin-top: 0; border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--muted-2); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
@media (max-width: 640px) { .site-footer { padding: 14px 24px; } }

/* Sticky footer: on short pages (e.g. the home page before a search) the
   footer sits at the bottom of the window instead of in the middle. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > .site-footer { margin-top: auto; }

/* Long connection addresses shrink with an ellipsis instead of running over the other columns. */
.entity-link > span { min-width: 0; }
#wallet-input { min-width: 0; }
#check-btn { white-space: nowrap; }

/* Phones and narrow windows */
@media (max-width: 720px) {
  .site-header { padding: 14px 16px !important; flex-wrap: wrap; gap: 10px 16px; }
  .site-nav { width: 100%; gap: 16px !important; flex-wrap: wrap; row-gap: 6px; }
  .site-nav .nav-link, .site-nav .watchlist-btn { white-space: nowrap; }
  .hide-mobile { display: none !important; }
  .watchlist-panel { position: fixed; left: 16px; right: 16px; top: 96px; width: auto; }

  .results-wrap { padding: 8px 16px 40px !important; }
  .results-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
  .graph-panel { padding: 16px !important; }

  .conn-label, .conn-chain { display: none !important; }
  .conn-count { width: auto !important; flex-shrink: 0; }
  .connection-detail { padding-left: 12px; }

  .site-footer { padding: 14px 16px; }
}
@media (max-width: 720px) {
  .hero { padding-top: 32px !important; }
  .hero h1 { font-size: 32px !important; }
}
