@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dmsans-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geistmono-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: 'DM Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 60px -30px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
  --sp: 24px;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg: #04161a;
  --bg-2: #031215;
  --surface: #061f24;
  --surface-2: #08262c;
  --subtle: #0a2328;
  --line: #103038;
  --line-soft: #0c262c;
  --ink: #f2f6f6;
  --ink-2: #d6e0e1;
  --muted: #a8b3b6;
  --muted-2: #76898d;
  --accent: #34b7dd;
  --accent-2: #97fce4;
  --accent-tint: #0f2a30;
  --ok: #3fd6b5;
  --ok-tint: #0d2c27;
  --bad: #ff6f6f;
  --bad-tint: #2b1414;
  --warn: #f0b45c;
  --logo-a: #97fce4;
  --logo-b: #34b7dd;
  --hdr: rgba(4, 22, 26, 0.82);
  --tbl-hover: rgba(52, 183, 221, 0.05);
  --code-bg: #031417;
}

[data-theme='light'] {
  color-scheme: light;
  --bg: #f8f7f4;
  --bg-2: #f3f1ea;
  --surface: #ffffff;
  --surface-2: #fdfdfb;
  --subtle: #f1efe8;
  --line: #e5e0d4;
  --line-soft: #efeae0;
  --ink: #18181b;
  --ink-2: #33322e;
  --muted: #6b655a;
  --muted-2: #8d867a;
  --accent: #2d7388;
  --accent-2: #0f766e;
  --accent-tint: #e8eef0;
  --ok: #2d7a6b;
  --ok-tint: #e3f2ee;
  --bad: #c0392b;
  --bad-tint: #fbebe8;
  --warn: #a86a12;
  --logo-a: #34b7dd;
  --logo-b: #2d7388;
  --hdr: rgba(248, 247, 244, 0.85);
  --tbl-hover: rgba(45, 115, 136, 0.045);
  --code-bg: #f4f2ec;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: 'ss01' on, 'cv01' on;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(880px 460px at 50% -8%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  z-index: 100;
}
.skip:focus {
  left: 16px;
}

.shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--sp);
}

.grow {
  flex: 1;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'zero' 1;
}

.muted {
  color: var(--muted);
}
.muted-2 {
  color: var(--muted-2);
}
.small {
  font-size: 12px;
}
.nowrap {
  white-space: nowrap;
}
.right {
  text-align: right;
}

/* ---------- header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--hdr);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  display: block;
  border-radius: 9px;
  box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--accent) 60%, transparent);
}
.brand-name {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand-name span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.nav a:hover {
  color: var(--ink);
  background: var(--subtle);
}
.nav a.active {
  color: var(--ink);
  background: var(--subtle);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
  width: min(360px, 34vw);
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted-2);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 36px;
  padding: 0 40px 0 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder {
  color: var(--muted-2);
}
.search input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--ring);
}
.search kbd {
  position: absolute;
  right: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--subtle);
  pointer-events: none;
}
.search input:focus ~ kbd {
  opacity: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover {
  color: var(--ink);
  border-color: var(--muted-2);
}
[data-theme='dark'] .ic-sun {
  display: none;
}
[data-theme='light'] .ic-moon {
  display: none;
}

.netbar {
  border-top: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  overflow: hidden;
}
.netbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 32px;
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
}
.net-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.net-item .mono {
  color: var(--muted);
}
.net-sep {
  width: 1px;
  height: 11px;
  background: var(--line);
}
.net-item-right {
  color: var(--muted-2);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  display: inline-block;
  flex-shrink: 0;
}
.dot-live {
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover {
  background: var(--surface-2);
  border-color: var(--muted-2);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #04201f;
  font-weight: 600;
}
[data-theme='light'] .btn-primary {
  color: #fff;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, #fff);
  border-color: color-mix(in srgb, var(--accent) 86%, #fff);
}
.btn-ghost {
  background: transparent;
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 8px;
}
.btn-block {
  width: 100%;
}

/* ---------- footer ---------- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
}
.footer-inner {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 34px;
  padding-bottom: 40px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  gap: 12px;
  max-width: 340px;
}
.footer-brand strong {
  font-size: 14px;
}
.footer-brand p {
  color: var(--muted-2);
  font-size: 12.5px;
  margin-top: 3px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 28px;
  font-size: 13px;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.footer-meta .mono {
  color: var(--muted);
}

/* ---------- generic page ---------- */
#app {
  padding-top: 30px;
  padding-bottom: 72px;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted-2);
  margin-bottom: 7px;
}
.crumb a:hover {
  color: var(--accent);
}
.crumb .sep {
  opacity: 0.5;
}
.page-title {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.page-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 6px;
}
.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 54px 0 42px;
}
.hero::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -40px;
  width: 620px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 600;
  max-width: 860px;
  margin: 0 auto;
}
.hero h1 .grad {
  background: linear-gradient(92deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 560px;
  margin: 16px auto 0;
}
.hero-search {
  position: relative;
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin: 28px auto 0;
}
.hero-search .search-icon {
  left: 15px;
  width: 18px;
  height: 18px;
}
.hero-search input {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 0 16px 0 44px;
  outline: none;
  box-shadow: 0 12px 40px -24px rgba(0, 0, 0, 0.8);
}
.hero-search input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--ring);
}
.hero-search .btn {
  height: 50px;
  padding: 0 22px;
  border-radius: 12px;
}
.hero-hint {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted-2);
}
.hero-hint .mono {
  color: var(--muted);
}

/* ---------- stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 72%, var(--bg)));
  border-radius: var(--radius);
  padding: 15px 16px 14px;
  min-width: 0;
}
.stat-label {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin-top: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-sub {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- cards ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--subtle) 55%, transparent);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-link {
  font-size: 12.5px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-link:hover {
  text-decoration: underline;
}
.card-bd {
  padding: 0;
}

/* ---------- tables ---------- */
.tbl-wrap {
  width: 100%;
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
  background: color-mix(in srgb, var(--subtle) 35%, transparent);
}
.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  white-space: nowrap;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl tbody tr {
  transition: background 0.12s;
}
.tbl tbody tr:hover {
  background: var(--tbl-hover);
}
.tbl td.wrap {
  white-space: normal;
}
.tbl .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.cell-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.hash {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.hash:hover {
  text-decoration: underline;
}
.addr-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
}
.addr-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.addr-flow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.arrow {
  color: var(--muted-2);
  font-size: 11px;
}
.amount {
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.amount-unit {
  color: var(--muted-2);
  font-size: 11px;
  margin-left: 3px;
}

/* pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  background: var(--subtle);
  color: var(--muted);
  border: 1px solid var(--line);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill-accent {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
}
.pill-ok {
  background: var(--ok-tint);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 24%, transparent);
}
.pill-bad {
  background: var(--bad-tint);
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 26%, transparent);
}
.pill-warn {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 26%, transparent);
}
.pill-system {
  background: transparent;
  color: var(--muted-2);
  border-style: dashed;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.dot-ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 16%, transparent);
}
.dot-bad {
  background: var(--bad);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 16%, transparent);
}

/* ---------- pagination ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line-soft);
}
.pager .btn {
  min-width: 120px;
}
.pager-info {
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------- detail layouts ---------- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.summary {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  min-width: 0;
}
.summary-k {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.summary-v {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.summary-v.mono {
  font-size: 13.5px;
}
.summary-v .sub {
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 400;
}

.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.panel-hd {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: color-mix(in srgb, var(--subtle) 45%, transparent);
}
.panel-bd {
  padding: 6px 18px 14px;
}
.kv {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13.5px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv-k {
  color: var(--muted-2);
  font-size: 12.5px;
}
.kv-v {
  min-width: 0;
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.token-type {
  font-style: normal;
  font-weight: 400;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  vertical-align: 1px;
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-size: 13.5px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab:hover {
  color: var(--ink);
}
.tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 500;
}
.tab .count {
  color: var(--muted-2);
  font-size: 11.5px;
  margin-left: 5px;
  font-family: var(--font-mono);
}

.copy {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.copy:hover {
  color: var(--accent);
  background: var(--subtle);
}

.code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  word-break: break-all;
  color: var(--ink-2);
  white-space: pre-wrap;
}
.code .zero {
  color: var(--muted-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--subtle);
  font-size: 11.5px;
  color: var(--muted);
}
.chip b {
  color: var(--ink);
  font-weight: 500;
}

.alert {
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  background: color-mix(in srgb, var(--warn) 7%, transparent);
  color: var(--ink-2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  display: block;
  line-height: 1.6;
}
.alert b {
  color: var(--warn);
}

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13.5px;
}
.empty strong {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ---------- address / token headers ---------- */
.entity-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.entity-avatar {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 17px;
  color: #04201f;
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, #fff 12%, transparent);
}
.entity-title {
  min-width: 0;
  flex: 1;
}
.entity-kicker {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.entity-addr {
  font-family: var(--font-mono);
  font-size: 15px;
  margin-top: 5px;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.entity-stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.entity-stat .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}
.entity-stat .v {
  font-family: var(--font-mono);
  font-size: 15px;
  margin-top: 3px;
}
.entity-stat .v span {
  font-family: var(--font-sans);
  color: var(--muted-2);
  font-size: 11px;
  margin-left: 3px;
}

/* ---------- inputs ---------- */
.input {
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 13px;
  font: inherit;
  font-size: 13.5px;
  outline: none;
  width: 100%;
}
.input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--ring);
}

/* ---------- logs ---------- */
.log {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.log-hd {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  background: color-mix(in srgb, var(--subtle) 50%, transparent);
  flex-wrap: wrap;
}
.log-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}
.log-bd {
  padding: 10px 12px;
  display: grid;
  gap: 5px;
  font-size: 12.5px;
}
.log-arg {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}
.log-arg .k {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.log-arg .v {
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
}

/* ---------- home live ---------- */
.live-row {
  animation: fadein 0.4s ease;
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.skeleton {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--subtle) 25%,
    color-mix(in srgb, var(--subtle) 60%, var(--surface)) 37%,
    var(--subtle) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.loading-block {
  padding: 32px;
}
.loading-block .skeleton + .skeleton {
  margin-top: 14px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13px;
  z-index: 90;
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nav a {
    padding: 7px 8px;
    font-size: 13.5px;
  }
  .search {
    width: min(300px, 30vw);
  }
}
@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav {
    display: none;
  }
  .search {
    width: auto;
    flex: 1;
    margin-left: 0;
  }
  .topbar-inner {
    gap: 14px;
  }
  .hide-sm {
    display: none;
  }
}
@media (max-width: 640px) {
  :root {
    --sp: 16px;
  }
  .topbar-actions .btn {
    display: none;
  }
  .topbar-actions {
    gap: 6px;
  }
  .brand-name {
    font-size: 15px;
  }
  .topbar-inner {
    height: 58px;
  }
  .hero {
    padding: 34px 0 30px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-value {
    font-size: 17px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kv {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .kv-k {
    font-size: 11.5px;
  }
  .page-title {
    font-size: 22px;
  }
  .footer-inner {
    gap: 24px;
  }
  .tbl th,
  .tbl td {
    padding-left: 10px;
    padding-right: 10px;
  }
  .entity-stats {
    gap: 18px;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- additions ---------- */
.stat-unit {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.sans {
  font-family: var(--font-sans);
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.seg a {
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.seg a:hover {
  color: var(--ink);
}
.seg a.active {
  background: var(--subtle);
  color: var(--ink);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line);
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--muted-2);
  background: color-mix(in srgb, var(--subtle) 30%, transparent);
}

.gas-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 110px;
}
.gas-bar {
  display: block;
  height: 4px;
  flex: 1;
  min-width: 42px;
  border-radius: 999px;
  background: var(--subtle);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.gas-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  opacity: 0.75;
}

.token-dot {
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #04201f;
  font-family: var(--font-mono);
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.token-name {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.token-name b {
  font-size: 13px;
  font-weight: 600;
}
.token-name span {
  font-size: 11.5px;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  font-weight: 400;
}

.dir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 19px;
  min-width: 40px;
  padding: 0 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.dir-in {
  color: var(--ok);
  background: var(--ok-tint);
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
}
.dir-out {
  color: var(--accent);
  background: var(--accent-tint);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}
.dir-self {
  color: var(--muted);
  background: var(--subtle);
  border-color: var(--line);
}

.token-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface));
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.token-banner-name {
  font-size: 16px;
  font-weight: 600;
  margin-top: 3px;
}

.args {
  display: grid;
  gap: 5px;
  width: 100%;
}
.log-raw {
  border-top: 1px solid var(--line-soft);
  padding: 7px 12px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.log-raw summary {
  cursor: pointer;
  user-select: none;
}
.log-raw summary:hover {
  color: var(--accent);
}
.log-raw .code {
  margin-top: 8px;
  max-height: 180px;
  overflow: auto;
}

.code-scroll {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 6px;
}

.hash-full {
  word-break: break-all;
}

.tbl-compact th,
.tbl-compact td {
  padding: 10px 9px;
}
.tbl-compact .addr-flow {
  gap: 5px;
}

/* keep flex inputs from forcing horizontal overflow */
.hero-search input {
  flex: 1 1 auto;
  min-width: 0;
}
.hero-search .btn {
  flex: 0 0 auto;
}
body {
  overflow-x: clip;
}
@media (max-width: 640px) {
  .hero-search {
    flex-wrap: nowrap;
  }
  .hero-search .btn {
    padding: 0 14px;
    font-size: 13px;
  }
  .netbar-inner {
    gap: 12px;
  }
}

.gas-bar {
  height: 5px;
}
.gas-bar i {
  opacity: 0.95;
}
