/* SwitchPoolProfit explorer. Same family as the pool's site (Geist, the navy ground, the
   blue accent), plus one warm colour kept for the pool's own blocks. */

:root {
  --bg: #090B17;
  --band: #0B0E1F;
  --grid: #12162E;
  --surface: #11142A;
  --surface-2: #181C38;
  --stake: #1E2348;
  --stake-edge: #131630;
  --ink: #EEF0FB;
  --muted: #A5ACCE;
  --line: #272C4E;
  --line-soft: #1F2444;
  --line-strong: #3A4170;
  --accent: #2646F7;
  --accent-deep: #0D2199;
  --accent-text: #93A5FF;
  --accent-soft: #E2E7FF;
  --ours: #FFB37A;
  --ours-deep: #B8672C;
  --on-ours: #0C1024;
  --live: #5EE0A0;
  --r-block: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --sans: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; }
@media (hover: hover) { a:hover { color: #C3CDFF; } }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
img { display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--bg); font-weight: 500; }
.skip:focus { top: 12px; }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: 32px; }

/* ---- top bar ---- */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 14px 32px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand b { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.02em; }
.brand span { color: var(--muted); }
.chains { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line); }
.chains > * { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 18px; border-radius: var(--r-md); font-weight: 500; text-decoration: none; color: var(--muted); }
.chains img { width: 22px; height: 22px; }
.chains [aria-current] { background: var(--accent); color: #fff; }
.chains .soon { cursor: default; }
.chains .soon small { font-size: 0.8125rem; font-weight: 400; }
.search { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px 0 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line); transition: box-shadow 160ms ease; }
.search:focus-within { box-shadow: 0 0 0 2px var(--accent-text); }
.search svg { flex: none; }
.search input { flex: 1 1 auto; min-width: 0; height: 46px; background: transparent; border: 0; outline: 0; color: var(--ink); font-family: var(--mono); font-size: 1rem; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search button { flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.search button:active { transform: scale(0.97); }
@media (hover: hover) { .search button:hover { background: var(--line); } }
.search-note { flex-basis: 100%; color: var(--ours); font-size: 0.9375rem; }
.top .back { display: flex; align-items: center; min-height: 44px; font-weight: 500; }

/* ---- the band with the two lanes ---- */
.band { background-color: var(--band); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 36px 36px; border-bottom: 1px solid var(--line); }
.band .wrap { padding-block: 36px 40px; display: flex; flex-direction: column; gap: 28px; }
.band-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.band-head > div:first-child { display: flex; flex-direction: column; gap: 8px; }
.live { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.live i { width: 10px; height: 10px; border-radius: 50%; background: var(--live); }
.live.stale i { background: var(--ours); }
h1.title { font-size: clamp(2rem, 4.2vw, 2.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.band-head p { color: var(--muted); max-width: 60ch; text-wrap: pretty; }
.band-head p.hash { max-width: none; color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.9375rem; color: var(--muted); padding: 0; margin: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 9px; }
.sw { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.sw.pow { background: var(--accent); box-shadow: 3px 3px 0 var(--accent-deep); }
.sw.ours { background: var(--ours); box-shadow: 3px 3px 0 var(--ours-deep); }
.sw.pos { background: var(--stake); box-shadow: inset 0 0 0 1px var(--line-strong); }

.lanes { display: flex; overflow-x: auto; padding-bottom: 14px; scrollbar-color: var(--line-strong) transparent; overscroll-behavior-x: contain; }
.col { flex: none; display: flex; flex-direction: column; }
.col .up { height: 180px; padding: 0 8px 16px; display: flex; align-items: flex-end; border-bottom: 1px dashed var(--line-strong); }
.col .down { height: 112px; padding: 16px 8px 0; display: flex; align-items: flex-start; }
.col.c-pow { width: 172px; }
.col.c-pos { width: 92px; }
.col.c-pos .up, .col.c-pow .down { padding: 0; }
.col.labels { width: 104px; }
.col.labels .up, .col.labels .down { padding-inline: 0 12px; font-size: 0.9375rem; font-weight: 500; line-height: 1.25; }
.col.labels .down { color: var(--muted); }
.col.now { width: 28px; align-items: center; }
.col.now i { width: 2px; height: 292px; background: var(--live); }
.col.new { animation: arrive 420ms var(--ease-out) both; }
@keyframes arrive { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

.tile { display: flex; flex-direction: column; justify-content: space-between; border-radius: var(--r-block); text-decoration: none; transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.tile.pow { width: 156px; height: 152px; padding: 14px; background: var(--accent); color: #fff; box-shadow: 6px 6px 0 var(--accent-deep); }
.tile.pow.ours { background: var(--ours); color: var(--on-ours); box-shadow: 6px 6px 0 var(--ours-deep); }
.tile.pos { width: 76px; height: 76px; padding: 9px 8px; background: var(--stake); color: var(--ink); box-shadow: 4px 4px 0 var(--stake-edge), inset 0 0 0 1px var(--line-strong); font-family: var(--mono); font-size: 0.8125rem; }
.tile.next { width: 156px; height: 152px; padding: 14px; border: 1.5px dashed var(--accent-text); background: var(--band); color: var(--ink); }
.tile:active { transform: translate(2px, 2px); }
.tile.pow:active { box-shadow: 4px 4px 0 var(--accent-deep); }
.tile.pow.ours:active { box-shadow: 4px 4px 0 var(--ours-deep); }
@media (hover: hover) {
  a.tile.pow:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--accent-deep); color: #fff; }
  a.tile.pow.ours:hover { box-shadow: 8px 8px 0 var(--ours-deep); color: var(--on-ours); }
  a.tile.pos:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--stake-edge), inset 0 0 0 1px var(--accent-text); color: var(--ink); }
}
.tile .top-part { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mono.up { color: var(--ours); }
.btn[hidden] + .note { align-self: center; }
.btn:disabled { opacity: 0.6; cursor: default; }
.tile .h { font-family: var(--mono); font-size: 1.375rem; font-weight: 500; letter-spacing: -0.03em; }
.tile .who { font-size: 0.9375rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .facts { display: flex; flex-direction: column; font-family: var(--mono); font-size: 0.875rem; }
.tile.pow:not(.ours) .facts { color: var(--accent-soft); }
.tile.pos .t { color: var(--muted); }
.tile.next b { font-size: 0.9375rem; font-weight: 500; color: var(--accent-text); }
.tile.next .facts { font-family: var(--sans); color: var(--muted); white-space: nowrap; }
.tile.next .facts span span { font-family: var(--mono); color: var(--ink); }

/* a pool's mark: its logo, or its initials on a plain square when we have no logo */
.mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-deep); font-family: var(--sans); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0; overflow: hidden; }
.mark img { width: 100%; height: 100%; object-fit: cover; }
.mark.plain { background: var(--stake); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.mark.s30 { width: 30px; height: 30px; border-radius: 6px; font-size: 0.75rem; }
.mark.s34 { width: 34px; height: 34px; border-radius: 7px; font-size: 0.8125rem; }
.mark.s56 { width: 56px; height: 56px; border-radius: 12px; font-size: 1.125rem; }
.finder { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; font-family: var(--sans); }
.finder.ours { color: var(--ours); font-weight: 500; }
a.finder { text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color 160ms ease; }
@media (hover: hover) { a.finder:hover { color: var(--ink); text-decoration-color: currentColor; } a.finder.ours:hover { color: var(--ours); } }

/* ---- page body ---- */
main.body { max-width: 1320px; margin: 0 auto; padding: 40px 32px 64px; display: flex; flex-direction: column; gap: 40px; }
.figures { display: flex; flex-wrap: wrap; gap: 28px 48px; }
.figures > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; }
.figures dt, .figures .k { font-size: 0.9375rem; color: var(--muted); }
.figures .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(1.75rem, 3.4vw, 2.375rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.figures .n { font-size: 0.9375rem; color: var(--muted); }
.figures .n.up { color: var(--ours); }

.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .wide { flex: 999 1 620px; min-width: 0; }
.split > .side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.card { padding: 28px; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 16px; }
.card.tight { padding: 24px; gap: 14px; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.card.tight h2 { font-size: 1.125rem; letter-spacing: -0.015em; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.note { font-size: 0.9375rem; color: var(--muted); text-wrap: pretty; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 8px 16px 10px; font-size: 0.9375rem; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
th.num { font-family: var(--sans); }
td.dim, .dim { color: var(--muted); }
table.blocks { min-width: 600px; }
table.pools { min-width: 640px; }
.kind { display: inline-flex; align-items: center; gap: 8px; }

.spark { width: 100%; height: 96px; display: block; }
.spark-ends { display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 0.875rem; color: var(--muted); }
.bar { display: flex; gap: 3px; height: 18px; }
.bar i { border-radius: 4px; min-width: 4px; background: var(--line-strong); }
.bar i.known { background: var(--accent); }
.bar i.ours { background: var(--ours); }
.who-list { display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; list-style: none; }
.who-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.who-list .mono { color: var(--muted); }

.card.ours { background: var(--ours); color: var(--on-ours); box-shadow: 6px 6px 0 var(--ours-deep); gap: 10px; }
.card.ours .head { display: flex; align-items: center; gap: 10px; }
.card.ours .head img { width: 28px; height: 28px; border-radius: 6px; }
.card.ours .big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card.ours .big b { font-family: var(--mono); font-size: 2.75rem; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.card.ours .big span { font-weight: 500; }
.card.ours p { font-size: 0.9375rem; }
.card.ours a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; align-self: flex-start; color: var(--on-ours); font-weight: 600; }
.card.ours a svg { transition: transform 200ms var(--ease-out); }
@media (hover: hover) { .card.ours a:hover { color: var(--on-ours); } .card.ours a:hover svg { transform: translateX(3px); } }

/* ---- block, transaction and pool pages ---- */
.band .crumb { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; align-self: flex-start; font-weight: 500; }
.band.page .wrap { padding-block: 20px 48px; gap: 20px; }
.hero { display: flex; flex-wrap: wrap; align-items: stretch; gap: 36px 56px; }
.slab { flex: none; width: 280px; max-width: 100%; min-height: 232px; padding: 22px; border-radius: 8px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; background: var(--stake); color: var(--ink); box-shadow: 10px 10px 0 var(--stake-edge), inset 0 0 0 1px var(--line-strong); }
.slab.pow { background: var(--accent); color: #fff; box-shadow: 10px 10px 0 var(--accent-deep); }
.slab.ours { background: var(--ours); color: var(--on-ours); box-shadow: 10px 10px 0 var(--ours-deep); }
.slab .k { font-size: 0.9375rem; font-weight: 500; }
.slab h1 { font-family: var(--mono); font-size: 3.75rem; font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.slab .by { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; font-weight: 600; min-width: 0; }
.slab .by span:last-child { overflow: hidden; text-overflow: ellipsis; }
.slab small { font-size: 0.9375rem; }
.hero-side { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.hero-side .figures .v { font-size: clamp(1.5rem, 3vw, 2.125rem); }
.hero-side .figures > div { flex: 0 1 auto; }
.confirm { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.confirm .line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.confirm .line b { font-weight: 500; }
.confirm .line .mono b { font-size: 1.375rem; }
.meter { height: 14px; border-radius: 4px; background: var(--stake); box-shadow: inset 0 0 0 1px var(--line-strong); overflow: hidden; }
.meter i { display: block; height: 100%; min-width: 10px; border-radius: 4px; background: var(--ours); transition: width 500ms var(--ease-out); }
.meter.done i { background: var(--live); }

.sheet { display: flex; flex-direction: column; }
.sheet > div { display: flex; flex-wrap: wrap; gap: 4px 32px; padding: 15px 0; border-top: 1px solid var(--line); }
.sheet > div:last-child { padding-bottom: 0; }
.sheet dt { flex: 0 0 168px; color: var(--muted); }
.sheet dd { flex: 1 1 300px; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.hash { font-family: var(--mono); font-size: 0.9375rem; overflow-wrap: anywhere; }
.txs { display: flex; flex-direction: column; padding: 0; margin: 0; list-style: none; }
.txs li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.txs li:first-child { border-top: 1px solid var(--line); }
.txs .id { font-family: var(--mono); font-size: 0.9375rem; min-width: 0; overflow-wrap: anywhere; flex: 1 1 320px; }
.txs .amt { font-family: var(--mono); white-space: nowrap; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-family: var(--sans); font-size: 0.8125rem; margin-left: 8px; }
.io { display: flex; flex-wrap: wrap; gap: 24px; }
.io .card { flex: 1 1 420px; min-width: 0; }
.io ul { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; }
.io li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.io li:first-child { border-top: 1px solid var(--line); }
.io .addr { font-family: var(--mono); font-size: 0.9375rem; min-width: 0; overflow-wrap: anywhere; flex: 1 1 260px; }
.near { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; }
.near a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 20px; border-radius: var(--r-block); background: var(--stake); box-shadow: 4px 4px 0 var(--stake-edge), inset 0 0 0 1px var(--line-strong); color: var(--ink); text-decoration: none; transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.near a:active { transform: translate(2px, 2px); }
@media (hover: hover) { .near a:hover { color: var(--ink); box-shadow: 4px 4px 0 var(--stake-edge), inset 0 0 0 1px var(--accent-text); } }
.near a span { display: flex; flex-direction: column; }
.near a small { font-size: 0.875rem; color: var(--muted); }
.near a b { font-family: var(--mono); font-weight: 500; }
.near a.right { text-align: right; margin-left: auto; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line); align-self: flex-start; }
.tabs a { display: flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-md); color: var(--muted); font-weight: 500; text-decoration: none; }
.tabs a[aria-current] { background: var(--accent); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; align-self: center; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
.btn:active { transform: scale(0.97); }
@media (hover: hover) { .btn:hover { background: var(--line); } }

.pool-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.pool-head h1 { font-size: clamp(2rem, 4.2vw, 2.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.pool-head .ident { display: flex; align-items: center; gap: 18px; min-width: 0; }

/* loading, empty and error states */
.skeleton { border-radius: var(--r-block); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; color: transparent !important; user-select: none; }
.skeleton * { visibility: hidden; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.state { padding: 56px 0; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.state h1 { font-size: clamp(2rem, 4.2vw, 2.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.state p { color: var(--muted); max-width: 56ch; }
.state .code { font-family: var(--mono); color: var(--muted); }
[hidden] { display: none !important; }

footer.foot { border-top: 1px solid var(--line); padding: 24px 32px; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; align-items: center; font-size: 0.9375rem; color: var(--muted); }
footer.foot a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 720px) {
  .wrap, main.body { padding-inline: 16px; }
  .top, footer.foot { padding-inline: 16px; }
  .band .wrap { padding-block: 28px 28px; }
  main.body { padding-block: 32px 48px; gap: 32px; }
  .card { padding: 20px 16px; }
  .chains > * { padding: 0 14px; }
  .col.labels { width: 76px; }
  .sheet dt { flex-basis: 100%; }
  .slab { width: calc(100% - 10px); min-height: 0; }
  .card.ours { margin-right: 6px; }
  .slab h1 { font-size: 3rem; }
  .near a.right { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .col.new, .skeleton { animation: none; }
  .tile, .near a, .btn, .search button, .meter i, .card.ours a svg { transition: none; }
}
