/* pearl-pool · stellar dashboard
   Pearl + cosmic theme. Pure CSS animations, GPU-cheap (transform/opacity only).
   Palette: nacre iridescence on void-black.
   v3: more life — orbiting particles, iridescence sweep, aurora, shooting stars,
       twinkle layer, page-entrance, counter animations. */

:root {
  --void:          #05050A;
  --void-deep:     #02020A;
  --nebula:        #11111A;
  --nebula-2:      #1A1A26;
  --border:        rgba(120, 145, 200, 0.18);
  --border-strong: rgba(180, 200, 255, 0.32);

  --fg:        #d8def0;
  --fg-strong: #F8F9FA;
  --fg-muted:  #A19FB6;

  --nacre-cyan:  #5BFBFF;
  --orchid:      #D58AF9;
  --opal:        #E8D7FF;
  --pearl-pink:  #FFC8EE;
  --nacre-white: #f6f4ff;
  --green:       #4ADE80;
  --warn:        #fbbf24;
  --err:         #F87171;

  --display: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Roboto, sans-serif;
  --mono:    ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  padding: 1.5rem 2rem 4rem;
  background: var(--void);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body > * { position: relative; z-index: 1; }

/* ════════════════════════════════════════════════════════════════
   COSMIC BACKDROP
   ════════════════════════════════════════════════════════════════ */

.starfield {
  position: fixed;
  inset: -10vh;
  pointer-events: none;
  z-index: 0;
}

.starfield.s1 {
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 28% 64%, #cfe1ff 60%, transparent),
    radial-gradient(1px 1px at 47% 30%, #fff 60%, transparent),
    radial-gradient(1.6px 1.6px at 63% 79%, #ffeacc 60%, transparent),
    radial-gradient(1.2px 1.2px at 78% 14%, #d6ecff 60%, transparent),
    radial-gradient(1px 1px at 90% 52%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 36% 88%, #cfe1ff 60%, transparent),
    radial-gradient(1px 1px at 8% 78%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 55% 50%, #ffdcec 60%, transparent),
    radial-gradient(1px 1px at 71% 38%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 22% 44%, #c9e0ff 60%, transparent),
    radial-gradient(1px 1px at 96% 86%, #fff 60%, transparent);
  background-size: 100vw 100vh;
  opacity: 0.62;
  animation: drift 240s linear infinite;
}

.starfield.s2 {
  background-image:
    radial-gradient(0.6px 0.6px at 18% 28%, #fff 60%, transparent),
    radial-gradient(0.6px 0.6px at 38% 14%, #cfe1ff 60%, transparent),
    radial-gradient(0.6px 0.6px at 57% 60%, #fff 60%, transparent),
    radial-gradient(0.6px 0.6px at 73% 49%, #ffeacc 60%, transparent),
    radial-gradient(0.6px 0.6px at 88% 24%, #d6ecff 60%, transparent),
    radial-gradient(0.6px 0.6px at 80% 72%, #fff 60%, transparent),
    radial-gradient(0.6px 0.6px at 46% 98%, #cfe1ff 60%, transparent),
    radial-gradient(0.6px 0.6px at 18% 88%, #fff 60%, transparent);
  background-size: 100vw 100vh;
  opacity: 0.38;
  animation: drift 400s linear infinite reverse;
}

/* Twinkling layer — small set of brighter stars that oscillate */
.starfield.s3 {
  background-image:
    radial-gradient(2px 2px at 15% 35%, #fff 60%, transparent),
    radial-gradient(2px 2px at 33% 75%, #cfe1ff 60%, transparent),
    radial-gradient(2px 2px at 52% 22%, #fff 60%, transparent),
    radial-gradient(2px 2px at 68% 88%, #ffdcec 60%, transparent),
    radial-gradient(2px 2px at 84% 41%, #fff 60%, transparent),
    radial-gradient(2px 2px at 41% 55%, #ffc8ee 60%, transparent);
  background-size: 100vw 100vh;
  animation: twinkle 3.5s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-5vw, -3vh, 0); }
}

@keyframes twinkle {
  0%   { opacity: 0.85; }
  100% { opacity: 0.15; }
}

.nebula {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  filter: blur(110px);
  opacity: 0.55;
  animation: nebula-drift 50s ease-in-out infinite alternate;
}
.nebula.a {
  background: radial-gradient(closest-side at 18% 22%,
    rgba(213, 138, 249, 0.60) 0%,
    rgba(213, 138, 249, 0.10) 45%,
    transparent 70%);
}
.nebula.b {
  background: radial-gradient(closest-side at 82% 88%,
    rgba(91, 251, 255, 0.45) 0%,
    rgba(232, 215, 255, 0.20) 35%,
    transparent 70%);
  animation-delay: -25s;
}

@keyframes nebula-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(3vw, -2vh, 0); }
}

/* Aurora curtain at top — shifting iridescence band */
.aurora {
  position: fixed;
  top: -100px;
  left: -10vw;
  right: -10vw;
  height: 380px;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg,
      rgba(91, 251, 255, 0.08) 0%,
      rgba(213, 138, 249, 0.06) 40%,
      transparent 80%),
    conic-gradient(from 220deg at 50% 0%,
      transparent 0deg,
      rgba(91, 251, 255, 0.10) 60deg,
      rgba(213, 138, 249, 0.10) 130deg,
      rgba(232, 215, 255, 0.08) 200deg,
      transparent 270deg);
  filter: blur(40px);
  animation: aurora-flow 18s ease-in-out infinite;
}

@keyframes aurora-flow {
  0%, 100% { opacity: 0.7; transform: translate3d(0, 0, 0); }
  50%      { opacity: 1.0; transform: translate3d(2vw, 14px, 0); }
}

/* ════════════════════════════════════════════════════════════════
   SHOOTING STARS
   ════════════════════════════════════════════════════════════════ */

.shooting-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shooting {
  position: absolute;
  top: 12%;
  left: 80%;
  width: 3px;
  height: 3px;
  background: var(--opal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--opal), 0 0 18px var(--nacre-cyan);
  opacity: 0;
  animation: shoot 14s linear infinite;
}
.shooting::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--opal), transparent);
  transform-origin: 100% 50%;
  transform: translateY(-50%) rotate(35deg);
  filter: blur(0.6px);
}
.shooting:nth-child(1) { animation-delay:  2s; top: 10%; left: 92%; }
.shooting:nth-child(2) { animation-delay:  6s; top: 22%; left: 84%; }
.shooting:nth-child(3) { animation-delay: 10s; top: 45%; left: 90%; }
.shooting:nth-child(4) { animation-delay: 12s; top: 68%; left: 86%; }

@keyframes shoot {
  0%    { opacity: 0; transform: translate3d(0, 0, 0); }
  4%    { opacity: 1; }
  10%   { opacity: 1; transform: translate3d(-70vw, 50vh, 0); }
  12%   { opacity: 0; }
  100%  { opacity: 0; transform: translate3d(-70vw, 50vh, 0); }
}

/* ════════════════════════════════════════════════════════════════
   SYNC BANNER
   ════════════════════════════════════════════════════════════════ */

.banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.20), rgba(251, 191, 36, 0.04));
  border: 1px solid rgba(251, 191, 36, 0.45);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--warn);
  animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════════════════
   HEADER / BRAND
   ════════════════════════════════════════════════════════════════ */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand { display: flex; align-items: center; gap: 0.85rem; }

.brand-pearl {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%,
      #ffffff 0%, var(--opal) 30%, var(--nacre-cyan) 65%, var(--orchid) 100%);
  box-shadow:
    0 0 14px rgba(213, 138, 249, 0.6),
    0 0 28px rgba(91, 251, 255, 0.32),
    inset -4px -5px 8px rgba(0, 0, 0, 0.50);
  animation: breathe 6s ease-in-out infinite;
  overflow: hidden;
}
.brand-pearl-iris {
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent, rgba(91, 251, 255, 0.32),
    transparent, rgba(213, 138, 249, 0.32),
    transparent, rgba(232, 215, 255, 0.38),
    transparent);
  mix-blend-mode: screen;
  animation: spin 9s linear infinite;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--fg-strong);
  background: linear-gradient(110deg, var(--opal), var(--nacre-cyan), var(--orchid));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 12s ease-in-out infinite;
}
.tag {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

h2 {
  margin: 0 0 0.85rem 0;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
h2::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--nacre-cyan);
  box-shadow: 0 0 6px var(--nacre-cyan);
}

.status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; flex-wrap: wrap; }
.sep { color: var(--border-strong); }
.muted { color: var(--fg-muted); }
.small { font-size: 0.88em; }
.accent { color: var(--nacre-cyan); }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; transition: background 0.25s; }
.dot.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 18px rgba(74, 222, 128, 0.45);
  animation: pulse 2s ease-in-out infinite;
}
.dot.offline { background: var(--err); box-shadow: 0 0 8px var(--err); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* ════════════════════════════════════════════════════════════════
   HERO: PEARL + ORBITS + PARTICLES
   ════════════════════════════════════════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1.5rem;
  min-height: 360px;
}

.hero-pearl-wrap {
  position: relative;
  width: 380px;
  height: 380px;
  margin: -20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zoom-in 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.orbits {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.orbit-ring {
  transform-origin: center;
}
.orbit-ring.r1 { animation: spin  60s linear infinite; }
.orbit-ring.r2 { animation: spin 120s linear infinite reverse; }
.orbit-ring.r3 { animation: spin 200s linear infinite; }

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

/* Orbiting particles — separate rotators with absolutely-positioned dots */
.orbiter {
  position: absolute;
  top: 50%; left: 50%;
  margin-top: -100px;  /* corresponds to orbit radius */
  width: 200px; height: 200px;
  margin-left: -100px;
  border-radius: 50%;
  pointer-events: none;
}
.orbiter.o1 { width: 200px; height: 200px; margin: -100px 0 0 -100px; animation: spin 14s linear infinite; }
.orbiter.o2 { width: 280px; height: 280px; margin: -140px 0 0 -140px; animation: spin 22s linear infinite reverse; }
.orbiter.o3 { width: 360px; height: 360px; margin: -180px 0 0 -180px; animation: spin 32s linear infinite; }

.particle {
  position: absolute;
  top: -5px;
  left: calc(50% - 5px);
  width: 10px; height: 10px;
  border-radius: 50%;
}
.p-cyan {
  background: var(--nacre-cyan);
  box-shadow: 0 0 10px var(--nacre-cyan), 0 0 20px rgba(91, 251, 255, 0.6);
}
.p-orchid {
  background: var(--orchid);
  box-shadow: 0 0 10px var(--orchid), 0 0 20px rgba(213, 138, 249, 0.6);
}
.p-opal {
  background: var(--opal);
  box-shadow: 0 0 10px var(--opal), 0 0 20px rgba(232, 215, 255, 0.5);
}

/* Glow halo behind the pearl */
.pearl-halo {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(213, 138, 249, 0.16) 30%,
    rgba(91, 251, 255, 0.08) 55%,
    transparent 75%);
  filter: blur(20px);
  animation: halo-breathe 8s ease-in-out infinite;
}
@keyframes halo-breathe {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50%      { opacity: 1.00; transform: scale(1.08); }
}

.hero-pearl {
  position: relative;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    #ffffff 0%,
    var(--opal) 28%,
    var(--pearl-pink) 50%,
    var(--nacre-cyan) 72%,
    var(--orchid) 100%);
  box-shadow:
    0 0 50px rgba(213, 138, 249, 0.40),
    0 0 100px rgba(91, 251, 255, 0.22),
    inset -16px -20px 36px rgba(0, 0, 0, 0.50);
  animation: breathe 6s ease-in-out infinite;
}

/* Two iridescence layers — conic gradients rotating at different speeds */
.iris {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent,
    rgba(91, 251, 255, 0.30),
    transparent,
    rgba(213, 138, 249, 0.30),
    transparent,
    rgba(255, 200, 238, 0.32),
    transparent,
    rgba(232, 215, 255, 0.34),
    transparent);
  mix-blend-mode: screen;
  animation: spin 12s linear infinite;
}
.iris2 {
  inset: 8%;
  background: conic-gradient(from 180deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent,
    rgba(91, 251, 255, 0.22),
    transparent);
  mix-blend-mode: overlay;
  animation: spin 20s linear infinite reverse;
}

/* The crisp highlight on the upper-left — the "wet" pearl spec */
.highlight {
  position: absolute;
  top: 12%; left: 18%;
  width: 35%; height: 25%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.30) 40%,
    rgba(255, 255, 255, 0) 70%);
  filter: blur(2px);
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

@keyframes zoom-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ════════════════════════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════════════════════════ */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(17, 17, 26, 0.72), rgba(26, 26, 38, 0.70));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side at 85% 15%,
    rgba(91, 251, 255, 0.10), transparent 70%);
  pointer-events: none;
  transition: opacity 0.3s;
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(91, 251, 255, 0.10), 0 0 1px rgba(213, 138, 249, 0.5);
}
.stat-card:hover::before { opacity: 1.5; }

.stat-card.primary {
  border-color: rgba(213, 138, 249, 0.45);
}
.stat-card.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side at 50% 100%,
    rgba(213, 138, 249, 0.18), transparent 60%);
  pointer-events: none;
}

.stat-label {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-family: var(--display);
}
.stat-value {
  font-family: var(--display);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-top: 0.2rem;
  color: var(--fg-strong);
}
.stat-sub {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}
.glow-cyan   { color: var(--nacre-cyan); text-shadow: 0 0 14px rgba(91, 251, 255, 0.60); }
.glow-orchid { color: var(--orchid);     text-shadow: 0 0 14px rgba(213, 138, 249, 0.60); }
.glow-opal   { color: var(--opal);       text-shadow: 0 0 14px rgba(232, 215, 255, 0.55); }

.shimmer {
  background: linear-gradient(110deg,
    var(--opal) 0%,
    var(--nacre-cyan) 25%,
    var(--orchid) 50%,
    var(--pearl-pink) 75%,
    var(--opal) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -100% 0; }
}

/* ════════════════════════════════════════════════════════════════
   ONBOARD / CARDS
   ════════════════════════════════════════════════════════════════ */

.onboard.card { padding: 1.35rem 1.6rem; margin-bottom: 1.25rem; }
.onboard .steps {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}
.onboard .steps li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}
.step-n {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(91, 251, 255, 0.30), rgba(91, 251, 255, 0.05));
  border: 1px solid rgba(91, 251, 255, 0.45);
  color: var(--nacre-cyan);
  font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(91, 251, 255, 0.18);
}
.ep { color: var(--orchid); font-weight: 600; }

/* ─── Top navigation (hash router) ─────────────────────────────── */
.topnav {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  margin: 0 auto 1.2rem;
  padding: 0.3rem 0.4rem;
  max-width: 1280px;
  background: linear-gradient(180deg, rgba(17, 17, 26, 0.85), rgba(17, 17, 26, 0.55));
  border: 1px solid var(--border);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0.5rem;
  z-index: 50;
  flex-wrap: wrap;
}
.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 7px;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(91, 251, 255, 0.06);
}
.nav-link.active {
  color: var(--nacre-cyan);
  background: linear-gradient(180deg, rgba(91, 251, 255, 0.18), rgba(91, 251, 255, 0.05));
  box-shadow: inset 0 -2px 0 rgba(91, 251, 255, 0.55), 0 0 14px rgba(91, 251, 255, 0.10);
}
.nav-link .grow, .topnav .grow { flex: 1; }
.nav-secondary {
  color: var(--orchid);
  border: 1px solid rgba(213, 138, 249, 0.30);
  background: rgba(213, 138, 249, 0.05);
}
.nav-secondary:hover {
  color: var(--text);
  background: rgba(213, 138, 249, 0.12);
}

/* SPA pages: only one visible at a time, with a soft fade on swap. */
.page { animation: fade-up 0.32s ease-out both; }

/* Card head: title + right-aligned "more" link inside the same row. */
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.4rem;
}
.card-head h2 { margin: 0; }
.card-more {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.card-more:hover {
  color: var(--nacre-cyan);
  border-color: rgba(91, 251, 255, 0.35);
  background: rgba(91, 251, 255, 0.05);
}

/* Connect tabs (stratum / jsonrpc) */
.tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 0.9rem 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}
.tabs .tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.tabs .tab:hover { color: var(--text); background: rgba(91, 251, 255, 0.05); }
.tabs .tab.active {
  color: var(--nacre-cyan);
  background: linear-gradient(180deg, rgba(91, 251, 255, 0.12), rgba(91, 251, 255, 0.02));
  border-color: rgba(91, 251, 255, 0.30);
  border-bottom-color: transparent;
}
.tab-pane { animation: fade-up 0.35s ease-out; }

/* Bech32 address line in the wallet card */
.addr {
  margin: 0.25rem 0 0.5rem 0;
  padding: 0.45rem 0.6rem;
  background: rgba(5, 5, 10, 0.55);
  border: 1px solid rgba(91, 251, 255, 0.18);
  border-radius: 4px;
  word-break: break-all;
  line-height: 1.35;
  color: var(--nacre-cyan);
  font-family: var(--mono, ui-monospace, monospace);
  user-select: all;
}

/* ─── Wallet-register form ─────────────────────────────────────── */
.register-form {
  display: grid;
  gap: 0.85rem;
  margin: 0.6rem 0 0.4rem 0;
  max-width: 720px;
}
.register-form .input-row {
  display: grid;
  gap: 0.25rem;
}
.register-form .input-row > span {
  font-size: 0.82rem;
  color: var(--nacre-cyan);
  font-weight: 600;
}
.register-form input {
  background: rgba(5, 5, 10, 0.65);
  border: 1px solid rgba(91, 251, 255, 0.20);
  border-radius: 5px;
  color: var(--text);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.92rem;
  padding: 0.55rem 0.7rem;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  width: 100%;
}
.register-form input:focus {
  outline: none;
  border-color: rgba(91, 251, 255, 0.55);
  background: rgba(5, 5, 10, 0.85);
  box-shadow: 0 0 12px rgba(91, 251, 255, 0.18);
}
.register-form input:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 110, 110, 0.50);
}
.register-form .form-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-top: 0.2rem;
}
.btn {
  background: transparent;
  border: 1px solid rgba(91, 251, 255, 0.35);
  color: var(--nacre-cyan);
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
}
.btn:hover {
  background: rgba(91, 251, 255, 0.10);
  border-color: rgba(91, 251, 255, 0.65);
  box-shadow: 0 0 14px rgba(91, 251, 255, 0.18);
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, rgba(91, 251, 255, 0.18), rgba(91, 251, 255, 0.04));
}
.form-status { font-size: 0.85rem; color: var(--muted); }
.form-status.ok      { color: var(--accent); }
.form-status.err     { color: #ff9b9b; }
.form-status.pending { color: var(--orchid); }

/* Two-column key-value list used on the troubleshooting card. */
dl.kv {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 3fr;
  gap: 0.35rem 1rem;
  margin: 0;
}
dl.kv dt {
  color: var(--nacre-cyan);
  font-weight: 600;
  font-size: 0.85rem;
}
dl.kv dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ─── Connect tabs (stratum / jsonrpc) ─────────────────────────── */
.tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 0.9rem 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}
.tabs .tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.tabs .tab:hover { color: var(--text); background: rgba(91, 251, 255, 0.05); }
.tabs .tab.active {
  color: var(--nacre-cyan);
  background: linear-gradient(180deg, rgba(91, 251, 255, 0.12), rgba(91, 251, 255, 0.02));
  border-color: rgba(91, 251, 255, 0.30);
  border-bottom-color: transparent;
}
.tab-pane { animation: fade-up 0.35s ease-out; }

/* ─── Bech32 address line in the wallet card ──────────────────── */
.addr {
  margin: 0.25rem 0 0.5rem 0;
  padding: 0.45rem 0.6rem;
  background: rgba(5, 5, 10, 0.55);
  border: 1px solid rgba(91, 251, 255, 0.18);
  border-radius: 4px;
  word-break: break-all;
  line-height: 1.35;
  color: var(--nacre-cyan);
  font-family: var(--mono, ui-monospace, monospace);
  user-select: all;
}

.card {
  background: linear-gradient(135deg, rgba(17, 17, 26, 0.75), rgba(26, 26, 38, 0.70));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem 1.3rem;
  backdrop-filter: blur(6px);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(91, 251, 255, 0.08);
}
.card.wide { width: 100%; }

.duo {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  margin: 0;
}
dt { color: var(--fg-muted); }
dd { margin: 0; text-align: right; word-break: break-all; color: var(--fg-strong); }
.card p { margin: 0.75rem 0 0 0; }

/* ════════════════════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════════════════════ */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--fg-muted);
  font-weight: normal;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: var(--display);
}
th.num, td.num { text-align: right; }
th.bar-col { width: 30%; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: var(--nebula-2); }
td.mono { font-family: var(--mono); }
td.hash { color: var(--nacre-cyan); }

.bar {
  display: inline-block;
  height: 6px;
  border-radius: 1px;
  vertical-align: middle;
  min-width: 2px;
  background: linear-gradient(90deg, var(--nacre-cyan), var(--orchid), var(--pearl-pink));
  background-size: 200% 100%;
  box-shadow: 0 0 8px rgba(91, 251, 255, 0.5);
  animation: shimmer 8s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════════════════
   CODE BLOCKS
   ════════════════════════════════════════════════════════════════ */

pre {
  background: var(--void-deep);
  padding: 1rem 1.15rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  border: 1px solid var(--border);
}
code { font-family: var(--mono); color: var(--nacre-cyan); }
header code, .muted code, footer code, .onboard code {
  color: var(--fg-strong);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  border: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════ */

footer {
  margin-top: 2.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.78rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
footer a {
  color: var(--nacre-cyan);
  text-decoration: none;
  transition: text-shadow 0.2s;
}
footer a:hover { text-shadow: 0 0 8px rgba(91, 251, 255, 0.7); }
.grow { flex: 1; }

/* ════════════════════════════════════════════════════════════════
   SHARE STATUS COLOURS
   ════════════════════════════════════════════════════════════════ */
.s-forwarded, .s-accepted { color: var(--green); text-shadow: 0 0 4px rgba(74, 222, 128, 0.3); }
.s-duplicate { color: var(--warn); }
.s-rejected_stale, .s-rejected_verify, .s-forward_error, .s-rejected, .s-error { color: var(--err); }

/* ════════════════════════════════════════════════════════════════
   PAGE-ENTRANCE
   ════════════════════════════════════════════════════════════════ */

.fade-up {
  animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fade-up.d1  { animation-delay: 0.20s; }
.fade-up.d2  { animation-delay: 0.30s; }
.fade-up.d3  { animation-delay: 0.40s; }
.fade-up.d4  { animation-delay: 0.50s; }
.fade-up.d5  { animation-delay: 0.65s; }
.fade-up.d6  { animation-delay: 0.80s; }
.fade-up.d7  { animation-delay: 0.90s; }
.fade-up.d8  { animation-delay: 1.05s; }
.fade-up.d9  { animation-delay: 1.15s; }
.fade-up.d10 { animation-delay: 1.25s; }
.fade-up.d11 { animation-delay: 1.35s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Counter-update flash */
.flash {
  animation: flash 800ms ease-out;
}
@keyframes flash {
  0%   { filter: brightness(2) drop-shadow(0 0 10px var(--orchid)); }
  100% { filter: none; }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  .hero-pearl-wrap {
    width: 280px; height: 280px;
    margin: 0 auto;
  }
  .hero-pearl { width: 140px; height: 140px; }
  .pearl-halo { width: 180px; height: 180px; }
  .orbiter.o1 { width: 160px; height: 160px; margin: -80px 0 0 -80px; }
  .orbiter.o2 { width: 210px; height: 210px; margin: -105px 0 0 -105px; }
  .orbiter.o3 { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
  .duo { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  body { padding: 1rem; font-size: 12px; }
  .hero-stats { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.7rem; }
  .hero-pearl-wrap { width: 240px; height: 240px; }
  .hero-pearl { width: 110px; height: 110px; }
  h1 { font-size: 1.05rem; }
  .brand-pearl { width: 30px; height: 30px; }
  table { font-size: 11px; }
  th, td { padding: 0.4rem 0.4rem; }
  /* Hide aurora on tiny screens — busy */
  .aurora { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
