:root {
  --ink: #18181b;
  --muted: #52525b;
  --line: #e4e4e7;
  --panel: #fafafa;
  --direct: #15803d;
  --relay: #b45309;
  --warn-bg: #fffbeb;
  --warn-line: #fcd34d;
}

* { box-sizing: border-box; }

body {
  font: 16px/1.6 system-ui, -apple-system, sans-serif;
  color: var(--ink);
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1 { font-size: 1.5rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
.tagline { color: var(--muted); margin: 0 0 2rem; }

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--panel);
}

.share { word-break: break-all; font-family: ui-monospace, monospace; font-size: .875rem; }

button {
  font: inherit;
  padding: .5rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
button:disabled { opacity: .45; cursor: default; }

/* The connection badge is the honest answer to "who can see this?", so it is
   the most prominent live element on the page. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .875rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.badge.direct { color: var(--direct); }
.badge.relay { color: var(--relay); }
.badge.pending { color: var(--muted); }
.badge::before {
  content: '';
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: currentColor;
}

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 2.5rem 1.25rem;
  text-align: center;
  transition: border-color .12s, background .12s;
}
.dropzone.over { border-color: var(--ink); background: var(--panel); }
.dropzone.armed { border-style: solid; }
.drop-headline { font-size: 1.05rem; font-weight: 600; margin: 0 0 .25rem; word-break: break-all; }
.drop-sub { color: var(--muted); margin: 0; font-size: .9rem; }

/* A text-styled button: keyboard reachable and announced as a button, without
   looking like the primary action. */
.linky {
  background: none; border: none; padding: 0;
  color: inherit; text-decoration: underline; cursor: pointer; font: inherit;
}

.options { display: grid; gap: .6rem; }
.options label { display: block; }
.hint { color: var(--muted); font-size: .85rem; font-weight: 400; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: .75rem 0 0; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  padding: .875rem 1.125rem;
  font-size: .9rem;
  margin: 1.25rem 0;
}
.notice strong { display: block; margin-bottom: .25rem; }

progress { width: 100%; height: .5rem; }

pre {
  background: #f4f4f5;
  border-radius: 6px;
  padding: .75rem;
  overflow-x: auto;
  font-size: 12px;
  color: var(--muted);
  max-height: 11rem;
}

footer { margin-top: 2.5rem; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }
a { color: inherit; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f4f5; --muted: #a1a1aa; --line: #3f3f46; --panel: #1c1c1f;
    --direct: #4ade80; --relay: #fbbf24; --warn-bg: #292014; --warn-line: #78350f;
  }
  body { background: #131316; }
  button { background: var(--ink); color: #18181b; }
  pre { background: #1c1c1f; }
}
