/* Pearl Block 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;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #16213a 0%, var(--bg) 55%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }
.mono { font-family: var(--mono); }
code, pre { font-family: var(--mono); }
pre.code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: pre-wrap;
}

/* 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); }
.nav { display: flex; gap: 1rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav a:hover { 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: 60ch; }
.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: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  margin: 1.25rem 0;
}
.card h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.card h3 { margin: 1.5rem 0 0.75rem; font-size: 1.1rem; }
.card h4 { margin: 1.25rem 0 0.5rem; font-size: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-head h2 { margin: 0; }
.note { color: var(--muted); font-size: 0.9rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; }
.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  min-width: 0;
}
.stat .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat .value { font-size: 1.15rem; font-weight: 700; word-break: break-all; }
.stat .value.small { font-size: 0.8rem; font-weight: 400; color: var(--muted); }

.lookup-row, .settings-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; }
.lookup-row .input { flex: 1; min-width: 240px; }
.settings-row label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); flex: 1; min-width: 180px; }
.input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  width: 100%;
}
.input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b0e14; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }

.kv { display: grid; gap: 0.5rem; margin: 0; }
.kv div {
  display: grid; grid-template-columns: 140px 1fr; gap: 1rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}
.kv dt { color: var(--muted); font-size: 0.85rem; }
.kv dd { margin: 0; word-break: break-all; font-size: 0.85rem; }

.txlist {
  margin: 0.5rem 0 0; padding: 0; list-style: none;
  display: grid; gap: 0.4rem;
  max-height: 320px; overflow-y: auto;
}
.txlist li {
  font-family: var(--mono); font-size: 0.8rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  word-break: break-all;
  color: var(--muted);
}
.count { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

.err {
  color: var(--bad);
  background: rgba(252, 165, 165, 0.07);
  border: 1px solid rgba(252, 165, 165, 0.35);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}

.donate .donate-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.donate code {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.6rem 0.9rem; font-size: 0.8rem; word-break: break-all;
}
.donate a { color: var(--accent); }

.footer { border-top: 1px solid var(--line); margin-top: 3rem; }
.footer-inner {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.25rem; color: var(--muted); font-size: 0.85rem;
}
.footer a { color: var(--accent); text-decoration: none; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .kv div { grid-template-columns: 1fr; gap: 0.15rem; }
  .nav { display: none; }
}

/* 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; }
}
