:root {
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.08);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151718;
  --bg-top: #10151b;
  --surface: rgba(21, 23, 24, 0.82);
  --surface-strong: rgba(16, 21, 27, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(47, 50, 53, 1);
  --text: #f5f7fa;
  --muted: #9ba1a6;
  --heading: #ffffff;
  --accent: #6cff75;
  --accent-soft: #a4ffa8;
  --accent-wash: rgba(108, 255, 117, 0.1);
  --secondary-wash: rgba(7, 91, 119, 0.18);
  --input: rgba(255, 255, 255, 0.05);
  --grid-line: rgba(255, 255, 255, 0.03);
  --pill: rgba(255, 255, 255, 0.05);
  --danger: #f05d75;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f3;
  --bg-top: #ffffff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(17, 24, 39, 0.04);
  --border: rgba(208, 217, 203, 0.9);
  --text: #1f2937;
  --muted: #667085;
  --heading: #101828;
  --accent: #4bc45a;
  --accent-soft: #85e38f;
  --accent-wash: rgba(108, 255, 117, 0.16);
  --secondary-wash: rgba(207, 238, 248, 0.8);
  --input: rgba(248, 250, 252, 0.95);
  --grid-line: rgba(0, 0, 0, 0.04);
  --pill: rgba(17, 24, 39, 0.04);
  --danger: #e04f5f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, sans-serif;
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--accent-wash), transparent 28%),
    radial-gradient(circle at top right, var(--secondary-wash), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg));
  transition: background 180ms ease, color 180ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent);
}

.page-wrap {
  position: relative;
  z-index: 1;
}

.shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 8px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 28%, transparent);
  color: #10151b;
}

.brand-mark-icon {
  width: 22px;
  height: 22px;
}

.brand h1,
.hero h2,
.panel h3 {
  margin: 0;
  color: var(--heading);
}

.topnav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-soft);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.header-link:hover {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--border));
  color: var(--accent);
  background: var(--accent-wash);
}

.brand-doc-link {
  margin-left: 4px;
}

.header-link.is-active {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border));
  color: var(--accent);
  background: var(--accent-wash);
}

.header-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.header-chip strong {
  color: var(--heading);
  font-size: 13px;
}

.chip-value-pulse {
  animation: chipValuePulse 520ms ease;
}

@keyframes chipValuePulse {
  0% {
    color: var(--accent);
    text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent);
    transform: scale(1);
  }
  45% {
    color: var(--accent);
    text-shadow: 0 0 20px color-mix(in srgb, var(--accent) 78%, transparent);
    transform: scale(1.06);
  }
  100% {
    color: var(--heading);
    text-shadow: none;
    transform: scale(1);
  }
}

.header-chip-status {
  gap: 8px;
}

.header-chip-label {
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.status-dot.online {
  background: var(--accent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 50%, transparent);
}

.status-dot.offline {
  background: #6b7280;
  box-shadow: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
}

.theme-toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  position: relative;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-soft));
  border: 1px solid var(--border);
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  transition: transform 180ms ease;
}

body[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

main.shell {
  display: grid;
  gap: 16px;
  padding-bottom: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 20px;
  align-items: stretch;
  padding: 18px 0 0;
}

.hero-single {
  grid-template-columns: 1fr;
  gap: 18px;
}

.hero-badge,
.note-pill,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--pill);
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.search-bar input {
  flex: 1 1 420px;
  min-width: 0;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  padding: 16px 18px;
  font-size: 15px;
  outline: none;
}

.search-bar button {
  border: 0;
  border-radius: 18px;
  padding: 16px 22px;
  font-weight: 700;
  color: #10151b;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 18%, transparent);
  cursor: pointer;
}

.note-pill,
.pill {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Long pubkeys / signatures should never blow out a card */
.panel pre,
.panel code,
.panel .pubkey,
.panel .sig-link,
.panel .stat-card-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-stage {
  padding: 0 0 24px;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

.soft-panel {
  background: transparent;
}

.hero-side {
  display: flex;
}

.hero-search {
  justify-content: center;
  margin: 24px 0 32px;
}

.hero-search input {
  max-width: 580px;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-width: 1.5px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.hero-search button {
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  min-width: 140px;
}

.hero-search input:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 8%, transparent),
    0 12px 32px color-mix(in srgb, var(--accent) 10%, transparent);
}

.hero-search input:focus,
.hero-search input:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--border));
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent),
    0 12px 32px color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translateY(-1px);
}

.hero-search input:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 8%, transparent),
    0 12px 32px color-mix(in srgb, var(--accent) 10%, transparent);
}

.hero-search input:focus,
.hero-search input:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--border));
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent),
    0 18px 44px color-mix(in srgb, var(--accent) 16%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-1px);
}

/* ====================================================================
   Pulse stage  — center orb + 4 corner node cards + SVG beat lines
   Shrunk ~55% from the original (was ~750px tall, now ~420px) to fit a
   typical laptop without scrolling while keeping the original visual.
   ==================================================================== */

.pulse-stage {
  position: relative;
  width: 100%;
  min-height: 420px;
}

.pulse-orb-wrap {
  position: absolute;
  inset: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}

.pulse-orb {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 60%),
    radial-gradient(circle at center, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 74%);
  animation: orbPulse 3.2s ease-in-out infinite;
  filter: saturate(1.08);
}

.pulse-orb::before,
.pulse-orb::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  box-shadow:
    0 0 36px color-mix(in srgb, var(--accent) 28%, transparent),
    inset 0 0 28px color-mix(in srgb, var(--accent) 18%, transparent);
}

.pulse-orb::after {
  inset: 44px;
  animation: orbSpiral 7s linear infinite;
}

.pulse-orb::before {
  animation: orbHalo 4.4s ease-in-out infinite;
}

.pulse-orb-core {
  position: relative;
  z-index: 1;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    color-mix(in srgb, var(--surface-strong) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  box-shadow:
    inset 0 0 22px color-mix(in srgb, var(--accent) 12%, transparent),
    0 0 36px color-mix(in srgb, var(--accent) 18%, transparent);
}

.pulse-orb-core span.muted {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pulse-orb-core strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-top: 6px;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}

.pulse-orb-core small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.pulse-node {
  position: absolute;
  width: 150px;
  min-height: 88px;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.pulse-node-0 { top: 14px;    left: 14px; }
.pulse-node-1 { top: 14px;    right: 14px; }
.pulse-node-2 { bottom: 14px; left: 14px; }
.pulse-node-3 { bottom: 14px; right: 14px; }

.pulse-node.is-active {
  transform: translateY(-3px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--border));
  box-shadow:
    0 16px 44px color-mix(in srgb, var(--accent) 18%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--accent) 12%, transparent);
}

.pulse-node-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pulse-node-value {
  display: block;
  margin-top: 4px;
  color: var(--heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.pulse-node-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.pulse-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pulse-link-glow,
.pulse-link-core {
  fill: none;
  stroke-linecap: round;
}

.pulse-link-glow {
  stroke: color-mix(in srgb, var(--accent) 26%, transparent);
  stroke-width: 4;
  filter: blur(8px);
  opacity: 0.7;
}

.pulse-link-core {
  stroke: color-mix(in srgb, var(--accent) 16%, var(--border));
  stroke-width: 1.4;
  stroke-dasharray: 6 8;
}

.pulse-link-dot {
  fill: var(--accent);
  opacity: 0;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 58%, transparent));
}

.pulse-link.is-active .pulse-link-core {
  stroke: color-mix(in srgb, var(--accent) 58%, white);
  animation: pulseDash 1s linear;
}

.pulse-link.is-active .pulse-link-glow {
  opacity: 1;
}

.pulse-link.is-active .pulse-link-dot {
  opacity: 1;
  animation: pulseDot 900ms ease-out;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(0.98); filter: saturate(0.96); }
  50%      { transform: scale(1.02); filter: saturate(1.08); }
}

@keyframes orbHalo {
  0%, 100% { opacity: 0.72; transform: scale(0.98); }
  50%      { opacity: 1;    transform: scale(1.02); }
}

@keyframes orbSpiral {
  0%   { transform: rotate(0deg)   scale(1); }
  50%  { transform: rotate(180deg) scale(1.04); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes pulseDash {
  0%   { stroke-dashoffset: 42; }
  100% { stroke-dashoffset: 0; }
}

@keyframes pulseDot {
  0%   { opacity: 0; transform: scale(0.2); }
  20%  { opacity: 1; }
  60%  { opacity: 1; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(0.6); }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  opacity: 0.18;
}

.stat-card.emerald::after { background: var(--accent); }
.stat-card.cyan::after { background: var(--secondary-wash); }
.stat-card.violet::after { background: color-mix(in srgb, var(--accent-soft) 45%, white); }
.stat-card.amber::after { background: color-mix(in srgb, var(--muted) 45%, white); }

.stat-card-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-card-value {
  margin: 8px 0 4px;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--heading);
  line-height: 1.1;
}

.stat-card-delta {
  color: var(--accent);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.feature-panel {
  background:
    radial-gradient(circle at top right, var(--accent-wash), transparent 34%),
    var(--surface);
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.reward-mix,
.health-stack,
.activity-feed {
  display: grid;
  gap: 14px;
}

.mix-row {
  display: grid;
  gap: 9px;
}

.mix-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.mix-bar {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.mix-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
}

.health-item,
.feed-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.health-item strong,
.feed-item strong {
  display: block;
  color: var(--heading);
}

.health-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.health-pill.ok {
  color: #10151b;
  background: var(--accent);
}

.health-pill.error {
  color: white;
  background: var(--danger);
}

.feed-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.feed-amount {
  color: var(--accent);
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 220px;
}

.timeline-bar {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  min-height: 200px;
}

.timeline-fill {
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 16%, transparent);
}

.timeline-label {
  color: var(--muted);
  font-size: 13px;
}

.timeline-value {
  color: var(--heading);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .hero,
  .dashboard-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 20px, 1240px);
  }

  .topnav {
    display: none;
  }

  .hero-copy,
  .panel {
    padding: 18px;
  }

  .timeline {
    grid-template-columns: 1fr 1fr;
  }

  .pulse-stage {
    min-height: 540px;
  }

  .pulse-orb-wrap {
    width: 220px;
    height: 220px;
  }

  .pulse-orb-core {
    width: 150px;
    height: 150px;
  }

  .pulse-orb-core strong {
    font-size: 26px;
  }

  .pulse-node {
    width: 124px;
    min-height: 78px;
    padding: 10px 12px;
  }

  .pulse-node-value {
    font-size: 16px;
  }
}

/* ====================================================================
   Per-pubkey explorer (everything below the live-pulse hero)
   ==================================================================== */

.account-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

/* The HTML `hidden` attribute must override flex display */
.account-section[hidden],
.empty-hint[hidden] {
  display: none !important;
}

.empty-hint {
  margin-top: 12px;
  text-align: center;
  /* inherits .panel padding: 22px — kept uniform with every other box */
}

.empty-hint h3 {
  margin: 6px 0 8px;
  font-size: 18px;
}

.empty-hint .muted {
  max-width: 580px;
  margin: 0 auto 14px;
  line-height: 1.5;
  font-size: 13px;
}

.empty-suggestions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.empty-suggestions button {
  background: var(--surface-soft, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-family: "SFMono-Regular", "Menlo", monospace;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.empty-suggestions button:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft));
}

.account-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.account-pubkey {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 16px;
  word-break: break-all;
  color: var(--heading);
}

.account-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
}

.account-pill.type-vote   { color: #6cff75; border-color: rgba(108, 255, 117, 0.4); }
.account-pill.type-stake  { color: #6cd9ff; border-color: rgba(108, 217, 255, 0.4); }
.account-pill.type-wallet { color: #ffd57a; border-color: rgba(255, 213, 122, 0.4); }
.account-pill.type-unknown{ color: var(--muted); }

.account-pill.fresh   { background: var(--accent-wash); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.account-pill.stale   { background: rgba(255, 180, 80, 0.12); color: #ffba66; border-color: rgba(255, 180, 80, 0.4); }

.account-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  font-size: 12px;
}

.account-meta-cell .label {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.account-meta-cell .value {
  font-family: "SFMono-Regular", "Menlo", monospace;
  color: var(--text);
}

/* Reward category cards */

.reward-grid .stat-card {
  position: relative;
}

.reward-grid .stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.55;
  background: linear-gradient(135deg, transparent 60%, var(--card-tone, transparent));
}

.reward-grid .stat-card.tone-inflation     { --card-tone: rgba(108, 255, 117, 0.18); }
.reward-grid .stat-card.tone-block_rewards { --card-tone: rgba(108, 217, 255, 0.18); }
.reward-grid .stat-card.tone-mev_related   { --card-tone: rgba(200, 130, 255, 0.20); }

.reward-grid .stat-card-value {
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.reward-grid .stat-card-delta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* Reward category mix */

.mix-row + .mix-row { margin-top: 14px; }

/* Materialization job status panel */

.job-status {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  font-size: 12px;
}

.job-row .job-pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.job-pill.queued    { color: var(--muted); }
.job-pill.running   { color: #ffd57a; border-color: rgba(255, 213, 122, 0.4); animation: jobRunningPulse 1.6s ease-in-out infinite; }
.job-pill.completed { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.job-pill.failed    { color: #ff7d8a; border-color: rgba(255, 125, 138, 0.4); }

@keyframes jobRunningPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* Reward history table */

.reward-history-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.reward-history-panel th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.reward-history-panel td {
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  font-family: "SFMono-Regular", "Menlo", monospace;
  white-space: nowrap;
}

.reward-history-panel tr:last-child td { border-bottom: none; }

.cat-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

.cat-pill.cat-inflation     { color: #6cff75; border-color: rgba(108, 255, 117, 0.4); }
.cat-pill.cat-block_rewards { color: #6cd9ff; border-color: rgba(108, 217, 255, 0.4); }
.cat-pill.cat-mev_related   { color: #c882ff; border-color: rgba(200, 130, 255, 0.4); }
.cat-pill.cat-unknown       { color: var(--muted); }

.sig-link {
  color: var(--accent);
  text-decoration: none;
}

.sig-link:hover { text-decoration: underline; }

.empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 24px 12px;
  font-style: italic;
}

/* Toast / inline status near search bar */

.search-status {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.search-status.error { color: #ff7d8a; }
.search-status.ok    { color: var(--accent); }

/* ====================================================================
   View routing — only one [data-view] visible at a time
   ==================================================================== */

.view[hidden] { display: none !important; }

/* Active nav link highlight */
.topnav a.is-active {
  color: var(--accent);
  position: relative;
}

.topnav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ====================================================================
   Reward composition — tree view
   ==================================================================== */

.reward-tree {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  --tree-rail: color-mix(in srgb, var(--border) 80%, transparent);
}

.tree-node {
  position: relative;
}

.tree-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: default;
}

.tree-row.is-clickable { cursor: pointer; transition: background 0.12s; }
.tree-row.is-clickable:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }

.tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.15s ease;
  user-select: none;
}

.tree-node.is-open > .tree-row > .tree-toggle { transform: rotate(90deg); color: var(--accent); }
.tree-toggle.is-leaf { visibility: hidden; }

.tree-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tree-label-main {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--heading);
  font-weight: 600;
}

.tree-label-meta {
  color: var(--muted);
  font-size: 11px;
  font-family: "Inter", sans-serif;
}

.tree-amount {
  font-family: "SFMono-Regular", "Menlo", monospace;
  color: var(--text);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.tree-amount-pct {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

/* Children container — vertical guide line on the left */
.tree-children {
  margin-left: 16px;
  padding-left: 14px;
  border-left: 1px dashed var(--tree-rail);
  margin-top: 2px;
}

.tree-node.is-collapsed > .tree-children { display: none; }

/* Category accent dot on the row */
.tree-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--dot-color, var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--dot-color, var(--accent)) 60%, transparent);
}

.tree-node[data-category="inflation"]     { --dot-color: #6cff75; }
.tree-node[data-category="block_rewards"] { --dot-color: #6cd9ff; }
.tree-node[data-category="mev_related"]   { --dot-color: #c882ff; }
.tree-node[data-category="sweeps"]        { --dot-color: #ff9966; }
.tree-node[data-category="root"]          { --dot-color: var(--accent); }

/* Disabled / N/A nodes */
.tree-node.is-na > .tree-row { opacity: 0.55; }
.tree-node.is-na .tree-amount { color: var(--muted); }

/* Inline status (e.g. loading stakers) */
.tree-inline-status {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  padding: 6px 12px 8px;
}

/* ====================================================================
   Live Feed view
   ==================================================================== */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-soft, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  font-size: 12px;
}

.feed-row .feed-pubkey {
  font-family: "SFMono-Regular", "Menlo", monospace;
  color: var(--heading);
}

.feed-row .feed-pubkey a { color: inherit; text-decoration: none; }
.feed-row .feed-pubkey a:hover { color: var(--accent); }

.feed-row .feed-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  font-family: "Inter", sans-serif;
}

.feed-row .feed-time {
  color: var(--muted);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
}

/* ====================================================================
   Epoch picker (sits in the reward composition header)
   ==================================================================== */

.epoch-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.epoch-picker select {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 12px;
  background: var(--surface-soft, rgba(255, 255, 255, 0.04));
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.epoch-picker select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}

.epoch-range-caption {
  font-size: 11px;
  color: var(--muted);
  padding: 6px 12px 0;
  font-family: "Inter", sans-serif;
}

/* Full pubkey rendering (no ellipsis) for staker rows */

.pubkey-full {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 11px;
  word-break: break-all;
  color: var(--text);
}

.pubkey-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}

.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }

.tree-load-more {
  display: block;
  width: calc(100% - 16px);
  margin: 8px 8px 0;
  padding: 8px 12px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 11px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}

.tree-load-more:hover { color: var(--accent); border-color: var(--accent); }

.audit-tree {
  margin-top: 14px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
}

.audit-tree .error {
  color: var(--danger);
}

/* Phase 2 tree replaces the old three-card epoch surface. The loaders still
   populate the hidden panel bodies so CSV helpers can reuse their cached data. */
.epoch-panel-grid {
  display: none;
}

/* ============================================================================
   v3 layout — landing search + per-account inspector
   (Overrides earlier rules where class names overlap.)
   ============================================================================ */

/* ---- brand link ---- */
.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}
.brand-link:hover { opacity: 0.85; }

.header-chip {
  cursor: default;
  position: relative;
}
.header-chip strong { font-variant-numeric: tabular-nums; }
.status-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--muted);
  display: inline-block;
}
.status-dot.online  { background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }
.status-dot.offline { background: var(--danger); }

/* ---- LANDING ---- */
.view-landing { display: grid; place-items: center; min-height: 60vh; }
.landing { width: 100%; }
.landing-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 32px 16px;
}
.landing-title {
  font-size: 28px;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  color: var(--heading);
}
.landing-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 24px;
}
.landing-search {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  width: 100%;
}
.landing-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.landing-search input:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.landing-search button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  color: #10151b;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  cursor: pointer;
  font-size: 14px;
}
.sample-hot-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.landing-suggestions {
  display: flex;
  gap: 8px;
  flex-direction: column;
  align-items: stretch;
}
.suggest-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.suggest-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft));
}
.suggest-pill .suggest-key {
  font-family: "SFMono-Regular", "Menlo", monospace;
  color: var(--muted);
  font-size: 11px;
  word-break: break-all;
  text-align: right;
}

/* ---- ACCOUNT SEARCH BAR (top of accounts view) ---- */
.account-search-bar {
  display: flex;
  gap: 8px;
  margin: 8px 0 4px;
}
.account-search-bar input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  font-size: 13px;
  font-family: "SFMono-Regular", "Menlo", monospace;
  outline: none;
}
.account-search-bar button {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
  color: #10151b;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  cursor: pointer;
  font-size: 13px;
}

/* ---- ACCOUNT HEADER ---- */
.account-header { gap: 14px; }
.account-header-id {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.account-header .account-pubkey {
  font-size: 13px;
  word-break: break-all;
  color: var(--text);
}
.copy-btn {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
}
.type-pill-vote    { color: #6cff75; border-color: rgba(108, 255, 117, 0.4); background: rgba(108, 255, 117, 0.08); }
.type-pill-stake   { color: #6cd9ff; border-color: rgba(108, 217, 255, 0.4); background: rgba(108, 217, 255, 0.08); }
.type-pill-wallet  { color: #ffd57a; border-color: rgba(255, 213, 122, 0.4); background: rgba(255, 213, 122, 0.08); }
.type-pill-unknown { color: var(--muted); }
.type-pill-missing { color: var(--danger); border-color: rgba(240, 93, 117, 0.4); background: rgba(240, 93, 117, 0.08); }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 18px;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  cursor: help;
}
.meta-row:last-child { border-bottom: 0; }
.meta-row.warn { color: #ffba66; cursor: default; }
.meta-label { color: var(--muted); }
.meta-value { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.meta-value.muted { color: var(--muted); font-weight: 400; }
.meta-value a { color: var(--accent); text-decoration: none; }
.meta-value a:hover { text-decoration: underline; }
.mono { font-family: "SFMono-Regular", "Menlo", monospace; }

/* ---- EPOCH PICKER ---- */
.panel .epoch-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.epoch-picker .epoch-step,
.epoch-picker .epoch-now {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.epoch-picker .epoch-step { width: 30px; padding: 6px 0; font-weight: 700; }
.epoch-picker .epoch-step:hover,
.epoch-picker .epoch-now:hover {
  border-color: var(--accent); color: var(--accent);
}
.epoch-picker input[type="number"] {
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  width: 96px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: "SFMono-Regular", "Menlo", monospace;
  outline: none;
}
.epoch-picker input[type="number"]:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
}
.epoch-picker .epoch-now {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #10151b;
  border-color: transparent;
  font-weight: 700;
}

/* ---- COVERAGE BANNER ---- */
.coverage-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin: 0 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 200, 87, 0.4);
  background: rgba(255, 200, 87, 0.08);
  font-size: 13px;
}
.coverage-banner .cov-icon { font-size: 18px; color: #ffc857; }
.coverage-banner .cov-text { flex: 1 1 auto; min-width: 0; line-height: 1.45; }
.coverage-banner .cov-text strong { color: #ffc857; }
.coverage-banner .cov-cta {
  border: 1px solid rgba(255, 200, 87, 0.6);
  background: rgba(255, 200, 87, 0.15);
  color: #ffc857;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
}
.coverage-banner .cov-cta:hover { background: rgba(255, 200, 87, 0.28); }

/* ---- EPOCH PANEL GRID (3 sub-panels: inflation / mev / sweeps) ---- */
.epoch-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1100px) {
  .epoch-panel-grid { grid-template-columns: 1fr; }
}
.sub-panel {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sub-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sub-panel-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.src-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: help;
}
.src-tag.src-live    { color: var(--accent);  background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.src-tag.src-indexed { color: #6cd9ff;        background: rgba(108, 217, 255, 0.10); border: 1px solid rgba(108, 217, 255, 0.30); }
.csv-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.csv-btn:hover { color: var(--accent); border-color: var(--accent); }
.sub-panel-body { font-size: 13px; min-height: 80px; }

.metric-big {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
}
.metric-big strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}
.metric-big .muted { font-size: 11px; }
.metric-zero strong { color: var(--muted); }
.metric-zero { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; }

.kv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-top: 4px;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  padding: 3px 0;
  border-bottom: 1px dashed var(--border);
}
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child  { font-variant-numeric: tabular-nums; }

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 4px;
}
.mini-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.mini-table td {
  padding: 4px 6px;
  border-bottom: 1px dashed var(--border);
  color: var(--text);
  vertical-align: middle;
}
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table .mono { font-size: 11px; }
.mini-table a { color: var(--accent); text-decoration: none; }
.mini-table a:hover { text-decoration: underline; }
.center { text-align: center; }

.dest-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
}
.full-sweep {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 200, 87, 0.18);
  color: #ffc857;
  border: 1px solid rgba(255, 200, 87, 0.4);
}

/* ---- DEEP-INDEX FORM ---- */
.deep-index-blurb { font-size: 13px; line-height: 1.55; margin: 0 0 14px; }
.deep-index-form {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 800px) {
  .deep-index-form { grid-template-columns: 1fr 1fr; }
  .deep-index-form .deep-email { grid-column: 1 / -1; }
  .deep-index-form button { grid-column: 1 / -1; }
}
.deep-index-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-width: 0;
}
.deep-index-form input {
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  font-family: "SFMono-Regular", "Menlo", monospace;
}
.deep-index-form input:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
}
.deep-index-form button {
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  color: #10151b;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  cursor: pointer;
  font-size: 13px;
}
.deep-index-status {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.deep-index-status.ok    { color: var(--accent); }
.deep-index-status.warn  { color: #ffc857; }
.deep-index-status.error { color: var(--danger); }

/* ---- EPOCH PANEL header alignment ---- */
.epoch-panel .panel-header { align-items: center; }

/* ---- Click-to-copy pubkey (replaces the old separate Copy button) ----
 * Renders the pubkey as a borderless button that highlights on hover and
 * briefly flashes a "Copied" badge on success. The badge is positioned
 * absolutely inside the button so the layout never shifts.
 */
.pubkey-copyable {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 16px;
  color: var(--heading);
  word-break: break-all;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.pubkey-copyable:hover {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--accent);
}
.pubkey-copyable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pubkey-copyable::before {
  content: "⧉";
  display: inline-block;
  margin-right: 8px;
  opacity: 0.5;
  transition: opacity 120ms ease;
}
.pubkey-copyable:hover::before { opacity: 1; }

.copy-flash {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%) scale(0.95);
  background: var(--accent);
  color: var(--bg);
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
}
.pubkey-copyable.copied .copy-flash {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* ---- Inflation panel: friendly states for in-progress / pruned epochs ----
 * Distinct from .error so users immediately tell "wait + retry" vs "broken".
 */
.metric-pending,
.metric-pruned,
.metric-warn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--surface-soft);
}
.metric-pending strong { color: #ffc857; }      /* amber — wait + retry */
.metric-pruned  strong { color: var(--muted); } /* grey — out of reach */
.metric-warn    strong { color: #ffc857; }
.metric-pending .muted,
.metric-pruned .muted,
.metric-warn .muted {
  font-size: 12px;
  line-height: 1.45;
}

/* ---- CSV button inline notices ----
 * Tiny pill that appears next to the CSV button after a click, so the user
 * sees the result (success / "nothing to export" / error) instead of a
 * silent no-op when there's no data to write.
 */
.csv-notice {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
  animation: csv-notice-fade 2.2s ease forwards;
}
.csv-notice-ok   { background: rgba(86, 211, 100, 0.15); color: #56d364; border: 1px solid rgba(86, 211, 100, 0.35); }
.csv-notice-warn { background: rgba(255, 200, 87, 0.15); color: #ffc857; border: 1px solid rgba(255, 200, 87, 0.35); }
.csv-notice-err  { background: rgba(248, 81, 73, 0.15);  color: #f85149; border: 1px solid rgba(248, 81, 73, 0.35); }
@keyframes csv-notice-fade {
  0%   { opacity: 0; transform: translateX(-4px); }
  10%  { opacity: 1; transform: translateX(0); }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================================
   v4 design pass — compact, explanatory, no hover-only help
   ============================================================================ */

.page-wrap {
  padding-bottom: 40px;
}

.topbar {
  padding: 18px 0 16px;
}

.brand h1 {
  font-size: clamp(11px, 1.4vw, 17px);
  letter-spacing: -0.025em;
}

.topbar-actions {
  gap: 10px;
}

.header-chip {
  min-height: 42px;
  padding: 9px 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.05);
}

.header-chip-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.chip-help {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.view-landing {
  min-height: calc(100vh - 120px);
}

.landing-inner {
  max-width: 880px;
  padding: 58px 0 48px;
}

.landing-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.landing-title {
  max-width: 780px;
  margin: 0 auto 24px;
  font-size: clamp(17px, 3vw, 31px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--heading);
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 8px 0 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.docs-page {
  min-height: 100vh;
}

.docs-shell {
  padding: 24px 0 44px;
}

.docs-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: end;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 12% 10%, var(--accent-wash), transparent 36%),
    linear-gradient(135deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow-lg);
}

.docs-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  top: -90px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  filter: blur(2px);
}

.docs-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0;
  color: var(--heading);
  font-size: clamp(32px, 4.7vw, 58px);
  line-height: 1;
  letter-spacing: -0.065em;
}

.docs-hero p:not(.landing-kicker) {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
}

.docs-hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}

.docs-hero-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-hero-panel strong {
  color: var(--heading);
  font-size: 34px;
  letter-spacing: -0.06em;
}

.docs-hero-panel small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.docs-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.docs-flow article {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.docs-flow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.docs-flow h3 {
  margin: 14px 0 8px;
  color: var(--heading);
  font-size: 16px;
  letter-spacing: -0.03em;
}

.docs-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.docs-card,
.docs-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.docs-card {
  padding: 22px;
}

.docs-card-wide {
  grid-column: span 2;
}

.docs-card h3,
.docs-section h3 {
  margin: 0;
  color: var(--heading);
  font-size: 18px;
  letter-spacing: -0.03em;
}

.docs-section-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.docs-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.docs-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.docs-list span {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.docs-list span::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent);
}

.docs-section {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  margin-top: 18px;
  padding: 24px;
}

.docs-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.docs-code-grid pre {
  overflow-x: auto;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-soft) 76%, var(--bg-top));
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.docs-code-grid code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.docs-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.docs-note-grid p {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.landing-search {
  max-width: 820px;
  margin: 0 auto 14px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-md);
}

.landing-search input {
  border: 0;
  background: transparent;
  padding: 14px 16px;
  font-size: 15px;
}

.landing-search input:focus {
  box-shadow: none;
}

.landing-search button {
  border-radius: 18px;
  padding: 12px 24px;
}

.landing-sub {
  max-width: 720px;
  margin: 0 auto 14px;
  font-size: 15px;
}

.landing-capabilities {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.landing-capabilities span {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.sample-hot-label {
  margin: 0 0 12px;
  text-align: left;
}

.landing-suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.suggest-pill {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 132px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 86%, transparent), var(--surface-soft)),
    var(--surface);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.06);
}

.suggest-pill .suggest-label {
  color: var(--heading);
  font-weight: 800;
  font-size: 13px;
}

.suggest-pill .suggest-key {
  text-align: left;
  line-height: 1.45;
  color: var(--muted);
}

.view-accounts {
  padding-top: 4px;
}

.account-search-bar {
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.account-search-bar input {
  border: 0;
  background: transparent;
  padding: 11px 12px;
}

.account-search-bar button {
  border-radius: 13px;
}

.search-status:empty {
  display: none;
}

.account-section {
  gap: 24px;
}

.panel {
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.08);
}

.account-header {
  display: grid;
  gap: 18px;
}

.account-header-top {
  align-items: flex-start;
}

.account-identity-stack {
  display: grid;
  gap: 10px;
  width: 100%;
}

.account-identity-stack .type-pill {
  justify-self: start;
  align-self: start;
  width: fit-content;
}

.account-header-id {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  width: 100%;
}

.account-header .account-pubkey,
.pubkey-copyable {
  width: 100%;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.45;
  color: var(--heading);
}

.copy-line {
  position: relative;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: baseline;
  column-gap: 18px;
  width: 100%;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.copy-line:hover {
  color: var(--accent);
  background: transparent;
}

.copy-line-label {
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.copy-line-value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

.pubkey-copyable::before {
  content: "Copy";
  margin-right: 10px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.meta-row {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 86px;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: default;
}

.meta-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: min(260px, 70vw);
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 90ms ease, transform 90ms ease;
}

.info-tip:hover::after,
.info-tip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.meta-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pubkey-value {
  display: inline-block;
  max-width: 100%;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.account-helper {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.epoch-panel {
  display: grid;
  gap: 18px;
}

.epoch-panel .panel-header {
  padding-bottom: 4px;
  align-items: end;
}

.epoch-panel h3 {
  font-size: clamp(15px, 1.4vw, 21px);
  letter-spacing: -0.035em;
}

.epoch-picker {
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.epoch-picker .epoch-step,
.epoch-picker .epoch-now,
.epoch-picker input[type="number"] {
  min-height: 34px;
  border-radius: 11px;
}

.coverage-banner[hidden],
.coverage-banner:empty {
  display: none !important;
}

.audit-tree {
  margin-top: 0;
  padding: 14px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 14px;
}

.tree-toolbar-label {
  display: block;
  color: var(--heading);
  font-size: 13px;
  font-weight: 800;
}

.tree-toolbar-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.tree-csv-btn {
  white-space: nowrap;
}

.tree-csv-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tree-node + .tree-node {
  margin-top: 4px;
}

.tree-row {
  grid-template-columns: 28px minmax(0, 1fr) minmax(120px, auto);
  gap: 14px;
  padding: 13px 14px;
  border-radius: 16px;
}

.tree-row.is-clickable {
  cursor: pointer;
}

.tree-row.is-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tree-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
}

.tree-node.is-open > .tree-row > .tree-toggle {
  transform: none;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.tree-label-main {
  align-items: center;
  line-height: 1.35;
}

.tree-label-meta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.pubkey-full {
  display: inline-block;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tree-children {
  margin-left: 28px;
  padding: 8px 0 8px 18px;
}

.tree-staker-row .tree-row {
  padding-top: 10px;
  padding-bottom: 10px;
}

.tree-amount {
  font-size: 13px;
}

.tree-load-more {
  margin: 12px 0 0;
  width: 100%;
  border-radius: 14px;
  padding: 12px;
}

.epoch-panel-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.deep-index-blurb {
  max-width: 900px;
}

@media (max-width: 980px) {
  .landing-suggestions,
  .meta-grid,
  .docs-grid,
  .docs-note-grid,
  .docs-hero,
  .docs-flow {
    grid-template-columns: 1fr;
  }

  .docs-card-wide {
    grid-column: auto;
  }

  .docs-section,
  .docs-code-grid {
    grid-template-columns: 1fr;
  }

  .suggest-pill {
    min-height: auto;
  }

  .account-header-id {
    grid-template-columns: 1fr;
  }

  .epoch-panel .panel-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .brand {
    width: 100%;
    justify-content: space-between;
  }

  .header-chip {
    flex: 1 1 auto;
  }

  .landing-title {
    font-size: 18px;
  }

  .landing-search,
  .account-search-bar {
    flex-direction: column;
  }

  .copy-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .tree-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .tree-amount {
    grid-column: 2;
    text-align: left;
  }
}
