/* Cabecera de lightning.html: red de canales con pagos que viajan como rayos.
   Se carga después de db.css. Solo afecta a lightning.html. */
:root { --lnh-ease: cubic-bezier(.2,.7,.2,1); --lnh-ok: #3FE0A0; }

html body .page-hero.lnh-hero {
  max-width: 1200px; margin: 0 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center;
  text-align: left; padding: 132px 28px 80px; isolation: isolate;
}
html body .page-hero.lnh-hero::after { display: none; }
html body .page-hero.lnh-hero::before {
  content: ''; position: absolute; z-index: -1; inset: 60px -4% 0 30%; pointer-events: none;
  background:
    radial-gradient(closest-side at 62% 48%, rgba(247,147,26,.22), transparent 70%),
    radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(60% 60% at 60% 48%, #000 25%, transparent 78%);
  mask-image: radial-gradient(60% 60% at 60% 48%, #000 25%, transparent 78%);
}
.lnh-text { min-width: 0; }
html body .page-hero.lnh-hero h1 {
  max-width: none; margin: 14px 0 22px; font-size: clamp(2.3rem, 4.6vw, 4rem); line-height: 1.02; font-stretch: 112%;
  background: linear-gradient(180deg, #fff 45%, #F7931A 160%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html body .page-hero.lnh-hero h1 span { -webkit-text-fill-color: #F7931A; }
html body .page-hero.lnh-hero p { margin: 0; max-width: 34em; font-size: clamp(1.02rem, 1.35vw, 1.18rem); color: #B4B4B9; }

.lnh-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.lnh-chips li {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px 8px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); font-size: .86rem; color: #D2D2D6;
}
.lnh-chips svg { width: 14px; height: 14px; flex: none; fill: #F7931A; filter: drop-shadow(0 0 6px rgba(247,147,26,.7)); }

/* ---------- Panel de la red ---------- */
.lnh-art {
  position: relative; margin: 0; min-width: 0; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.012) 50%), rgba(6,6,7,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 40px 80px -30px rgba(0,0,0,.95), 0 0 80px -28px rgba(247,147,26,.45);
}
.lnh-art::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--lnh-a, 0deg), transparent 0 70%, rgba(247,147,26,.85) 82%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: lnhSpin 7s linear infinite; opacity: .8;
}
@property --lnh-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes lnhSpin { to { --lnh-a: 360deg; } }

.lnh-bar { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.025); }
.lnh-bolt-ico { width: 16px; height: 16px; fill: #F7931A; flex: none; }
.lnh-title { font: 500 .76rem/1.2 'JetBrains Mono', ui-monospace, monospace; color: #A1A1A6; letter-spacing: .03em; }
.lnh-state {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px;
  font: 600 .7rem/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase;
  color: #F7931A; background: rgba(247,147,26,.1); border: 1px solid rgba(247,147,26,.3); white-space: nowrap;
  transition: color .3s, background .3s, border-color .3s;
}
.lnh-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: lnhBlink 1s steps(2) infinite; }
.lnh-state > span { display: none; }
.lnh-state[data-phase="find"] [data-s="find"], .lnh-state[data-phase="lock"] [data-s="lock"],
.lnh-state[data-phase="settle"] [data-s="settle"], .lnh-state[data-phase="done"] [data-s="done"] { display: inline; }
.lnh-state[data-phase="settle"] { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.lnh-state[data-phase="done"] { color: var(--lnh-ok); background: rgba(63,224,160,.1); border-color: rgba(63,224,160,.35); }
.lnh-state[data-phase="done"]::before { animation: none; }
@keyframes lnhBlink { 50% { opacity: .25; } }

.lnh-stage { position: relative; padding: 6px 10px 0; }
.lnh-stage svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Red */
.lnh-e { stroke: rgba(255,255,255,.13); stroke-width: 1.4; }
.lnh-n .lnh-halo { fill: rgba(247,147,26,0); transition: fill .35s; }
.lnh-n .lnh-core { fill: #0C0C0D; stroke: rgba(255,255,255,.38); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.lnh-n .lnh-pip { fill: rgba(255,255,255,.45); transition: fill .3s; }
.lnh-n.end .lnh-core { stroke: rgba(247,147,26,.75); }
.lnh-n.on .lnh-halo { fill: rgba(247,147,26,.2); }
.lnh-n.on .lnh-core { stroke: #F7931A; fill: #1a1006; }
.lnh-n.on .lnh-pip { fill: #F7931A; }
.lnh-n.ok .lnh-halo { fill: rgba(63,224,160,.16); }
.lnh-n.ok .lnh-core { stroke: var(--lnh-ok); fill: #06140e; }
.lnh-n.ok .lnh-pip { fill: var(--lnh-ok); }
.lnh-hop { stroke: #F7931A; stroke-width: 2.6; stroke-linecap: round; transition: stroke .35s; }
.lnh-hop.ok { stroke: var(--lnh-ok); }
.lnh-bolt { fill: none; stroke: #FFD9A6; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: 0; }
.lnh-head { fill: #fff; stroke: #F7931A; stroke-width: 2; }
.lnh-back { fill: #fff; }
.lnh-gossip { fill: rgba(255,255,255,.75); }
.lnh-tag rect { fill: #F7931A; }
.lnh-tag.dst rect { fill: #fff; }
.lnh-tag text { font: 700 13px 'Archivo', system-ui, sans-serif; fill: #000; text-anchor: middle; }
.lnh-routeg { transition: opacity .45s; }
.lnh-art.is-out .lnh-routeg { opacity: 0; }

/* Ruta legible + datos */
.lnh-route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 18px 14px; min-height: 44px; }
.lnh-chip {
  font: 600 .8rem/1 'Archivo', system-ui, sans-serif; padding: 7px 11px; border-radius: 999px; color: #A1A1A6;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); transition: all .3s var(--lnh-ease);
}
.lnh-chip.lit { color: #E6E6E8; border-color: rgba(255,255,255,.28); }
.lnh-chip.on { color: #000; background: #F7931A; border-color: #F7931A; }
.lnh-chip.ok { color: #000; background: var(--lnh-ok); border-color: var(--lnh-ok); }
.lnh-arr { color: #6E6E73; font-size: .8rem; }

.lnh-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid rgba(255,255,255,.09); }
.lnh-stats > div { padding: 12px 18px; border-left: 1px solid rgba(255,255,255,.09); min-width: 0; }
.lnh-stats > div:first-child { border-left: 0; }
.lnh-stats dt { font-size: .72rem; color: #A1A1A6; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.lnh-stats dd { margin: 0; font: 600 1.02rem/1.2 'JetBrains Mono', ui-monospace, monospace; color: #F5F5F7; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lnh-stats dd.zero { color: var(--lnh-ok); }

.lnh-foot { display: flex; align-items: center; gap: 14px; padding: 12px 18px 16px; border-top: 1px solid rgba(255,255,255,.09); }
.lnh-cap { font-size: .8rem; line-height: 1.5; color: #A1A1A6; margin: 0; }
.lnh-replay {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font: 700 .82rem/1 'Archivo', system-ui, sans-serif; color: #000; background: #F7931A; border: 0;
  box-shadow: 0 0 0 0 rgba(247,147,26,.5); transition: transform .2s var(--lnh-ease), box-shadow .3s;
}
.lnh-replay svg { width: 14px; height: 14px; fill: currentColor; }
.lnh-replay:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -6px rgba(247,147,26,.6); }
.lnh-replay:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lnh-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 900px) {
  html body .page-hero.lnh-hero { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 108px 16px 52px; }
  html body .page-hero.lnh-hero::before { inset: 40% -10% 0 -10%; }
}
@media (max-width: 480px) {
  .lnh-bar { padding: 11px 14px; }
  .lnh-title { display: none; }
  .lnh-state { margin-left: 0; }
  .lnh-stage { padding: 4px 4px 0; }
  .lnh-route { padding: 2px 14px 12px; }
  .lnh-stats > div { padding: 10px 12px; }
  .lnh-stats dd { font-size: .9rem; }
  .lnh-foot { flex-direction: column; align-items: flex-start; padding: 12px 14px 14px; }
  .lnh-chips li { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lnh-art::before, .lnh-state::before { animation: none; }
  .lnh-routeg, .lnh-chip, .lnh-n * { transition: none; }
}
