:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #d8e0ea;
  --blue: #1769e0;
  --blue-dark: #0f3e8c;
  --teal: #087f8c;
  --green: #16803c;
  --amber: #b86500;
  --red: #c53030;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, #e8f0fb 0, var(--bg) 360px);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

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

.shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 18px 24px 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(190px, auto);
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: block;
  object-fit: cover;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.brand small,
.panel-head p,
.hero p,
.metric small,
.row small,
.detail-summary span,
.network-facts span,
.network-facts small,
.economics-heading p,
.protocol-row-heading small,
.protocol-metrics span,
.protocol-metrics small {
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid rgba(216, 224, 234, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 6px;
  color: #334155;
  font-size: 14px;
}

.nav a:hover,
.nav a:focus-visible {
  background: #eef4ff;
  color: var(--blue);
  outline: none;
}

.network-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #334155;
  font-size: 14px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(184, 101, 0, 0.13);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 128, 60, 0.14);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 24px;
  align-items: end;
  margin-top: 14px;
  padding: 30px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #edf5ff 100%);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h1 {
  max-width: 680px;
  font-size: 42px;
  line-height: 1.12;
}

.hero-copy > p:last-child {
  max-width: 640px;
  margin-top: 12px;
  line-height: 1.7;
}

.search-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.search-card label {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
}

.search-row input {
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
}

.search-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 224, 0.1);
}

.search-row button,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.search-row button {
  min-height: 46px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.search-row button:hover,
.search-row button:focus-visible {
  background: var(--blue-dark);
  outline: 3px solid rgba(23, 105, 224, 0.2);
}

.search-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.metrics,
.network-facts {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.network-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric,
.panel,
.network-facts article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 122px;
  padding: 17px;
  overflow: hidden;
}

.metric span {
  color: var(--muted);
  font-size: 14px;
}

.metric strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric.primary {
  background: #102039;
}

.metric.primary span,
.metric.primary small {
  color: #b7c6dc;
}

.metric.primary strong {
  color: #fff;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.panel-head h2 {
  font-size: 17px;
  line-height: 1.25;
}

.panel-head p {
  margin-top: 4px;
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 18px;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: #dbeafe;
  outline: 3px solid rgba(23, 105, 224, 0.16);
}

.icon-button.is-loading {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.table-list {
  display: grid;
  min-height: 132px;
}

.row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
}

.row-button {
  cursor: pointer;
}

.row:hover,
.row:focus-visible {
  background: #f3f7fc;
  outline: none;
}

.row:last-child {
  border-bottom: 0;
}

.row strong,
.hash {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row strong {
  display: block;
  color: var(--blue);
  font-size: 15px;
}

.row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.hash {
  color: #334155;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f8fa;
  color: #096b76;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  min-height: 132px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.detail-panel {
  margin-top: 18px;
}

.economics-section {
  margin-top: 18px;
  scroll-margin-top: 84px;
}

.economics-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 2px 14px;
}

.economics-heading h2 {
  font-size: 24px;
}

.economics-heading > div > p:last-child {
  margin-top: 7px;
  font-size: 13px;
}

.protocol-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.protocol-metrics article {
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.protocol-metrics strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-hash {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 15px !important;
}

.economics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.protocol-list {
  display: grid;
  min-height: 132px;
}

.protocol-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(0, 1.6fr);
  gap: 18px;
  align-items: center;
  min-height: 84px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.protocol-row:last-child {
  border-bottom: 0;
}

.protocol-row-heading {
  min-width: 0;
}

.protocol-row-heading strong,
.protocol-row-heading small {
  display: block;
}

.protocol-row-heading strong {
  font-size: 14px;
}

.protocol-row-heading small {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.4;
}

.protocol-row-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.protocol-fact {
  min-width: 0;
}

.protocol-fact dt {
  color: var(--muted);
  font-size: 10px;
}

.protocol-fact dd {
  overflow: hidden;
  margin-top: 4px;
  color: #243449;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-value-mono {
  font-family: "Consolas", "Courier New", monospace;
}

.economics-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.detail-body {
  min-height: 180px;
}

.detail-summary {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.detail-summary strong {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 15px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.4fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 58px;
  align-items: center;
  padding: 13px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-row:nth-child(2n) {
  border-right: 0;
}

.detail-row dt {
  color: #334155;
  font-weight: 700;
}

.detail-row dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  text-align: right;
}

.network-facts {
  margin-bottom: 0;
}

.network-facts article {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 16px;
}

.network-facts strong {
  color: #0f172a;
  font-size: 19px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .hero,
  .dashboard,
  .economics-grid {
    grid-template-columns: 1fr;
  }

  .metrics,
  .network-facts,
  .protocol-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 12px 14px 24px;
  }

  .topbar,
  .metrics,
  .network-facts,
  .protocol-metrics,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .network-pill {
    justify-content: flex-start;
  }

  .hero {
    padding: 20px;
  }

  h1 {
    font-size: 30px;
  }

  .search-row,
  .row {
    grid-template-columns: 1fr;
  }

  .search-row button {
    min-height: 44px;
  }

  .row {
    gap: 6px;
  }

  .badge {
    justify-self: start;
  }

  .detail-row,
  .detail-row:nth-child(2n) {
    grid-template-columns: 1fr;
    gap: 6px;
    border-right: 0;
  }

  .detail-row dd {
    text-align: left;
  }

  .economics-heading {
    align-items: center;
  }

  .protocol-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .protocol-row-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
