:root {
  --bg: #052a19;
  --card: #04210f;
  --card-2: #073421;
  --line: #1b4632;
  --accent: #19c779;
  --accent-dark: #0f9a5c;
  --text: #eafff3;
  --muted: #a9d9bf;
  --orange: #f7931a;
  --red: #ff7a6b;
  --radius: 14px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3, .brand, .stat .value { font-family: "Space Grotesk", "Inter", system-ui, sans-serif; }
h1 { font-size: 1.6rem; margin: 0 0 .6rem; }
h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: calc(1240px + 2*max(5vw,16px)); margin: 0 auto; padding: 0 max(5vw,16px); }
.mono, code { font-family: var(--mono); font-size: .9em; }
.break { word-break: break-all; overflow-wrap: anywhere; }
.dim { color: var(--muted); opacity: .75; }
.small { font-size: .85rem; }
.big { font-size: 1.05rem; }
.accent { color: var(--orange); }
.ok { color: var(--accent); }
.warn { color: var(--orange); }
.pos { color: var(--accent); }
.neg { color: var(--red); }
.unit { color: var(--muted); font-size: .85em; }

/* Testnet notice */
.testnet-bar {
  background: var(--orange);
  color: #1d1200;
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
  padding: 5px 10px;
  letter-spacing: .02em;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: transparent; padding-bottom: 14px; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.25rem; }
.brand:hover { text-decoration: none; }
.brand img { display: block; }
.brand .q { color: var(--accent); }
.brand-sub { font-weight: 500; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .95rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }

.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; font-size: 16px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.search button {
  background: var(--accent); color: #04210f; border: 0; border-radius: 10px;
  padding: 0 18px; font-weight: 700; font-family: "Space Grotesk", sans-serif; font-size: 1rem; cursor: pointer;
}
.search button:hover { background: #2ee08f; }

main { padding-top: 20px; padding-bottom: 30px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h1, .card-head h2 { margin: 0; }
.error { text-align: center; padding: 40px 18px; }
.banner { padding: 8px 12px; border-radius: 8px; background: rgba(247, 147, 26, .12); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats.compact { margin: 12px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stats.compact .stat { background: var(--card-2); }
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.3rem; font-weight: 600; word-break: break-word; }
.stat .sub { color: var(--muted); font-size: .85rem; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th { text-align: left; color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 8px; border-bottom: 1px solid #143b29; white-space: nowrap; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: #031a0d; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }

/* Key/value */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
meter { display: block; width: 100%; max-width: 320px; height: 8px; margin-top: 4px; }

.prevnext { display: flex; gap: 14px; }
.pager { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; margin-top: 14px; color: var(--muted); }
.pager a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; }

/* Tags */
.tag { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); font-weight: 600; vertical-align: middle; }
.tag-pq { color: var(--accent); border-color: var(--accent-dark); }
.pill { font-size: .85rem; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }

/* Inputs / outputs */
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.io .card { margin-bottom: 18px; min-width: 0; }
.io-list { list-style: none; margin: 0; padding: 0; }
.io-list > li { padding: 10px 0; border-bottom: 1px solid #143b29; }
.io-list > li:last-child { border-bottom: 0; }
.io-main { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.io-main .addr { word-break: break-all; min-width: 0; }
.io-main .num { white-space: nowrap; }
.io-sub { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.addr.self { color: var(--orange); }

details summary { cursor: pointer; color: var(--muted); margin: 6px 0; }
details summary:hover { color: var(--text); }
.witness summary { font-size: .85rem; }
.wit-item { margin: 8px 0; }
code.hex {
  display: block; max-height: 220px; overflow: auto; padding: 8px 10px; margin-top: 4px;
  background: #031a0d; border: 1px solid var(--line); border-radius: 8px;
  word-break: break-all; white-space: pre-wrap; font-size: .78rem; color: var(--muted);
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; padding: 18px 0 28px; }
.site-footer p { margin: 4px 0; }

/* Phones */
@media (max-width: 820px) {
  .io { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .brand { font-size: 1.1rem; }
  .brand-sub { display: block; font-size: .85rem; }
  .nav { font-size: .9rem; gap: 4px 12px; }
  .card { padding: 14px; border-radius: 12px; }
  .hide-sm { display: none; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { margin-top: 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat .value { font-size: 1.05rem; }
  table.list td, table.list th { padding: 6px 5px; }
  .io-main { flex-direction: column; gap: 2px; }
}

/* Space between the explorer header and the page. */
.site-header{margin-bottom:20px}

/* Light layout: fine borders, no heavy fills. */
body{-webkit-font-smoothing:antialiased;background:radial-gradient(900px 520px at 85% 0%,#0f6e40 0%,rgba(15,110,64,0) 65%),radial-gradient(700px 400px at 0% 100%,#0a4a2c 0%,rgba(10,74,44,0) 70%),#052a19;background-size:100% 760px,100% 760px,auto;background-position:0 109px,0 109px,0 0;background-repeat:no-repeat}
.status-table{margin-top:14px}.status-table td{white-space:normal}.st{display:inline-flex;align-items:center;gap:7px;font-weight:500}.st::before{content:"";width:8px;height:8px;border-radius:50%}.ok-st{color:#19c779}.ok-st::before{background:#19c779}.bad-st{color:#ff7a6b}.bad-st::before{background:#d92d20}

/* One explorer row: search, then Blocks and Mempool. */
.header-row .search{flex:1 1 460px}
.header-row .nav{gap:4px 20px}
