:root {
  --bg:          #080b0f;
  --surface:     rgba(255,255,255,.035);
  --surface-2:   rgba(255,255,255,.022);
  --border:      rgba(255,255,255,.08);
  --border-soft: rgba(255,255,255,.05);
  --text:        #dde4ed;
  --muted:       rgba(180,192,210,.55);
  --muted-2:     rgba(180,192,210,.32);
  --accent:      #7aa2ff;
  --green:       rgba(120,255,170,.85);
  --amber:       rgba(255,214,102,.85);
  --red:         rgba(255,110,110,.80);
  --modal-bg:    rgba(0,0,0,.55);
  --font-ui:     'DM Sans', sans-serif;
  --font-mono:   'DM Mono', monospace;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;
  --pad:         clamp(14px, 3vw, 22px);
  --block-h:     76px;
  --block-gap:   6px;
  --slot:        82px;
  --list-h:      calc(var(--slot) * 5);
  --ease-sec:    cubic-bezier(0.65, 0, 0.35, 1);
  --dur-sec:     550ms;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--muted); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--text); }

.hr {
  height: 1px;
  background: var(--border-soft);
  margin: 18px 0;
}

.wrap {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.section {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  transition: transform var(--dur-sec) var(--ease-sec);
  will-change: transform;
}

#s1 {
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
}

#s2 {
  transform: translateY(100%);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.s1-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--pad);
}

.s1-foot {
  flex-shrink: 0;
  padding: 0 var(--pad) 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stage-label-row {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.stage-label {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.55px;
  white-space: nowrap;
  flex-shrink: 0;
}

.stage-label-line {
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.chevron {
  width: 14px;
  height: 9px;
  stroke: var(--muted-2);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  flex-shrink: 0;
}

@keyframes bob-down {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(4px); }
}

@keyframes bob-up {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-4px); }
}

.chevron-down { animation: bob-down 2s ease-in-out infinite; }
.chevron-up   { animation: bob-up   2s ease-in-out infinite; }

.demo-wrap {
  width: 100%;
  max-width: 560px;
}

.read-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s;
}

.read-btn:hover {
  border-color: rgba(122,162,255,.30);
  background: rgba(122,162,255,.04);
}

.read-btn:focus-visible {
  outline: 2px solid rgba(122,162,255,.45);
  outline-offset: 2px;
}

.read-static {
  color: var(--muted);
  margin-right: 5px;
  flex-shrink: 0;
}

.read-cycle {
  display: inline-block;
  color: var(--text);
  font-weight: 600;
  transition: opacity .18s ease, transform .18s ease;
}

.s2-top {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--border-soft);
}

.back-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 7px 18px;
  border-radius: var(--radius-xs);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: .2px;
  transition: border-color .15s, color .15s;
}

.back-btn:hover {
  border-color: rgba(122,162,255,.30);
  color: var(--accent);
}

.back-btn:focus-visible {
  outline: 2px solid rgba(122,162,255,.45);
  outline-offset: 2px;
}

.s2-tabbar {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
}

.tab-fixed {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 4px 0 var(--pad);
  background: var(--bg);
}

.tab-sep {
  width: 1px;
  background: var(--border-soft);
  margin: 9px 5px;
  flex-shrink: 0;
}

.tab-scroll {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--pad) 0 5px;
}

.tab-scroll::-webkit-scrollbar { display: none; }

.s2-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 9px 11px;
  margin-bottom: -1px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s, border-bottom-color .2s;
}

.s2-tab:hover { color: var(--text); }

.s2-tab[aria-selected="true"] {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.s2-tab:focus-visible {
  outline: 2px solid rgba(122,162,255,.45);
  outline-offset: 2px;
  border-radius: 4px;
}

@keyframes status-glow {
  0%,  100% { border-color: rgba(122,162,255,.10); }
  50%        { border-color: rgba(122,162,255,.30); }
}

.tab-status {
  border: 1px solid rgba(122,162,255,.10);
  border-radius: var(--radius-xs);
  margin-bottom: 0;
  padding: 5px 10px;
  animation: status-glow 4s ease-in-out infinite;
}

.tab-status[aria-selected="true"] {
  border-color: rgba(122,162,255,.40);
  animation: none;
}

.tab-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.07) transparent;
}

.tab-content::-webkit-scrollbar       { width: 4px; }
.tab-content::-webkit-scrollbar-track { background: transparent; }
.tab-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.07); border-radius: 2px; }

.tab-panel {
  padding: var(--pad);
  max-width: 680px;
}

.tab-panel[hidden] { display: none; }

.tab-panel h1 {
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 650;
  letter-spacing: .2px;
  margin: 0 0 10px;
}

.tab-panel h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 22px 0 8px;
  letter-spacing: .1px;
}

.tab-panel h3 {
  font-size: 13.5px;
  font-weight: 600;
  margin: 16px 0 6px;
}

.tab-panel p {
  color: rgba(221,228,237,.80);
  margin: 10px 0;
  line-height: 1.68;
  font-size: 13.5px;
}

.tab-panel .muted {
  color: var(--muted);
  font-size: 12.5px;
}

.tab-panel ul,
.tab-panel ol {
  margin: 10px 0 10px 18px;
  padding: 0;
}

.tab-panel li {
  color: rgba(221,228,237,.80);
  margin: 6px 0;
  font-size: 13.5px;
  line-height: 1.65;
}

.tab-panel pre {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,.25);
  border-radius: var(--radius-sm);
  overflow: auto;
}

.tab-panel code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255,255,255,.05);
}

.tab-panel pre code {
  padding: 0;
  background: transparent;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  margin-top: 14px;
  transition: border-color .15s, background .15s;
}

.btn:hover {
  border-color: rgba(122,162,255,.35);
  background: rgba(122,162,255,.06);
}

.btn:focus-visible {
  outline: 2px solid rgba(122,162,255,.45);
  outline-offset: 2px;
}

body.modal-open { overflow: hidden; }

body.modal-open .wrap {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  background: var(--modal-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal[hidden] { display: none; }

.modal-card {
  width: min(520px, 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(8,11,15,.88);
  padding: clamp(16px, 2.5vw, 22px);
}

.modal-body p {
  color: rgba(221,228,237,.85);
  margin: 10px 0;
  font-size: 13.5px;
  line-height: 1.65;
}

.modal-body .muted {
  color: var(--muted);
  font-size: 12px;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.modal-actions .btn {
  margin-top: 0;
}

@media (max-width: 480px) {
  .b-txid { display: none; }
  .block  { gap: 8px; padding: 0 10px; }
  .b-user { min-width: 90px; max-width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .section     { transition: none !important; }
  .read-cycle  { transition: none !important; }
  .s2-tab      { transition: none !important; }
  .read-btn    { transition: none !important; }
  .back-btn    { transition: none !important; }
  .btn         { transition: none !important; }
  .chevron     { animation: none !important; }
  .tab-status  { animation: none !important; }
  .pulse-dot   { animation: none !important; }
}
