/* The agora's pages, in the plain style of the indexer's and the smith's:
   readable at any width, legible in either color scheme, no framework. */
body {
  font-family: system-ui, sans-serif;
  margin: 2rem auto;
  max-width: 48rem;
  padding: 0 1rem;
  color: #222;
  background: #fff;
  line-height: 1.5;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; margin-top: 2rem; }
.lead { color: #444; }

/* Hex keys and hashes never wrap mid-value; a narrow screen scrolls the value
   cell instead of widening the page. */
dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; }
dt { font-weight: 600; }
dd { margin: 0; min-width: 0; overflow-x: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; white-space: nowrap; }

.qr { width: min(260px, 70vw); margin: 1rem 0; }
.qr svg { width: 100%; height: auto; background: #fff; padding: .4rem; border-radius: .35rem; }
.url { font-size: .85rem; word-break: break-all; }

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f6f6f6;
  padding: .8rem;
  border-radius: .35rem;
  font-size: .9rem;
}
img { max-width: 100%; height: auto; border-radius: .35rem; }

.kind { border-left: 3px solid #3b82f6; padding-left: .8rem; }
.muted { color: #666; font-size: .9rem; }
.problem { color: #b00020; font-weight: 600; }
.done { color: #0a7c2f; font-weight: 600; }

ol.signatures, ul.documents { list-style: none; margin: 0; padding: 0; }
ol.signatures li, ul.documents li { padding: .4rem 0; border-top: 1px solid #e3e3e3; }
ul.documents li { display: flex; flex-wrap: wrap; gap: .6rem; align-items: baseline; }

form.upload { display: flex; flex-direction: column; gap: .7rem; max-width: 32rem; }
form.upload label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
form.inline { display: inline; }
input, select, button {
  font: inherit;
  padding: .4rem .55rem;
  border: 1px solid #bbb;
  border-radius: .35rem;
  background: inherit;
  color: inherit;
}
button { cursor: pointer; }

footer { margin-top: 2.5rem; font-size: .85rem; color: #666; }
a { color: inherit; }

@media (prefers-color-scheme: dark) {
  body { background: #111; color: #ddd; }
  .lead { color: #bbb; }
  pre { background: #1c1c1c; }
  .muted, footer { color: #999; }
  .problem { color: #ff6b6b; }
  .done { color: #4ade80; }
  ol.signatures li, ul.documents li { border-top-color: #333; }
  input, select, button { border-color: #444; }
}

/* A citizen shown as a person rather than 64 hex characters: a small avatar and
   their name, linking to their page on the indexer — where a reader checks the
   claim against the chain rather than against this service. The identity
   picture is published on chain at up to MAX_PICTURE_BYTES and displayed
   small; the browser scales it, this service never re-encodes it. */
.citizen {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  min-width: 0;
}

.citizen:hover .citizen-name { text-decoration: underline; }

.citizen-avatar {
  flex: none;
  border-radius: .3rem;
  object-fit: cover;
  background: #ddd;
}

.citizen-avatar-empty { display: inline-block; }

.citizen-name { min-width: 0; overflow-wrap: anywhere; }

.signed-in { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

/* One signature per row, the number from the <ol> kept beside the avatar. */
ol.signatures li { padding: .35rem 0; }

.pagination { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }

@media (prefers-color-scheme: dark) {
  .citizen-avatar { background: #333; }
}
