:root {
  --blue: #2f6bff;
  --lime: #c8f54a;
  --ink: #111;
  --muted: #6b7280;
  --line: #ececec;
  --bg: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

.ticker {
  background: #eef6d6;
  color: #3f4d1f;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  border-bottom: 1px solid #e0e9c4;
  height: 32px;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 0 16px;
  height: 32px;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.ticker b { color: var(--blue); }
.up { color: #16a34a; }
.down { color: #dc2626; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.6px;
  font-size: 18px;
  color: var(--blue);
}
.brand img { width: 28px; height: 28px; display: block; }
.menu-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  display: grid;
  gap: 5px;
  align-content: center;
  justify-items: center;
  cursor: pointer;
}
.menu-btn span {
  width: 18px;
  height: 2px;
  background: #222;
  display: block;
}
.menu-btn.x {
  gap: 0;
}
.menu-btn.x span {
  grid-area: 1 / 1;
}
.menu-btn.x span:nth-child(1) {
  transform: rotate(45deg);
}
.menu-btn.x span:nth-child(2) {
  transform: rotate(-45deg);
}

.wrap { padding: 16px 16px 0; max-width: 720px; margin: 0 auto; }

.promo {
  background: #0b1b4a;
  color: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}
.promo h3 { margin: 0 0 4px; font-size: 16px; }
.promo p { margin: 0; font-size: 12px; color: #b9c7ff; }
.promo-art {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(160deg, #3d7bff, #1d4ed8);
  display: grid;
  place-items: center;
  flex: 0 0 64px;
}
.promo-art svg { width: 36px; height: 36px; }

.hero { padding: 22px 0 8px; }
.hero h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.hero p { margin: 0; color: #222; font-size: 15px; }

.search {
  margin: 18px 0 8px;
  display: flex;
  align-items: stretch;
  border: 2px solid var(--blue);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.search .scan {
  display: flex;
  align-items: center;
  padding: 0 0 0 12px;
  color: var(--blue);
}
.search input {
  flex: 1;
  border: 0;
  padding: 14px 12px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}
.search button {
  border: 0;
  background: var(--blue);
  color: #fff;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.section-title { font-size: 22px; margin: 8px 0 12px; }

.chains { display: flex; flex-direction: column; }
.chain {
  position: relative;
  background: #111 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><circle cx='40' cy='40' r='18' fill='none' stroke='%23222' stroke-width='8'/></svg>");
  color: #fff;
  border-radius: 14px;
  padding: 16px 16px 18px;
  margin-bottom: 12px;
  overflow: hidden;
  min-height: 132px;
}
.chain-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chain-top strong { font-size: 20px; }
.chain-top a { color: var(--lime); font-size: 13px; font-weight: 600; }
.metrics {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #e8e8e8;
  padding-right: 96px;
  position: relative;
  z-index: 1;
}
.metrics b { font-weight: 600; color: #fff; }
.coin {
  position: absolute;
  right: 6px;
  bottom: -10px;
  width: 92px;
  height: 92px;
  pointer-events: none;
  z-index: 0;
}

.dev h2 { font-size: 22px; margin: 22px 0 14px; }
.dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 10px;
  padding-bottom: 28px;
}
.dev-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  text-align: center;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

.footer {
  background: #000;
  color: #fff;
  padding: 28px 16px 40px;
  margin-top: 8px;
}
.footer-inner {
  max-width: 980px;
  margin: 0 auto;
}
.footer .word {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.socials span {
  width: 36px;
  height: 36px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
}
.socials svg { width: 16px; height: 16px; display: block; }
.foot-copy {
  color: #9ca3af;
  font-size: 12px;
  margin: 0 0 18px;
}
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  border-top: 1px solid #222;
  padding-top: 16px;
}
.cols h4 { margin: 0 0 10px; color: #9ca3af; font-size: 12px; font-weight: 500; }
.cols a, .cols button.link {
  display: block;
  font-size: 14px;
  padding: 5px 0;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
}

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 40;
  display: none;
}
.drawer.open { display: block; }
.drawer-panel {
  background: #000;
  color: #fff;
  min-height: 100%;
  overflow: auto;
  padding: 0 16px 40px;
}
.drawer-head {
  background: #fff;
  color: var(--blue);
  margin: 0 -16px 16px;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}
.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}
.drawer-grid a, .drawer-grid button.link {
  display: block;
  padding: 8px 0;
  font-size: 15px;
  background: none;
  border: 0;
  color: #fff;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.drawer-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  border-top: 1px solid #222;
  margin-top: 18px;
  padding-top: 14px;
}
.drawer-foot h4 { margin: 0 0 8px; color: #888; font-size: 12px; }
.drawer-foot a, .drawer-foot button.link {
  display: block;
  padding: 6px 0;
  background: none;
  border: 0;
  color: #fff;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

#out:empty { display: none; margin: 0; }
body.is-legal #out { display: none; }
body.is-result #home,
body.is-result #home-body { display: none; }
#out { margin: 8px 0 16px; }
.result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.result h2 { margin: 0 0 12px; font-size: 18px; }
.badge {
  display: inline-block;
  background: #e8f0ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.badge.bad { background: #fee2e2; color: #b91c1c; }
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f1f1;
  font-size: 13px;
}
.kv span { color: #6b7280; flex: 0 0 38%; }
.kv b, .kv code {
  font-weight: 600;
  word-break: break-all;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.hint { color: #6b7280; font-size: 13px; line-height: 1.6; }
.hashbox {
  background: #f6f8fc;
  border: 1px solid #e6ecf5;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
  line-height: 1.55;
  margin-top: 6px;
}
.tools {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #4b5563;
  font-size: 13px;
  margin: 4px 0 18px;
}
.tools button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.tools .on { color: var(--blue); font-weight: 700; }
.latest {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 22px;
}
.latest h3 {
  margin: 0;
  padding: 14px 16px 10px;
  font-size: 16px;
}
.latest table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.latest th, .latest td {
  padding: 10px 12px;
  text-align: left;
  border-top: 1px solid #f3f4f6;
}
.latest th { color: #9ca3af; font-weight: 500; }
.latest td a { color: var(--blue); }
.latest .muted { color: #9ca3af; }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.stat small { color: #9ca3af; font-size: 11px; }
.stat b { display: block; margin-top: 4px; font-size: 16px; line-height: 1.3; }
.stat b .up, .stat b .down { font-size: 12px; font-weight: 600; margin-left: 4px; }
.home.off, .legal { display: none; }
.legal.on { display: block; padding: 8px 0 32px; min-height: 42vh; }
.legal h2 { margin: 0 0 10px; }
.legal p, .legal li { color: #444; line-height: 1.7; font-size: 14px; }
.legal ul { padding-left: 18px; }
.back {
  display: inline-block;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hash-block { margin: 12px 0 4px; }
.hash-block label {
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 6px;
}
.search button:disabled { opacity: 0.65; cursor: wait; }
.dev-item:hover { color: var(--blue); }
.ico-tile {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.ico-tile svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.t-blue { background: #2f6bff; }
.t-orange { background: #f59e0b; }
.t-green { background: #16a34a; }
.t-purple { background: #7c3aed; }
.t-pink { background: #ec4899; }
.t-cyan { background: #0891b2; }
.t-teal { background: #0d9488; }
.t-navy { background: #1e3a8a; }
@media (min-width: 860px) {
  .wrap { max-width: 980px; }
  .chains { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .chain { margin-bottom: 0; }
  .chain.echain { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 24px; }
  .search input { font-size: 12px; padding: 12px 8px; }
  .search button { padding: 0 12px; font-size: 13px; }
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
  vertical-align: middle;
}
.chain.echain { background-color: #0b1b4a; }
.chain.proto.ba { background-color: #3b1020; }
.chain.proto.dt { background-color: #0b2a33; }
.check { color: #ef4444; font-weight: 700; }
.drawer-head .brand { color: var(--blue); }
.result .kv:last-of-type { border-bottom: 0; }
