/* Pearlscriptions / PRL-20 Explorer — static styles. Zero dependencies. */
:root {
  --bg: #0b0e14;
  --panel: #121826;
  --panel-2: #0e1420;
  --line: #223052;
  --text: #e8eefc;
  --muted: #93a1bd;
  --accent: #7dd3fc;
  --accent-2: #c4b5fd;
  --good: #6ee7b7;
  --bad: #fca5a5;
  --warn: #fcd34d;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 560px at 85% -10%, #182238 0%, var(--bg) 55%),
    radial-gradient(900px 500px at -10% 30%, #141b2e 0%, transparent 60%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }
.mono { font-family: var(--mono); }
code, pre { font-family: var(--mono); }
.hidden { display: none !important; }
a { color: var(--accent); }
a:hover { color: #a5e3ff; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 14, 20, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; padding: 0.7rem 1.25rem; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.brand span { color: var(--accent); }
.brand small { font-weight: 500; color: var(--muted); font-size: 0.8rem; margin-left: 0.35rem; }
.nav { display: flex; gap: 1rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav a:hover, .nav a.active { color: var(--accent); }
.conn { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.conn.on { color: var(--good); }
.conn.err { color: var(--bad); }

.hero { padding: 3rem 0 1.5rem; }
.hero h1 { font-size: 2.4rem; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.lede { color: var(--muted); max-width: 64ch; }
.hint {
  margin-top: 1.25rem;
  background: rgba(125, 211, 252, 0.07);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.hint strong { color: var(--accent); }
.hint.ok { border-color: rgba(110, 231, 183, 0.35); }
.hint.ok strong { color: var(--good); }

.card {
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  margin: 1.25rem 0;
  backdrop-filter: blur(6px);
}
.card h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.card h3 { margin: 1.5rem 0 0.75rem; font-size: 1.05rem; }
.muted, .note { color: var(--muted); }
.note { font-size: 0.88rem; }

.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.wrap-controls { margin-bottom: 1rem; }
.input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  min-width: 240px;
}
.input.wide { flex: 1; min-width: 280px; }
.input:focus { outline: 2px solid var(--accent); border-color: transparent; }
select.input { min-width: 0; }
.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; border-radius: 8px;
  color: #0b0e14; font-weight: 700; font-size: 0.9rem;
  padding: 0.55rem 1rem; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); filter: none; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; }
.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
.stat .k { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .v { font-size: 1.15rem; font-weight: 700; margin-top: 0.15rem; }
.stat .v.ok { color: var(--good); }
.stat .v.bad { color: var(--bad); }

/* tabs */
.tabs { margin: 1.25rem 0; }
.tabbar { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab {
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted);
  padding: 0.45rem 1.1rem; font-size: 0.9rem; cursor: pointer;
}
.tab:hover { color: var(--text); border-color: var(--accent); }
.tab.active { background: rgba(125, 211, 252, 0.12); color: var(--accent); border-color: var(--accent); }

/* cards grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.85rem; }
.tcard {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.tcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.tcard .tick { font-family: var(--mono); font-weight: 800; font-size: 1.05rem; color: var(--accent-2); }
.tcard .kv { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }
.tcard .kv b { color: var(--text); font-weight: 600; }
.progress { height: 8px; background: #1a2340; border-radius: 999px; margin: 0.7rem 0 0.4rem; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.prog-label { font-size: 0.78rem; color: var(--muted); }

/* detail */
.detail {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.detail h3 { margin: 0 0 0.6rem; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 0.35rem 1rem; font-size: 0.88rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-all; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  border-radius: 999px; padding: 0.12rem 0.55rem; letter-spacing: 0.03em;
}
.badge.ok { background: rgba(110, 231, 183, 0.14); color: var(--good); }
.badge.bad { background: rgba(252, 165, 165, 0.14); color: var(--bad); }
.badge.info { background: rgba(196, 181, 253, 0.14); color: var(--accent-2); }
.badge.warn { background: rgba(252, 211, 77, 0.14); color: var(--warn); }

/* operations list */
.list { display: flex; flex-direction: column; gap: 0.6rem; }
.op {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
}
.op .tick { font-family: var(--mono); font-weight: 700; color: var(--accent-2); }
.op .meta { color: var(--muted); font-size: 0.78rem; }
.op .meta code { color: var(--text); }

/* utxos */
.utxo {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.7rem 1rem; font-size: 0.83rem;
  margin-bottom: 0.55rem;
}
.utxo .protect { float: right; }

.empty {
  border: 1px dashed var(--line); border-radius: 12px;
  padding: 2rem; text-align: center; color: var(--muted);
}
.err { color: var(--bad); }

.donate .addr {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 0.5rem 0.8rem; font-size: 0.78rem;
  word-break: break-all; color: var(--accent);
}
.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 2rem 0 3rem; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .topbar-inner { gap: 0.75rem; flex-wrap: wrap; }
  .dl { grid-template-columns: 120px 1fr; }
  .op { grid-template-columns: 1fr; }
}

/* Keyboard focus: a visible ring in this app's accent on every interactive element (fleet focus-visible pass). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Skip link: the first Tab stop on the page — parked off-screen until keyboard focus reveals it (fleet skip-link pass). */
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 1000; padding: 10px 16px; border: 2px solid var(--accent); border-radius: 8px; background: #0b0e14; color: var(--accent); font-weight: 700; text-decoration: none; transition: top .15s ease; }
.skip-link:focus-visible { top: 12px; }
main:focus { outline: none; }

/* Reduced motion: when the OS asks for reduced motion, animations and transitions finish near-instantly and scrolling is not smoothed (fleet reduced-motion pass). Near-zero durations — not animation: none — so fade-ins still land on their end state and no content can be stranded invisible. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
