:root {
  --canvas: #07100d;
  --sidebar: #091410;
  --surface: #0d1a16;
  --surface-2: #12221c;
  --surface-3: #172a22;
  --line: #263b32;
  --line-soft: rgba(151, 177, 164, 0.14);
  --text: #f4f8f5;
  --muted: #9dafA5;
  --faint: #6f8178;
  --mint: #67e6aa;
  --amber: #f3c969;
  --coral: #ff8875;
  --blue: #8fb4ff;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--canvas);
  font-family: var(--sans);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.mono {
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.explorer-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}

.explorer-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px 16px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 20;
}

.explorer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(103, 230, 170, 0.4);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--mint);
  background: #10241c;
  font-weight: 800;
  font-size: 12px;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  display: block;
  font-weight: 750;
  font-size: 14px;
}

.brand-subtitle,
.eyebrow,
.label,
.table-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--faint);
}

.side-section-label {
  padding: 0 9px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.explorer-nav {
  display: grid;
  gap: 4px;
}

.explorer-nav a {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.explorer-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.explorer-nav a.active {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-2);
}

.explorer-nav svg,
.top-search svg,
.button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px 9px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 9px;
}

.sidebar-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(103, 230, 170, 0.1);
}

.explorer-main {
  min-width: 0;
}

.explorer-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 13, 0.94);
  backdrop-filter: blur(16px);
  padding: 12px 24px;
  display: grid;
  grid-template-columns: minmax(260px, 640px) 1fr auto;
  gap: 14px;
  align-items: center;
}

.top-search {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
}

.top-search:focus-within {
  border-color: rgba(103, 230, 170, 0.65);
}

.top-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 0;
}

.top-search input::placeholder {
  color: var(--faint);
}

.key-hint {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.top-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.status-chip {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.status-chip strong {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
}

.icon-button,
.button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.icon-button {
  width: 38px;
  padding: 0;
}

.button:hover,
.icon-button:hover {
  border-color: rgba(103, 230, 170, 0.55);
}

.button.primary {
  border-color: var(--mint);
  background: var(--mint);
  color: #07100d;
}

.button.danger {
  color: var(--coral);
}

.explorer-content {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 30px 28px 88px;
  display: grid;
  gap: 24px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.page-heading h1 {
  margin: 5px 0 0;
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.05;
  font-weight: 760;
}

.page-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  max-width: 740px;
  line-height: 1.55;
  font-size: 14px;
}

.heading-actions,
.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 15px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric-icon {
  width: 27px;
  height: 27px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--mint);
}

.metric-icon svg {
  width: 15px;
  height: 15px;
}

.metric-value {
  font-family: var(--mono);
  font-size: clamp(21px, 2.3vw, 30px);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.metric-foot {
  color: var(--faint);
  font-size: 11px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.panel {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.panel-head {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 740;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 13px;
  text-align: left;
  font-size: 12px;
}

th {
  color: var(--faint);
  background: #0b1713;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.clickable {
  cursor: pointer;
}

tbody tr.clickable:hover {
  background: rgba(103, 230, 170, 0.045);
}

.hash-link,
.height-link {
  color: var(--blue);
  font-family: var(--mono);
  font-weight: 600;
}

.height-link {
  color: var(--mint);
}

.badge {
  width: fit-content;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

.badge.good,
.tone-good {
  color: var(--mint);
  border-color: rgba(103, 230, 170, 0.35);
}

.badge.warn,
.tone-warn {
  color: var(--amber);
  border-color: rgba(243, 201, 105, 0.35);
}

.badge.bad,
.tone-bad {
  color: var(--coral);
  border-color: rgba(255, 136, 117, 0.35);
}

.side-stack,
.detail-grid,
.validator-list,
.node-list {
  display: grid;
  gap: 10px;
}

.summary-row,
.validator-row,
.node-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.summary-row strong {
  max-width: 62%;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.activity-visual {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 24%, rgba(151, 177, 164, 0.08) 25%, transparent 26%, transparent 49%, rgba(151, 177, 164, 0.08) 50%, transparent 51%, transparent 74%, rgba(151, 177, 164, 0.08) 75%, transparent 76%),
    var(--surface);
  padding: 18px;
  display: flex;
  align-items: end;
  gap: 7px;
  overflow: hidden;
}

.activity-bar {
  flex: 1 1 0;
  min-width: 6px;
  max-width: 28px;
  height: var(--bar-height, 30%);
  border-radius: 3px 3px 0 0;
  background: var(--mint);
  opacity: 0.68;
}

.activity-bar:nth-child(4n) {
  background: var(--blue);
}

.activity-bar:nth-child(7n) {
  background: var(--amber);
}

.search-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
  padding: 9px 11px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(103, 230, 170, 0.7);
}

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

.detail-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 6px;
}

.detail-card strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.json-view {
  max-height: 520px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050b09;
  color: #c5d6cd;
  padding: 15px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.validator-row,
.node-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.validator-avatar,
.node-avatar {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--mint);
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.row-title {
  font-size: 12px;
  font-weight: 700;
}

.row-subtitle {
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.empty-state {
  min-height: 160px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 12px;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .explorer-topbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .top-status {
    display: none;
  }
}

@media (max-width: 820px) {
  .explorer-shell {
    grid-template-columns: 1fr;
  }

  .explorer-sidebar {
    display: none;
  }

  .explorer-topbar {
    min-height: 58px;
    padding: 9px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .explorer-content {
    padding: 22px 14px 90px;
    gap: 20px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 100px;
  }

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

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    min-height: 64px;
    border-top: 1px solid var(--line);
    background: rgba(9, 20, 16, 0.97);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }

  .mobile-nav a {
    display: grid;
    place-items: center;
    gap: 3px;
    color: var(--faint);
    font-size: 9px;
    font-weight: 650;
  }

  .mobile-nav a.active {
    color: var(--mint);
  }

  .mobile-nav svg {
    width: 17px;
    height: 17px;
  }
}
