/* =============================================================================
   Beacon Player — Devex-inspired palette
   -----------------------------------------------------------------------------
   Paper = near-white (gray-50/100). Ink = gray-900 (nearly black).
   Accent = green-500 (live / success). Secondary = purple-500 (used sparingly
   for links and highlights). Borders = gray-200/300. Radii are small and
   consistent; shadows are barely-there.
============================================================================= */

:root {
  /* Neutrals (pulled from Devex tokens) */
  --gray-0:   #ffffff;
  --gray-50:  #f8f8fa;
  --gray-100: #e9ebee;
  --gray-200: #d3d6dc;
  --gray-300: #c2c9d0;
  --gray-400: #a2abb4;
  --gray-500: #8c96a0;
  --gray-600: #707a85;
  --gray-700: #58626d;
  --gray-800: #3d454f;
  --gray-900: #10151b;

  /* Accents */
  --green-500: #6CFF75;
  --green-600: #5EE666;
  --green-700: #3FCC49;
  --teal-400:  #0bde9b;
  --teal-500:  #0ad193;
  --teal-700:  #05815a;

  --purple-100: #ecddff;
  --purple-200: #cda5ff;
  --purple-400: #a160f1;
  --purple-500: #924fe7;
  --purple-600: #8038da;
  --purple-700: #6c29c0;

  --red-500:   #e01f42;
  --red-700:   #8f142a;

  /* Semantic tokens */
  --paper:  var(--gray-50);
  --surface:var(--gray-0);
  --raised: #fcfcfd;
  --ink:    var(--gray-900);
  --ink-soft: var(--gray-700);
  --ink-dim:  var(--gray-500);
  --line:   var(--gray-200);
  --line-soft: var(--gray-100);

  --primary: var(--ink);               /* Devex "core primary" is just black */
  --accent:  var(--teal-500);          /* live / success (teal-ish green) */
  --highlight: var(--purple-500);      /* used only for emphasis */

  --shadow-s: 0 1px 2px rgba(16,21,27,0.04), 0 4px 10px rgba(16,21,27,0.04);
  --shadow-m: 0 1px 3px rgba(16,21,27,0.06), 0 8px 24px rgba(16,21,27,0.06);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --sans: "Denim", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; }
a { cursor: pointer; color: var(--primary); text-decoration: none; }

#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#app {
  position: relative; z-index: 1; min-height: 100vh;
  padding: 24px clamp(16px, 5vw, 56px) 80px;
  max-width: 1200px; margin: 0 auto;
}

/* =============================================================================
   TOP BAR — three zones: brand · coordinate hero · actions.
   The coordinate zone has a single dominant number (slot) and a quiet line
   of metadata + progress beneath, so nothing wraps onto a second row.
============================================================================= */
.topbar {
  display: grid; grid-template-columns: minmax(170px, auto) 1fr minmax(180px, auto);
  gap: 28px; align-items: center; margin-bottom: 30px;
  padding: 14px 0 18px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.brand-text h1 { margin: 0; font: 700 15px var(--sans); letter-spacing: -0.01em; }
.brand-text small { color: var(--ink-dim); font-size: 11.5px; }

/* Center: the chain coordinate block */
.tb-coord {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-width: 0;
}
.tb-coord-hero {
  display: inline-flex; align-items: baseline; gap: 10px;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}
.tb-coord-hero:hover { transform: translateY(-1px); }
.tb-coord-hero:hover .tb-coord-v { color: var(--highlight); }
.tb-coord-k {
  font: 600 10.5px var(--mono); color: var(--ink-soft);
  letter-spacing: 0.22em; text-transform: uppercase;
  padding-top: 3px;
}
.tb-coord-v {
  font: 700 22px/1 var(--mono); color: var(--ink);
  letter-spacing: -0.015em;
  transition: color 0.15s ease;
}
.tb-coord-meta {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 11.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.04em; white-space: nowrap; max-width: 100%;
  /* no overflow:hidden — the slot-timer bar lives at the tail end of this
     row and must stay visible even when the rest of the content is long. */
}
.tb-coord-meta strong { color: var(--ink); font-weight: 700; }
.tb-meta-link {
  background: transparent; border: 0; padding: 2px 0; cursor: pointer;
  color: inherit; font: inherit; letter-spacing: inherit;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.tb-meta-link:hover { color: var(--highlight); border-bottom-color: var(--highlight); }
.tb-meta-link:hover .tb-meta-fine { color: var(--highlight); opacity: 0.7; }
.tb-meta-dot { color: var(--ink-dim); opacity: 0.7; }
.tb-meta-fin { white-space: nowrap; }
/* Small print next to "beacon block #N" — quietly carries the EL block number */
.tb-meta-fine {
  display: inline-block;
  margin-left: 6px;
  font: 500 9.5px var(--mono);
  color: var(--ink-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
  transition: color 0.15s ease;
}

.tb-coord-progress {
  position: relative;
  flex-shrink: 0;                /* never get squeezed out of the row */
  width: 72px; height: 4px;
  border-radius: 999px;
  background: rgba(16,21,27,0.08);
  overflow: hidden;
  margin-left: 6px;
  box-shadow: inset 0 0 0 1px rgba(16,21,27,0.02);
}
.tb-coord-progress-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--highlight), var(--accent));
  box-shadow: 0 0 6px rgba(10,209,147,0.35);
  transition: width 0.12s linear;
}

/* Live seconds-until-next-slot readout, rendered just right of the bar.
   Monospace + fixed min-width so the digit roll doesn't jitter the row. */
.tb-coord-countdown {
  flex-shrink: 0;
  margin-left: 6px;
  min-width: 38px;
  font: 600 10.5px/1 var(--mono);
  color: var(--teal-700);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

/* Right zone */
.tb-actions {
  display: flex; align-items: center; gap: 14px; justify-content: flex-end;
}
.tb-live {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 10.5px var(--mono); color: var(--teal-700);
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 10px;
  background: rgba(10,209,147,0.08);
  border-radius: 999px;
}

.pulse-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(10,209,147,0.2);
  animation: pulse 1.3s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.55; } }

.ghostbtn {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 7px 14px; font: 500 12.5px/1 var(--sans); cursor: pointer;
  transition: all 0.15s ease;
}
.ghostbtn:hover { border-color: var(--ink); }
.ghostbtn.sm { padding: 3px 8px; font-size: 11px; }

/* Responsive collapse: stack on narrow screens, hide finalized meta */
@media (max-width: 960px) {
  .topbar { grid-template-columns: 1fr auto; gap: 12px; }
  .tb-coord { grid-column: 1 / -1; align-items: flex-start; order: 3; padding-top: 10px; border-top: 1px solid var(--line-soft); }
  .tb-coord-hero, .tb-coord-meta { justify-content: flex-start; }
  .tb-meta-fin { display: none; }
  .tb-meta-fin + .tb-meta-dot { display: none; }
}

/* =============================================================================
   LANDING — the big circular epoch dial
============================================================================= */
.dial-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 0 0;
  animation: sceneIn 0.5s cubic-bezier(.2,.9,.3,1);
}
.dial-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 0;
  background: transparent; border: none;
  margin-bottom: 22px;
}
.dial-eyebrow strong { color: var(--ink); font: 700 11.5px var(--mono); letter-spacing: -0.01em; text-transform: none; }
.live-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(10,209,147,0.22);
  animation: pulse 1.3s ease-in-out infinite;
}

.dial-title {
  margin: 0 0 14px; text-align: center;
  font: 700 clamp(30px, 5.2vw, 56px)/1.05 var(--sans);
  letter-spacing: -0.035em; color: var(--ink); max-width: 860px;
}
.dial-title .accent {
  background: linear-gradient(92deg, var(--highlight) 10%, var(--accent) 85%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.dial-lead {
  max-width: 560px; margin: 0 0 36px;
  text-align: center;
  font: 400 14.5px/1.6 var(--sans); color: var(--ink-soft);
}

.dial-stage {
  position: relative;
  width: min(560px, 88vw);
  aspect-ratio: 1;
  margin: 0 auto 42px;
}
.dial-svg {
  width: 100%; height: 100%; overflow: visible;
}
.slot-g { cursor: pointer; }
.slot-g circle { transition: r 0.18s cubic-bezier(.3,1.6,.5,1), fill 0.2s ease; }
.slot-g:hover circle:not([fill="transparent"]) { fill: var(--purple-600) !important; }

/* Tooltip fade timings:
   - live (just-advanced slot): appears quickly, holds bright
   - fade (previous slot, staying visible so the eye tracks slot N-1 → N):
     slowly fades over the remaining ~9s before the next tick overwrites it
   - hover: instant pop, instant remove on leave
*/
.slot-tt {
  transform-origin: center;
  transform-box: fill-box;
}
.slot-tt.tt-live  { animation: ttLiveIn 0.35s cubic-bezier(.2,.9,.3,1) both; }
.slot-tt.tt-fade  { animation: ttFadeOut 9.5s ease-out forwards; }
.slot-tt.tt-hover { animation: ttHover 0.15s ease-out both; }

@keyframes ttLiveIn  { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@keyframes ttHover   { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes ttFadeOut {
  0%   { opacity: 1; }
  25%  { opacity: 0.9; }
  100% { opacity: 0; transform: scale(0.95); }
}

/* =============================================================================
   DIAL FOOTER — three editorial cells, balanced and self-contained.
   Each cell has an eyebrow label, a hero number, and a tiny action hint.
   Hairline rules above/below carry the "strip" feeling; no vertical dividers
   fight for space so nothing wraps awkwardly.
============================================================================= */
.dial-footer {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 4px 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: 920px; width: 100%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.55), transparent);
}
.dial-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 18px 16px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, transform 0.15s ease;
  border-right: 1px solid var(--line-soft);
  min-height: 92px;
}
.dial-cell:last-child { border-right: 0; }
.dial-cell:hover { background: rgba(247,245,255,0.8); }
.dial-cell:hover .dc-v { color: var(--highlight); }
.dial-cell:hover .dc-hint { color: var(--ink); }
.dc-k {
  font: 600 10.5px var(--mono); color: var(--ink-soft);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.dc-v {
  font: 700 26px/1 var(--mono); color: var(--ink);
  letter-spacing: -0.015em;
  transition: color 0.15s ease;
}
.dc-hint {
  font: 500 11px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}
.dc-inline-link {
  color: var(--highlight); font-weight: 700; cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s ease;
}
.dc-inline-link:hover { border-bottom-color: var(--highlight); }

@media (max-width: 720px) {
  .dial-footer { grid-template-columns: 1fr; }
  .dial-cell { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .dial-cell:last-child { border-bottom: 0; }
}

/* =============================================================================
   NARRATOR STRIP — inner-scene subtitle
============================================================================= */
.narrator-strip {
  padding: 11px 16px;
  margin: 0 0 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ink);
  border-radius: var(--radius-md);
  color: var(--ink-soft); font-size: 13px; line-height: 1.55;
  animation: slideIn 0.3s ease;
}
.narrator-strip strong { color: var(--ink); font-weight: 600; }
.narrator-strip em { color: var(--highlight); font-style: normal; font-weight: 500; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-3px); } }

/* =============================================================================
   SCENE SHELL
============================================================================= */
.stage { margin-top: 0; position: relative; }
.scene {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-s);
  color: var(--ink);
  animation: sceneIn 0.4s cubic-bezier(.2,.9,.3,1);
}
@keyframes sceneIn { from { opacity: 0; transform: translateY(6px); } }
.scene h3 { margin: 0 0 4px; font: 700 20px var(--sans); letter-spacing: -0.02em; }
.scene h4.section-h { margin: 22px 0 10px; font: 700 13.5px var(--sans); letter-spacing: 0; }
.scene .sub { color: var(--ink-dim); font-size: 12.5px; }
.scene .tiny { font-size: 11.5px; color: var(--ink-dim); }
.scene-head { margin-bottom: 14px; }
.scene-head-row {
  display: flex; gap: 12px; justify-content: space-between;
  align-items: center; flex-wrap: wrap; margin-bottom: 14px;
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mono { font-family: var(--mono); word-break: break-all; }

/* =============================================================================
   BUTTONS & CHIPS
============================================================================= */
.chip-btn {
  background: var(--gray-50); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font: 600 11.5px/1 var(--sans); cursor: pointer;
  transition: all 0.15s ease;
}
.chip-btn:hover { background: var(--ink); color: var(--gray-0); border-color: var(--ink); }
.chip-btn.mint { color: var(--teal-700); border-color: var(--teal-500); }
.chip-btn.mint:hover { background: var(--teal-500); color: var(--ink); }

.primary-btn {
  background: var(--ink); color: var(--gray-0); border: 1px solid var(--ink);
  border-radius: var(--radius-md); padding: 10px 18px; font: 600 12.5px/1 var(--sans); cursor: pointer;
  transition: all 0.15s ease;
}
.primary-btn:hover { background: var(--gray-800); }

/* =============================================================================
   VALIDATOR CROWD — editorial layout
============================================================================= */
.crowd-page {
  position: relative;
  animation: sceneIn 0.5s cubic-bezier(.2,.9,.3,1);
}

.crowd-head {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 48px; align-items: end;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 880px) { .crowd-head { grid-template-columns: 1fr; gap: 24px; } }

.crowd-head .eyebrow {
  font: 600 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 14px;
}
.crowd-title {
  margin: 0 0 16px;
  font: 700 clamp(32px, 5vw, 52px)/1.05 var(--sans);
  letter-spacing: -0.035em; color: var(--ink);
}
.crowd-accent {
  background: linear-gradient(92deg, var(--highlight) 10%, var(--accent) 85%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.crowd-lead {
  margin: 0; max-width: 520px;
  font: 400 14.5px/1.65 var(--sans); color: var(--ink-soft);
}

.crowd-search-box {
  background: var(--gray-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px 14px;
}
.crowd-search-label {
  display: block;
  font: 600 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 10px;
}
.crowd-search-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 8px; align-items: stretch;
}
.crowd-search-input {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font: 13px var(--mono); color: var(--ink);
  transition: border-color 0.15s ease;
}
.crowd-search-input:focus { outline: none; border-color: var(--ink); }
.crowd-search-input::placeholder { color: var(--ink-dim); }
.crowd-search-btn {
  background: var(--ink); color: var(--gray-0);
  border: none; border-radius: var(--radius-md);
  width: 44px;
  font: 700 18px/1 var(--sans); cursor: pointer;
  transition: background 0.15s ease;
}
.crowd-search-btn:hover { background: var(--highlight); }
.crowd-search-hint {
  margin-top: 8px; font: 400 11.5px var(--sans); color: var(--ink-dim);
}

/* ---------- Stat rail ---------- */
.crowd-stat-rail {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 28px;
}
@media (max-width: 720px) { .crowd-stat-rail { grid-template-columns: 1fr; gap: 14px; } }
.crowd-stat {
  padding: 18px 22px;
  border-left: 2px solid var(--ink);
  display: flex; flex-direction: column; gap: 4px;
}
.crowd-stat:nth-child(2) { border-left-color: var(--highlight); }
.crowd-stat:nth-child(3) { border-left-color: var(--accent); }
.cs-k {
  font: 600 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.16em; text-transform: uppercase;
}
.cs-v {
  font: 700 clamp(28px, 3.4vw, 36px)/1 var(--sans);
  color: var(--ink); letter-spacing: -0.035em;
  margin-top: 4px;
}
.cs-total {
  font: 700 18px var(--sans); color: var(--ink-dim); margin-left: 4px;
}
.cs-note {
  font: 400 12px var(--sans); color: var(--ink-soft); margin-top: 2px;
}

/* ---------- The canvas of icons ---------- */
.crowd-canvas {
  position: relative;
  width: 100%; height: 680px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 60% at 20% 30%, rgba(146,79,231,0.035), transparent 70%),
    radial-gradient(ellipse 60% 70% at 85% 75%, rgba(10,209,147,0.025), transparent 70%),
    var(--gray-50);
  border: 1px solid var(--line-soft);
  overflow: visible;
}
.crowd-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ink-dim); font: 500 13px var(--mono);
}

/* a single validator node: icon + status ring + index label */
.crowd-node {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--size, 1));
  width: 56px; height: 72px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0; background: transparent; border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1), opacity 0.25s ease;
  animation: crowdFloat var(--d, 8s) ease-in-out infinite;
  animation-delay: calc(var(--delay, 0) * -1s);
}
@keyframes crowdFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(var(--size, 1)) translate(0, 0); }
  33%      { transform: translate(-50%, -50%) scale(var(--size, 1)) translate(2px, -4px); }
  66%      { transform: translate(-50%, -50%) scale(var(--size, 1)) translate(-3px, 3px); }
}

.cn-ring {
  position: absolute;
  top: 0; left: 50%;
  width: 52px; height: 52px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: 1.5px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  pointer-events: none;
}
.cn-icon {
  position: relative;
  width: 40px; height: 40px;
  margin-top: 6px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(16,21,27,0.12));
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1), filter 0.25s ease;
  user-select: none;
  pointer-events: none;
}
.cn-label {
  font: 500 10.5px var(--mono);
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
  margin-top: auto;
}

/* status coloring via ring + icon tint */
.crowd-node.active .cn-ring {
  border-color: rgba(146,79,231,0.35);
  background: radial-gradient(circle, rgba(146,79,231,0.14) 0%, rgba(146,79,231,0) 70%);
}
.crowd-node.slashed .cn-ring {
  border-color: rgba(224,31,66,0.45);
  background: radial-gradient(circle, rgba(224,31,66,0.16) 0%, rgba(224,31,66,0) 70%);
}
.crowd-node.slashed .cn-icon {
  filter: drop-shadow(0 1px 2px rgba(224,31,66,0.3)) grayscale(0.6) brightness(0.85);
}
.crowd-node.inactive .cn-ring { border-color: var(--line); background: transparent; }
.crowd-node.inactive .cn-icon { filter: grayscale(0.85) brightness(1.1) opacity(0.7); }
.crowd-node.inactive .cn-label { opacity: 0.45; }

/* hover / focus */
.crowd-node:hover, .crowd-node.focused {
  z-index: 10;
  transform: translate(-50%, -50%) scale(calc(var(--size, 1) * 1.35));
  animation: none;
}
.crowd-node:hover .cn-ring,
.crowd-node.focused .cn-ring {
  border-color: var(--accent);
  background: radial-gradient(circle, rgba(10,209,147,0.22) 0%, rgba(10,209,147,0) 70%);
  box-shadow: 0 6px 18px rgba(10,209,147,0.22);
}
.crowd-node:hover .cn-icon,
.crowd-node.focused .cn-icon {
  filter: drop-shadow(0 4px 10px rgba(10,209,147,0.4)) brightness(1.05);
}
.crowd-node:hover .cn-label,
.crowd-node.focused .cn-label {
  opacity: 1; color: var(--ink);
}
.crowd-node.dim { opacity: 0.25; }
.crowd-node.dim .cn-label { opacity: 0.3; }

/* ---------- Hover detail card ---------- */
.crowd-card {
  position: absolute;
  z-index: 40;
  transform: translate(-50%, -100%) translateY(-18px);
  min-width: 260px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(16,21,27,0.06), 0 12px 32px rgba(16,21,27,0.12);
  pointer-events: none;
  animation: ccPop 0.2s cubic-bezier(.2,.9,.3,1);
}
@keyframes ccPop { from { opacity: 0; transform: translate(-50%, -100%) translateY(-10px); } }
.crowd-card::after {
  content: ""; position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--surface);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cc-index {
  font: 700 22px var(--mono); color: var(--ink);
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.cc-key {
  display: flex; align-items: baseline; gap: 8px;
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.cc-key code {
  font: 500 11px var(--mono); color: var(--ink-soft);
  word-break: break-all;
}
.cc-k-l {
  font: 500 10px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.14em; text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}
.cc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
}
.cc-val { font: 600 12.5px var(--mono); color: var(--ink); }
.cc-pill {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
  font: 700 10.5px/1.4 var(--sans); letter-spacing: 0.06em;
}
.cc-pill.ok { background: rgba(10,209,147,0.12); color: var(--teal-700); }
.cc-pill.mute { background: var(--gray-100); color: var(--ink-soft); }
.cc-pill.bad { background: rgba(224,31,66,0.12); color: var(--red-700); }
.cc-cta {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font: 600 11.5px var(--mono); color: var(--highlight);
  letter-spacing: 0.06em;
}

/* ---------- Legend / footnote ---------- */
.crowd-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font: 500 11.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.06em;
}
.cf-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 2px;
}
.cf-dot.ok { background: var(--highlight); }
.cf-dot.mute { background: var(--gray-400); }
.cf-dot.bad { background: var(--red-500); }
.cf-sp {
  display: inline-block; width: 1px; height: 12px; background: var(--line); margin: 0 6px;
}
.cf-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.cf-label { color: var(--ink-soft); font-weight: 500; }
.cf-info {
  position: relative;
  display: inline-flex;
  cursor: help;
  outline: none;
}
.cf-info-i {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  font: 700 9.5px/1 var(--sans);
  color: var(--ink-dim);
  letter-spacing: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cf-info:hover .cf-info-i,
.cf-info:focus-visible .cf-info-i { border-color: var(--ink); color: var(--ink); }

.cf-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: 260px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(16,21,27,0.06), 0 12px 32px rgba(16,21,27,0.12);
  font: 400 12px/1.55 var(--sans);
  color: var(--ink-soft);
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 40;
}
.cf-tip strong { color: var(--ink); font-weight: 700; }
.cf-tip::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: -5px;
}
.cf-info:hover .cf-tip,
.cf-info:focus-visible .cf-tip {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

/* Inline info pip — used inside stat headers and duty role titles. Slightly
   nudged into baseline so it sits beside text without throwing the line off. */
.cs-k .cf-info,
.vp-duty-role .cf-info {
  margin-left: 6px;
  vertical-align: middle;
}
.cs-k .cf-info-i,
.vp-duty-role .cf-info-i {
  width: 13px; height: 13px; font-size: 9px;
}

/* Make sure the stat cell + duty card lift their tooltip above siblings. */
.vp-stat, .vp-duty { position: relative; }
.vp-stat:hover, .vp-duty:hover { z-index: 3; }
.vp-stat .cf-info:hover, .vp-stat .cf-info:focus-visible,
.vp-duty .cf-info:hover, .vp-duty .cf-info:focus-visible { z-index: 50; }

/* =============================================================================
   VALIDATOR CARD
============================================================================= */
.val-card {
  display: grid; grid-template-columns: auto 1fr; gap: 22px;
  padding: 20px 22px; background: var(--gray-50);
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  animation: popIn 0.3s cubic-bezier(.2,.9,.3,1);
}
@keyframes popIn { from { opacity: 0; transform: scale(0.99); } }
.val-hero {
  width: 100px; height: 100px; border-radius: var(--radius-lg);
  background: var(--gray-100);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.val-hero img { width: 84px; animation: bob 3s ease-in-out infinite; position: relative; z-index: 1; }
.val-hero::before {
  content: ""; position: absolute; inset: -20%;
  background: radial-gradient(circle, rgba(146,79,231,0.14), transparent 60%);
  animation: rot 12s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.val-kv {
  display: grid; grid-template-columns: 150px 1fr; gap: 4px 14px;
  font-size: 13px; align-self: center;
}
.val-kv .k { color: var(--ink-dim); }
.val-kv .v { color: var(--ink); }

.status-pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font: 700 10.5px/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.08em;
}
.status-pill.active { background: rgba(10,209,147,0.12); color: var(--teal-700); }
.status-pill.pending { background: rgba(146,79,231,0.12); color: var(--purple-700); }
.status-pill.exited { background: rgba(224,31,66,0.1); color: var(--red-700); }

/* =============================================================================
   EPOCH VIEW
============================================================================= */
.epoch-stage {
  display: grid; grid-template-columns: minmax(280px, 1fr) 1.2fr;
  gap: 30px; align-items: start;
}
@media (max-width: 860px) { .epoch-stage { grid-template-columns: 1fr; } }

.epoch-clock { position: relative; aspect-ratio: 1; max-width: 340px; margin: 0 auto; }
.epoch-clock svg { width: 100%; height: 100%; overflow: visible; }
.epoch-slot-dot { cursor: pointer; transition: r 0.22s cubic-bezier(.3,1.6,.5,1); }

.clock-center {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; text-align: center;
}
.clock-center .num { font: 800 30px var(--sans); letter-spacing: -0.03em; color: var(--ink); }
.clock-center .lbl {
  font: 600 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.14em; text-transform: uppercase;
}

.legend { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 11.5px; }
.lg-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px;
}
.lg-dot.live { background: var(--accent); }
.lg-dot.past { background: var(--highlight); }
.lg-dot.future { background: var(--surface); border: 1px solid var(--highlight); }

.slot-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 420px; overflow-y: auto; padding-right: 6px;
}
.slot-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center;
  padding: 9px 13px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--line-soft);
  cursor: pointer; transition: all 0.15s ease;
}
.slot-row:hover { border-color: var(--ink); }
.slot-row.current {
  background: rgba(10,209,147,0.06);
  border-color: var(--accent);
}
.slot-row.future { opacity: 0.5; cursor: default; }
.slot-row .slot-n { font: 700 12.5px var(--mono); color: var(--ink); }
.slot-row .prop { font-size: 12.5px; color: var(--ink-soft); }
.slot-row .ago { font: 500 11.5px var(--mono); color: var(--ink-dim); }

/* =============================================================================
   EPOCH VIEW — editorial layout
============================================================================= */
.ev-nav {
  display: inline-flex; gap: 6px; margin-left: auto;
}
.vp-back-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.ev-dial-card { padding-bottom: 22px; }
.ev-dial-wrap {
  position: relative; aspect-ratio: 1; max-width: 360px;
  margin: 4px auto 12px;
}
.ev-dial-svg { width: 100%; height: 100%; overflow: visible; }
.ev-slot-g { cursor: pointer; }
.ev-slot-dot {
  transition: r 0.22s cubic-bezier(.3,1.6,.5,1), filter 0.18s ease;
}
.ev-slot-g:hover .ev-slot-dot {
  r: 3.4; filter: drop-shadow(0 0 6px rgba(146,79,231,0.45));
}
.ev-dial-center {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; text-align: center;
}
.ev-dial-num {
  font: 800 36px var(--sans); letter-spacing: -0.03em; color: var(--ink);
  line-height: 1;
}
.ev-dial-of {
  font: 600 16px var(--sans); color: var(--ink-dim); margin-left: 2px;
}
.ev-dial-lbl {
  margin-top: 4px;
  font: 600 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.16em; text-transform: uppercase;
}

.ev-legend {
  display: flex; justify-content: center; gap: 18px;
  font: 600 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.ev-lg { display: inline-flex; align-items: center; gap: 6px; }
.ev-lg-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.ev-lg-dot.live   { background: var(--accent); }
.ev-lg-dot.past   { background: var(--highlight); }
.ev-lg-dot.future { background: var(--surface); border: 1px solid var(--highlight); }

.ev-slot-list {
  display: flex; flex-direction: column;
  max-height: 560px; overflow-y: auto;
  margin: -4px -6px; padding: 4px 6px;
}
.ev-slot-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ev-slot-row:last-child { border-bottom: 0; }
.ev-slot-row:hover { background: rgba(146,79,231,0.03); }
.ev-slot-row.future { opacity: 0.55; cursor: default; }
.ev-slot-row.future:hover { background: transparent; }
.ev-slot-row.current {
  background: rgba(10,209,147,0.06);
  border-left: 2px solid var(--accent);
  margin-left: -2px;
  padding-left: 12px;
}
.ev-slot-idx {
  font: 700 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.06em;
}
.ev-slot-row.current .ev-slot-idx { color: var(--accent); }
.ev-slot-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-slot-n {
  font: 700 13px var(--mono); color: var(--ink);
}
.ev-slot-prop {
  font-size: 12px; color: var(--ink-soft);
}
.ev-slot-prop .mono { color: var(--ink); font-weight: 600; }

.ev-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font: 600 10.5px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.ev-pill.live {
  background: rgba(10,209,147,0.12);
  color: var(--accent);
  border-color: rgba(10,209,147,0.32);
}
.ev-pill.past {
  background: var(--gray-100);
  color: var(--ink-soft);
  border-color: var(--line);
}
.ev-pill.future {
  background: transparent;
  color: var(--ink-dim);
  border-color: var(--line);
}

/* =============================================================================
   SLOT VIEW — actor grid
============================================================================= */
.actor-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 8px;
}
@media (max-width: 860px) { .actor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .actor-grid { grid-template-columns: 1fr; } }

.actor {
  position: relative; background: var(--gray-50); border-radius: var(--radius-lg); padding: 18px;
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  animation: popIn 0.38s cubic-bezier(.2,.9,.3,1) both;
}
.actor:hover { border-color: var(--ink); box-shadow: var(--shadow-s); }
.actor.highlight { border-color: var(--ink); }
.actor img { width: 52px; align-self: center; }
.actor .role {
  font: 700 10.5px var(--mono); color: var(--highlight); letter-spacing: 0.14em; text-transform: uppercase;
  text-align: center;
}
.actor.mint .role { color: var(--teal-700); }
.actor.rose .role { color: var(--red-700); }
.actor.amber .role { color: #7a5208; }
.actor.sky .role { color: #116d99; }
.actor .title { font: 700 13.5px var(--sans); color: var(--ink); text-align: center; letter-spacing: -0.01em; }
.actor .body { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.actor .value { font: 500 11.5px var(--mono); color: var(--ink); word-break: break-all; }
.actor .reward {
  display: inline-flex; gap: 4px; align-items: center;
  background: rgba(10,209,147,0.1); color: var(--teal-700);
  padding: 3px 10px; border-radius: 999px; font: 700 11.5px var(--mono);
  align-self: flex-start;
}
.actor .reward.mint { background: rgba(10,209,147,0.14); color: var(--teal-700); }

.missed-card {
  padding: 18px; background: rgba(224,31,66,0.05);
  border: 1px solid var(--red-500); border-radius: var(--radius-md);
  color: var(--ink-soft); font-size: 13px; line-height: 1.6;
}
.missed-card strong { display: block; color: var(--red-700); margin-bottom: 4px; font-size: 14.5px; }

/* =============================================================================
   RAW JSON
============================================================================= */
.raw-json { margin-top: 14px; }
.raw-json summary { cursor: pointer; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
pre.json {
  background: var(--gray-900); color: #e4e8ed; border: 1px solid var(--gray-800);
  border-radius: var(--radius-md); padding: 14px;
  font: 12px/1.55 var(--mono);
  white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto;
}

/* =============================================================================
   RPC INSPECTOR DRAWER
============================================================================= */
.drawer {
  position: fixed; top: 0; right: 0; width: min(640px, 92vw); height: 100vh;
  background: var(--gray-900); color: #e4e8ed;
  border-left: 1px solid var(--gray-800);
  z-index: 40; transform: translateX(100%); transition: transform 0.28s ease;
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px rgba(16, 21, 27, 0.25);
}
.drawer.open { transform: translateX(0); }
.drawer .head {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-800);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.drawer .head strong { color: #fff; }
.drawer .head .tiny { font-size: 11.5px; margin-top: 2px; color: var(--gray-400); }
.drawer .head .ghostbtn { background: transparent; color: #e4e8ed; border-color: var(--gray-700); }
.drawer .head .ghostbtn:hover { border-color: var(--gray-300); }
.drawer .body { padding: 14px 16px; overflow: auto; flex: 1; background: var(--gray-900); }

.rpc-entry {
  border: 1px solid var(--gray-800); border-radius: var(--radius-md);
  padding: 10px 14px; margin-bottom: 10px;
  background: rgba(255,255,255,0.02); font-size: 12px; color: var(--gray-200);
}
.rpc-entry.err { border-color: var(--red-500); }
.rpc-entry .title {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.rpc-entry code { font: 11.5px var(--mono); color: #fff; }
.rpc-entry .meta-why { color: var(--gray-400); font-size: 11.5px; margin: 2px 0 6px; font-style: italic; }
.rpc-entry pre {
  margin: 4px 0 0; background: rgba(0,0,0,0.35); padding: 8px; border-radius: 4px;
  font: 11px/1.55 var(--mono); color: var(--gray-100); max-height: 200px; overflow: auto;
}
.rpc-entry .ghostbtn { background: transparent; color: var(--gray-200); border-color: var(--gray-700); padding: 3px 8px; font-size: 10.5px; }
.rpc-entry .ghostbtn:hover { border-color: var(--gray-300); }

.chip {
  padding: 2px 7px; border-radius: var(--radius-sm); font: 700 10px/1.4 var(--sans);
  background: rgba(146,79,231,0.15); color: var(--purple-200); letter-spacing: 0.08em; text-transform: uppercase;
}
.chip.el { background: rgba(224,31,66,0.18); color: #ffc1cf; }
.chip.ok { background: rgba(10,209,147,0.18); color: #a9ffd9; }
.chip.err { background: rgba(224,31,66,0.25); color: #ffc1cf; }

/* =============================================================================
   MISC
============================================================================= */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--line); border-top-color: var(--ink);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--gray-0);
  padding: 9px 16px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-m); z-index: 50; font: 500 12.5px var(--sans);
  animation: toastIn 0.3s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* =============================================================================
   PAGE FOOTER — single hairline credit line
============================================================================= */
.page-footer {
  margin-top: 60px;
  padding: 22px 0 8px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: center; align-items: center; gap: 8px;
  font: 500 11.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.06em;
}
.page-footer a {
  color: var(--ink); font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.page-footer a:hover { color: var(--highlight); border-bottom-color: var(--highlight); }
.page-footer-sep { color: var(--ink-dim); }

/* =============================================================================
   VALIDATOR PROFILE — editorial layout, matches /validators
============================================================================= */
.vp-page {
  position: relative;
  animation: sceneIn 0.5s cubic-bezier(.2,.9,.3,1);
}

/* back link sits above the headline */
.vp-back-row { margin-bottom: 18px; }
.vp-back {
  background: none; border: none;
  font: 600 11.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; padding: 4px 0;
  transition: color 0.15s ease;
}
.vp-back:hover { color: var(--ink); }

/* hero head */
.vp-head {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: 48px; align-items: end;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 880px) { .vp-head { grid-template-columns: 1fr; gap: 24px; } }

.vp-title {
  margin: 0 0 16px;
  font: 700 clamp(32px, 5vw, 52px)/1.05 var(--sans);
  letter-spacing: -0.035em; color: var(--ink);
}
.vp-num {
  font-family: var(--mono);
  font-weight: 600;
  background: linear-gradient(92deg, var(--highlight) 10%, var(--accent) 85%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
/* the InfoTip pip next to the big title needs breathing room, and a
   slightly larger visual size so it doesn't look glued to the gradient. */
.vp-title .cf-info {
  margin-left: 14px;
  vertical-align: 0.35em;
}
.vp-title .cf-info-i {
  width: 18px; height: 18px;
  font-size: 11px;
}

/* status block on the right of the hero */
.vp-status-block {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
@media (max-width: 880px) { .vp-status-block { text-align: left; align-items: flex-start; } }
.vp-sb-k {
  font: 600 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.vp-sb-pill {
  display: inline-block; padding: 6px 14px;
  border-radius: var(--radius-sm);
  font: 700 12.5px var(--sans); letter-spacing: 0.04em;
}
.vp-sb-pill.active {
  background: rgba(146,79,231,0.12); color: var(--highlight);
  border: 1px solid rgba(146,79,231,0.28);
}
.vp-sb-pill.exited {
  background: var(--gray-100); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.vp-sb-pill.pending {
  background: var(--gray-100); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.vp-sb-warn {
  font: 700 11px var(--mono); color: var(--red-500);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* stat rail — same DNA as the crowd page */
.vp-stat-rail {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 36px;
}
@media (max-width: 720px) { .vp-stat-rail { grid-template-columns: 1fr; gap: 14px; } }
.vp-stat {
  padding: 18px 22px;
  border-left: 2px solid var(--ink);
  display: flex; flex-direction: column; gap: 4px;
}
.vp-stat.highlight { border-left-color: var(--highlight); }
.vp-stat.accent { border-left-color: var(--accent); }
.cs-unit {
  font: 600 16px var(--sans); color: var(--ink-dim);
  margin-left: 4px;
  letter-spacing: 0;
}

/* body — two columns: identity + duties */
.vp-body {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 28px; margin-bottom: 36px;
}
@media (max-width: 880px) { .vp-body { grid-template-columns: 1fr; gap: 20px; } }

.vp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.vp-card-h { margin-bottom: 16px; }

/* description list inside the identity card */
.vp-dl {
  margin: 0;
  display: grid; grid-template-columns: 130px 1fr;
  gap: 12px 18px;
  align-items: baseline;
}
.vp-dl dt {
  font: 600 10.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding-top: 2px;
}
.vp-dl dd {
  margin: 0;
  font: 500 13px var(--sans); color: var(--ink);
  word-break: break-word;
}
.vp-dl dd.mono { font: 500 12.5px var(--mono); color: var(--ink); }
.vp-dl dd.break { word-break: break-all; }

/* duty cards */
.vp-duties {
  display: flex; flex-direction: column; gap: 14px;
}
.vp-duty {
  position: relative;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--gray-50);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.vp-duty:hover { border-color: var(--line); transform: translateY(-1px); }
.vp-duty-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 10px;
}
.vp-duty-icon {
  width: 36px; height: 36px; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(16,21,27,0.1));
}
.vp-duty-role {
  font: 700 14px var(--sans); color: var(--ink);
  letter-spacing: -0.01em;
}
.vp-duty-sub {
  font: 500 11px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.06em; margin-top: 1px;
}
.vp-duty-body {
  margin: 0;
  font: 400 13.5px/1.55 var(--sans); color: var(--ink-soft);
}
.vp-duty-body.muted { color: var(--ink-dim); font-style: italic; }
.vp-duty-body strong { color: var(--ink); font-weight: 700; }
.vp-duty-cta {
  margin-top: 10px;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font: 600 11.5px var(--mono); color: var(--ink);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.vp-duty-cta:hover { background: var(--ink); color: var(--gray-0); }

/* Reward line items inside duty cards (proposer / fee recipient). */
.vp-reward-row {
  margin-top: 8px;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 10px;
  background: rgba(10,209,147,0.06);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent);
}
.vp-reward-row.mev {
  background: rgba(146,79,231,0.08);
  border-left-color: var(--highlight);
}
.vp-reward-k {
  font: 500 11px var(--mono); color: var(--ink-soft);
  letter-spacing: 0.06em;
}
.vp-reward-v {
  font: 700 13px var(--mono); color: var(--ink);
  letter-spacing: -0.01em;
}
.vp-reward-row.mev .vp-reward-v { color: var(--highlight); }

/* Allow .vp-duty-sub to be mono when displaying an address. */
.vp-duty-sub.mono { font-family: var(--mono); }

/* loading + error */
.vp-loading {
  display: flex; align-items: center; gap: 10px;
  font: 500 13px var(--mono); color: var(--ink-dim);
  padding: 28px 0;
}
.vp-loading.inline { padding: 12px 0; }
.vp-error {
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

/* raw JSON drawer */
.vp-raw {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.vp-raw summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 6px 0;
}
.vp-raw summary::-webkit-details-marker { display: none; }
.vp-raw-label {
  font: 700 11px var(--mono); color: var(--ink);
  letter-spacing: 0.18em;
}
.vp-raw-hint { font: 500 11px var(--mono); color: var(--ink-dim); letter-spacing: 0.06em; }
.vp-raw[open] summary .vp-raw-label { color: var(--highlight); }
.vp-raw-tools {
  display: flex; gap: 8px; margin: 14px 0 10px;
}
.vp-tool-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font: 600 11.5px var(--mono); color: var(--ink-soft);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.vp-tool-btn:hover { border-color: var(--ink); color: var(--ink); }
.vp-raw-json {
  margin: 0;
  background: var(--gray-50);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font: 500 11.5px/1.6 var(--mono); color: var(--ink-soft);
  max-height: 480px; overflow: auto;
}

/* ============================================================================
 * SlotView "Open the block" CTA
 * ============================================================================ */
.vp-open-block {
  margin-top: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--ink); color: #fff;
  border: none; border-radius: 999px;
  font: 600 12px var(--mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.vp-open-block:hover { background: var(--highlight); transform: translateY(-1px); }
.vp-open-arrow { transition: transform 0.15s ease; }
.vp-open-block:hover .vp-open-arrow { transform: translateX(3px); }

/* ============================================================================
 * BlockView — wheel + sections + missed-block transparency
 * ============================================================================ */
.bv-page { /* same as .vp-page; keeps a hook for tweaks */ }

.bv-slot-link {
  margin-top: 12px;
  display: flex; align-items: center; gap: 8px;
  font: 500 11.5px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.bv-slot-link a {
  color: var(--highlight); cursor: pointer; font-weight: 600;
}
.bv-slot-link a:hover { text-decoration: underline; }

/* The wheel lives as open composition on the page — no card chrome.
   A soft ambient wash behind it provides depth without boxing it in. */
.bw-wrap {
  position: relative;
  margin: 48px -12px 56px;
  padding: 8px 0 16px;
}
/* Two faint pastel blobs fade in behind the composition, giving it a
   sense of atmosphere without hard borders. */
.bw-wrap::before,
.bw-wrap::after {
  content: "";
  position: absolute; pointer-events: none; z-index: 0;
  filter: blur(80px);
  opacity: 0.7;
}
.bw-wrap::before {
  top: 4%; left: 10%;
  width: 36%; height: 40%;
  background: radial-gradient(closest-side, rgba(184,164,255,0.35), transparent 70%);
}
.bw-wrap::after {
  bottom: 4%; right: 8%;
  width: 34%; height: 40%;
  background: radial-gradient(closest-side, rgba(10,209,147,0.18), transparent 70%);
}
.bw-svg {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%; height: auto;
  max-height: 760px;
  aspect-ratio: 1 / 1;
  overflow: visible;     /* allow ball glows to spill outside the viewBox */
}
.bw-node { cursor: default; }
.bw-node.bw-clickable { cursor: pointer; }

/* Balls now have per-tone radial gradients defined in SVG <defs>; the
   CSS here just handles the outer halo, stroke and transitions. */
.bw-halo   { fill: rgba(184,164,255,0.06); transition: fill 0.2s ease; }
.bw-stroke { fill: none; stroke-width: 0.3; transition: stroke 0.2s ease, stroke-width 0.2s ease; }

.bw-tone-ink       .bw-stroke { stroke: rgba(42,51,64,0.25); }
.bw-tone-highlight .bw-stroke { stroke: rgba(184,164,255,0.55); }
.bw-tone-accent    .bw-stroke { stroke: rgba(10,209,147,0.5); }
.bw-tone-muted     .bw-stroke { stroke: rgba(170,180,195,0.45); }

.bw-node:hover .bw-halo { fill: rgba(184,164,255,0.22); }
.bw-node:hover .bw-stroke { stroke-width: 0.55; }

/* Active (cursor-nearest) ball gets an amplified glow + thicker stroke. */
.bw-node.bw-active .bw-stroke { stroke-width: 0.65; }
.bw-node.bw-active .bw-halo   { fill: rgba(184,164,255,0.32); }
.bw-glow {
  fill: rgba(184,164,255,0.22);
  filter: blur(0.8px);
}

/* Legend sits quietly above the composition, not inside a card */
.bw-legend-top {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 8px 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  flex-wrap: wrap;
  opacity: 0.92;
}
.bw-legend-k {
  font-size: 10.5px; font-weight: 700;
  color: var(--ink); letter-spacing: 0.22em; text-transform: uppercase;
}
.bw-legend-v {
  font-size: 11.5px; color: var(--ink-dim);
}
.bw-legend-hint {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid rgba(184,164,255,0.45);
  border-radius: 10px;
  background: rgba(244,238,255,0.7);
  color: #5a4dbf;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* caption tween for when the node below it grows */
.bw-caption {
  transition: fill 0.15s ease, font-weight 0.15s ease;
}
.bw-caption-active {
  font-weight: 700 !important;
}

/* focus card and cursor leader fade-in nicely */
.bw-svg { cursor: crosshair; }
.bw-svg .bw-node.bw-clickable { cursor: pointer; }
.bw-focus-card > rect,
.bw-focus-card > text,
.bw-focus-card > line {
  animation: bwFocusIn 0.12s ease-out both;
}
@keyframes bwFocusIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Compact sub-line under the big Beacon block #N title */
.bv-sub {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.bv-sub .bv-link {
  color: var(--highlight);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}
.bv-sub .bv-link:hover { text-decoration: underline; }

/* Editorial cards inside BlockView */
.bv-delay-hist {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.bv-delay-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--gray-50);
}
.bv-delay-d {
  font: 600 10.5px var(--mono);
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bv-delay-c {
  margin-top: 4px;
  font: 700 14px var(--mono);
  color: var(--ink);
}

.bv-bitbar {
  position: relative;
  height: 14px;
  border-radius: 8px;
  background: var(--gray-100);
  overflow: hidden;
}
.bv-bitbar-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(92deg, var(--highlight) 10%, var(--accent) 95%);
  border-radius: 8px;
  transition: width 0.4s ease;
}
.bv-bitbar-meta {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font: 600 10px var(--mono);
  color: var(--ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  mix-blend-mode: luminosity;
}

.bv-details {
  margin-top: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.bv-details > summary {
  cursor: pointer;
  list-style: none;
  font: 600 11px var(--mono); color: var(--ink-soft);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 0;
}
.bv-details > summary::-webkit-details-marker { display: none; }
.bv-details > summary::before { content: "▸ "; color: var(--ink-dim); }
.bv-details[open] > summary::before { content: "▾ "; }

.bv-table {
  width: 100%; border-collapse: collapse;
  margin-top: 10px;
  font: 500 12px var(--mono);
}
.bv-table th, .bv-table td {
  text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.bv-table th {
  font: 600 10px var(--mono);
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bv-table .muted { color: var(--ink-dim); }

.bv-link { color: var(--highlight); cursor: pointer; }
.bv-link:hover { text-decoration: underline; }

.bv-ops-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.bv-op-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--gray-50);
}
.bv-op-k {
  font: 600 10.5px var(--mono); color: var(--ink-soft);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.bv-op-v {
  margin-top: 6px;
  font: 700 22px var(--mono); color: var(--ink);
  letter-spacing: -0.01em;
}

.vp-meta-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 18px;
  margin: 0;
}
.vp-meta-grid dt {
  font: 600 10.5px var(--mono); color: var(--ink-soft);
  letter-spacing: 0.08em; text-transform: uppercase;
  align-self: center;
}
.vp-meta-grid dd {
  margin: 0; font: 500 13px var(--mono); color: var(--ink);
  word-break: break-all;
}
.vp-meta-grid .muted { color: var(--ink-dim); }

/* Missed-block transparency variant */
.bv-missed-card {
  margin-top: 24px;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.bv-missed-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.bv-missed-cta {
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  padding: 16px 18px;
  background: var(--gray-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.bv-missed-cta:hover {
  border-color: var(--highlight);
  background: #fff;
  transform: translateY(-1px);
}
.bv-missed-cta-k {
  font: 600 10.5px var(--mono); color: var(--ink-soft);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.bv-missed-cta-v {
  margin-top: 4px;
  font: 600 13px var(--mono); color: var(--ink);
}
.bv-missed-cta-arrow {
  font: 700 18px var(--mono); color: var(--highlight);
  flex: none;
}

.bv-eyebrow {
  font: 600 10.5px var(--mono);
  color: var(--ink-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
