:root {
  color-scheme: light;
  --paper: #f3f4f7;
  --surface: #ffffff;
  --ink: #1a1d24;
  --ink-muted: #5b6270;
  --rule: #dcdfe6;
  --accent: #5a3fcf;
  --accent-ink: #ffffff;
  --series: #2a78d6;
  --good: #1b7744;
  --bad: #b3373a;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #13151a;
    --surface: #1b1e25;
    --ink: #e6e8ed;
    --ink-muted: #a0a6b2;
    --rule: #2b3039;
    --accent: #a593f7;
    --accent-ink: #13151a;
    --series: #3987e5;
    --good: #5cc38a;
    --bad: #f08080;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.75rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.bar .name {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.bar nav {
  display: flex;
  gap: 1.25rem;
}

.bar nav a,
.filters a,
.pages a {
  color: var(--ink-muted);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}

.bar nav a[aria-current="page"],
.filters a[aria-current="page"],
.pages a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.relays-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin: 0.5rem 0 0.9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.find {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.find input {
  width: 15rem;
  min-width: 0;
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
}

.find a {
  font-size: 0.9rem;
}

.filters .count {
  color: var(--ink-muted);
  font-size: 0.85em;
}

.pages {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0.75rem 0 1rem;
}

.pages a {
  min-width: 1.5rem;
  text-align: center;
}

.pages span {
  color: var(--ink-muted);
}

.pages .range {
  margin-left: auto;
  font-size: 0.85rem;
}

.bar form {
  margin-left: auto;
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) 4rem;
}

h1 {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 2.75rem 0 0.35rem;
}

.headline {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.lede {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.1rem;
}

.note {
  max-width: 72ch;
  margin: 0 0 1rem;
  color: var(--ink-muted);
}

.muted {
  color: var(--ink-muted);
  font-size: 0.85em;
}

.url {
  overflow-wrap: anywhere;
}

td.url {
  min-width: 14rem;
}

.nowrap {
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  padding: 0 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

th,
td {
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

.num {
  text-align: right;
}


details {
  margin-top: 0.75rem;
}

summary {
  color: var(--accent);
  cursor: pointer;
}

.rules {
  max-width: 72ch;
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--ink-muted);
}

.rules li + li {
  margin-top: 0.35rem;
}

button {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  border-color: var(--ink-muted);
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

button.primary {
  padding: 0.6rem 1.1rem;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1rem;
  font-weight: 600;
}

button.quiet {
  border: none;
  background: none;
  color: var(--ink-muted);
  padding: 0;
  font-size: 0.95rem;
}

button.quiet:hover {
  color: var(--ink);
}

input {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.45rem 0.6rem;
}

.settings {
  max-width: 62ch;
}

.field {
  margin-bottom: 1.75rem;
}

.field label {
  display: block;
  font-weight: 600;
}

.help {
  margin: 0.15rem 0 0.5rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.error {
  margin: 0.4rem 0 0;
  color: var(--bad);
  font-size: 0.9rem;
}

.signin {
  max-width: 34rem;
  margin: 12vh auto 0;
}

.signin h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  letter-spacing: -0.02em;
}

.signin p {
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.sign-in-status {
  min-height: 1.5em;
}







.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 40rem) {
  .bar form {
    margin-left: 0;
  }

  td.url {
    min-width: 10rem;
  }
}

body.public main {
  max-width: 880px;
}

h3 {
  font-size: 0.95rem;
  font-weight: 650;
  margin: 1.5rem 0 0.5rem;
}

.lookup {
  margin: clamp(1.5rem, 8vh, 5rem) 0 1rem;
}

.lookup h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.lookup .lede {
  margin-bottom: 1.5rem;
}

.search {
  display: flex;
  gap: 0.5rem;
  max-width: 40rem;
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  font-size: 1.1rem;
}

.search.compact {
  margin-bottom: 0.25rem;
}

.search.compact input {
  padding: 0.5rem 0.7rem;
  font-size: 1rem;
}

.search.compact button {
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
}

.search-status {
  min-height: 1.5em;
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
}

.search-status.error {
  color: var(--bad);
}

.copy {
  display: flex;
  gap: 0.5rem;
  max-width: 34rem;
}

.copy input {
  flex: 1;
  min-width: 0;
}

.copy button {
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem;
}

.pubkey {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.pubkey + .muted {
  margin: 0.15rem 0 1.25rem;
}

.table-scroll + .note {
  margin-top: 0.75rem;
}


.event {
  overflow-x: auto;
  margin: 0.5rem 0 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 0.8rem;
}

.field label.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary form {
  margin-top: 0.5rem;
}

.status {
  font-weight: 600;
}

.status.good {
  color: var(--good);
}

.status.bad {
  color: var(--bad);
}

.detail {
  display: block;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.detail.failure {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

td.actions {
  width: 1%;
  padding-right: 0;
  text-align: right;
}

td.hash {
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  white-space: nowrap;
}

textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.45rem 0.6rem;
}

@media (max-width: 40rem) {
  table.relays thead {
    display: none;
  }

  table.relays tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rule);
  }

  table.relays tbody tr:last-child {
    border-bottom: none;
  }

  table.relays td {
    display: block;
    min-width: 0;
    padding: 0;
    border: none;
  }

  table.relays td.url {
    font-weight: 600;
  }

  table.relays td.state {
    grid-column: 1 / -1;
  }

  table.relays td.actions {
    grid-column: 2;
    grid-row: 1;
  }

  .find {
    flex-basis: 100%;
  }

  .find input {
    flex: 1;
    width: auto;
  }

  .pages {
    column-gap: 0.5rem;
  }

  .pages .label {
    display: none;
  }

  .pages .range {
    flex-basis: 100%;
    margin-left: 0;
  }
}
