/* Pearl Recover — "rescue beacon" theme.
 * Deep Pearl-ink dark, luminous amber beacon accents. Original design. */
:root {
  --ink: #070a12;
  --ink-2: #0c111c;
  --panel: #0e1422;
  --panel-2: #121a2d;
  --line: #1e2a45;
  --text: #e9eefb;
  --dim: #9aa7c7;
  --faint: #808aa1;
  --amber: #ffb454;
  --amber-hot: #ffd489;
  --amber-deep: #b46a1e;
  --signal: #7dffa8;
  --danger: #ff7d7d;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 700px at 50% -10%, #101a30 0%, var(--ink) 55%) fixed, var(--ink);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

/* animated radar rings behind the header */
.beacon-sky {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.beacon-sky .ring {
  position: absolute; top: -140px; left: 50%; transform: translateX(-50%);
  border: 1px solid rgba(255, 180, 84, 0.28);
  border-radius: 50%;
  animation: ping 7s ease-out infinite;
}
.beacon-sky .r1 { width: 420px; height: 420px; }
.beacon-sky .r2 { width: 420px; height: 420px; animation-delay: 2.3s; }
.beacon-sky .r3 { width: 420px; height: 420px; animation-delay: 4.6s; }
@keyframes ping {
  0% { transform: translateX(-50%) scale(0.35); opacity: 0.9; }
  70% { opacity: 0.25; }
  100% { transform: translateX(-50%) scale(1.6); opacity: 0; }
}

.top, main, footer { position: relative; z-index: 1; }
.top { text-align: center; padding: 56px 20px 10px; }
.crumb {
  display: inline-block; color: var(--dim); text-decoration: none; font-size: 0.85rem;
  margin-bottom: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px;
}
.crumb:hover { color: var(--amber-hot); border-color: var(--amber-deep); }
h1 {
  margin: 0 0 8px; font-size: 2.4rem; letter-spacing: 0.02em;
  text-shadow: 0 0 34px rgba(255, 180, 84, 0.35);
}
.beacon-dot {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--amber-hot), var(--amber-deep));
  box-shadow: 0 0 18px 4px rgba(255, 180, 84, 0.75);
  margin-right: 10px; animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.sub { color: var(--dim); max-width: 640px; margin: 0 auto; }

main { max-width: 860px; margin: 0 auto; padding: 20px; }
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; margin: 18px 0;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.panel h2 {
  margin: 0 0 14px; font-size: 1.15rem; letter-spacing: 0.04em;
  color: var(--amber-hot);
}
.honesty h2 { color: var(--signal); }
.honesty ul { margin: 0; padding-left: 20px; color: var(--dim); }
.honesty li { margin: 8px 0; }
.honesty a { color: var(--amber); }

.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 0.9rem; color: var(--dim); margin-bottom: 6px; }
.field small { color: var(--faint); }
.mono { font-family: var(--mono); overflow-wrap: anywhere; }
textarea, input[type="text"], input[type="url"], input[type="number"], select {
  width: 100%; background: var(--ink-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font-size: 0.95rem; font-family: inherit;
}
textarea { font-family: var(--mono); resize: vertical; }
textarea:focus, input:focus, select:focus {
  outline: none; border-color: var(--amber-deep); box-shadow: 0 0 0 3px rgba(255, 180, 84, 0.15);
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.row { display: flex; align-items: center; gap: 8px; }
.row .num { width: 100%; }
.to { color: var(--faint); }

.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 18px; font-size: 0.95rem; cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.btn:hover:not(:disabled) { border-color: var(--amber-deep); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, var(--amber), var(--amber-deep));
  color: #1a0f02; font-weight: 700; border: none;
  box-shadow: 0 0 22px rgba(255, 180, 84, 0.35);
}
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 12px; font-size: 0.8rem; }
.note { color: var(--faint); font-size: 0.85rem; }
.error {
  background: rgba(255, 125, 125, 0.1); border: 1px solid rgba(255, 125, 125, 0.4);
  color: var(--danger); border-radius: 8px; padding: 10px 14px;
}

.progress { background: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; height: 14px; overflow: hidden; }
.bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--amber-deep), var(--amber), var(--amber-hot));
  box-shadow: 0 0 12px rgba(255, 180, 84, 0.6);
  transition: width 0.2s;
}
.status { color: var(--dim); font-size: 0.9rem; font-family: var(--mono); }

.totals {
  display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px;
  font-size: 0.95rem; color: var(--dim);
}
.totals strong { color: var(--amber-hot); font-size: 1.2rem; font-family: var(--mono); }
.copied { color: var(--signal); font-size: 0.85rem; }

.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--amber-hot); font-weight: 600; white-space: nowrap; }
td.addr { font-family: var(--mono); font-size: 0.78rem; word-break: break-all; }
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
tbody tr:hover { background: rgba(255, 180, 84, 0.05); }
.chain-ext { color: var(--signal); }
.chain-int { color: var(--amber); }

footer { text-align: center; padding: 30px 20px 50px; color: var(--faint); font-size: 0.85rem; }
footer a { color: var(--amber); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.donate .mono { color: var(--text); font-size: 0.8rem; word-break: break-all; }
.dim { color: var(--faint); }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.8rem; }
}

/* Keyboard focus: a visible ring in this app's accent on every interactive element (fleet focus-visible pass). */
:focus-visible { outline: 2px solid var(--amber); 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(--amber); border-radius: 8px; background: #0b0e14; color: var(--amber); 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; }
}
