:root {
  --ink: #e9f2ec;
  --muted: #8fa89a;
  --dim: #5f7a6c;
  --line: rgba(233, 242, 236, 0.12);
  --gold: #e0b35a;
  --teal: #3ecf9a;
  --danger: #e07a5f;
  --bg0: #06110d;
  --bg1: #0c2219;
  --panel: rgba(6, 20, 15, 0.55);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1000px 520px at 8% -8%, rgba(62, 207, 154, 0.18), transparent 55%),
    radial-gradient(900px 480px at 96% 4%, rgba(224, 179, 90, 0.12), transparent 50%),
    radial-gradient(700px 400px at 50% 110%, rgba(20, 80, 60, 0.35), transparent 60%),
    linear-gradient(165deg, var(--bg1), var(--bg0) 55%, #040c09);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80' viewBox='0 0 160 80'%3E%3Cpath d='M0 40c20 0 20-16 40-16s20 16 40 16 20-16 40-16 20 16 40 16' fill='none' stroke='%233ecf9a' stroke-opacity='.08' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 160px 80px;
  animation: drift 28s linear infinite;
  z-index: 0;
}

@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 160px 40px; }
}

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

@keyframes draw {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

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

.top-stats {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 12, 9, 0.72);
  backdrop-filter: blur(8px);
  padding: 0.55rem 1.25rem;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  animation: rise 400ms ease both;
}
.top-stats-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  max-width: 1120px;
}
.top-stats b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.top-sep { color: var(--dim); }
.top-block-link,
.top-explore {
  color: var(--teal);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0;
  text-transform: none;
}
.top-block-link:hover,
.top-explore:hover { color: var(--gold); }
.top-explore {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(62, 207, 154, 0.35);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.5rem 0 0.85rem;
  animation: rise 500ms ease both;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-left: auto;
}
.nav-links {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.btn-dashboard {
  background: var(--ink);
  color: #06110d;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}
.btn-dashboard:hover { filter: brightness(0.95); color: #06110d; }
.btn-dashboard.active {
  background: var(--gold);
  color: #1a1204;
}
.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.panel-head h3 { margin: 0; }
a.explorer-link {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a.explorer-link:hover { color: var(--gold); }
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.doc-list li {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.doc-list a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
}
.doc-list a:hover { color: var(--teal); }
.doc-list span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.hero {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.25rem 0 2.5rem;
  animation: rise 650ms ease both;
}
.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 14ch;
}
.hero-brand span { color: var(--teal); }
.hero-line {
  margin: 1.25rem 0 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.45;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.15rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-primary { background: var(--gold); color: #1a1204; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.section {
  margin-top: 3.5rem;
  animation: rise 800ms ease both;
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
}
.section .sub {
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 36rem;
  line-height: 1.45;
}

.lookup {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.lookup input {
  flex: 1;
  min-width: min(100%, 280px);
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.lookup input:focus {
  outline: 1px solid var(--teal);
  border-color: var(--teal);
}

.pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pulse-item span {
  display: block;
  color: var(--dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.pulse-item b {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
}
.live-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 0.35rem;
  animation: pulse 1.8s ease infinite;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th {
  text-align: left;
  color: var(--dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
}
table.data td {
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
table.data tr { cursor: pointer; }
table.data tr:hover td { color: var(--gold); }
.mono { font-family: var(--font-mono); font-size: 0.85rem; }
.trunc { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.ok { color: var(--teal); }
.warn { color: var(--gold); }
.bad { color: var(--danger); }

.connect-steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
.connect-steps li {
  list-style: none;
  padding-left: 2.4rem;
  position: relative;
  color: var(--muted);
  line-height: 1.45;
}
.connect-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
}
.connect-steps code {
  font-family: var(--font-mono);
  color: var(--ink);
  background: rgba(0,0,0,0.25);
  padding: 0.1rem 0.35rem;
}

.miner-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}
.miner-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0;
}
.addr-line {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
  max-width: 40rem;
}

.meter {
  margin: 1.5rem 0 0.5rem;
}
.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.meter-track {
  height: 0.45rem;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  width: 0%;
  transition: width 700ms ease;
}

.chart-wrap {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.chart-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}
.chart-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}
.chart-toolbar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.chip.active, .chip:hover {
  color: var(--ink);
  border-color: var(--teal);
}
.chip.active {
  background: color-mix(in srgb, var(--teal) 14%, transparent);
}
.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.chip-toggle:not(.active) {
  opacity: 0.72;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}
.chip-eye {
  width: 0.85rem;
  height: 0.55rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}
.chip-eye::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.chart-stage {
  position: relative;
}
.chart {
  width: 100%;
  height: 240px;
  display: block;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--teal) 6%, transparent), transparent 55%);
}
.chart .area { opacity: 0.55; }
.chart .line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.55;
}
.chart-blocks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.chart-blocks[hidden] { display: none !important; }
.block-mark {
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  pointer-events: auto;
  width: 14px;
  height: 14px;
  text-decoration: none;
  z-index: 2;
}
.block-mark-icon {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--teal);
  clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--teal) 45%, transparent);
  transition: transform 160ms ease, filter 160ms ease;
}
.block-mark:hover .block-mark-icon,
.block-mark:focus-visible .block-mark-icon {
  transform: scale(1.2);
  filter: brightness(1.15);
}
.block-mark.yours .block-mark-icon {
  background: var(--gold);
  box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 45%, transparent);
}
.block-mark.orphaned .block-mark-icon {
  background: var(--dim);
  box-shadow: none;
  opacity: 0.7;
}
.chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
}
.chart-meta .muted { color: var(--muted); }

.panel-interactive {
  margin-top: 1.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}
.panel-interactive h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hidden { display: none !important; }
.err {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.prose {
  max-width: 40rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 1.02rem;
}
.prose p { margin: 0 0 1rem; }
.prose a { color: var(--gold); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose strong { color: var(--ink); font-weight: 700; }

.benefit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 40rem;
  display: grid;
  gap: 0.85rem;
}
.benefit-list li {
  padding-left: 1.1rem;
  border-left: 2px solid rgba(62, 207, 154, 0.35);
  color: var(--muted);
  line-height: 1.45;
}
.benefit-list strong {
  color: var(--ink);
  font-weight: 700;
}

.footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .nav-links { gap: 0.65rem; font-size: 0.85rem; }
  .nav-cluster { margin-left: 0; width: 100%; }
  .top-stats { font-size: 0.7rem; padding: 0.5rem 0.85rem; }
}

@media (max-width: 800px) {
  .pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: auto; padding-top: 1.25rem; }
  .trunc { max-width: 9rem; }
}
