/* The signed-in screens. Same colours and type as the public register; wider, with forms and tables. */
.app main, .app .top, .whoami { max-width: 68rem; }
.app .top nav a[aria-current="page"] { font-weight: 700; text-decoration-thickness: 2px; }
.whoami { margin: 0 auto; padding: 0.5rem 1.25rem 0; display: flex; gap: 1.25rem; justify-content: flex-end; align-items: baseline; font-size: 0.9rem; color: var(--soft); }
.narrow { max-width: 30rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: center; margin: 1.25rem 0; }
.actions form { margin: 0; }
.app button, .app .button { padding: 0.65rem 1.1rem; }
.quiet, button.quiet { background: transparent; color: var(--ink); }
.quiet:hover, button.quiet:hover { background: var(--sheet); color: var(--ink); border-color: var(--ink); }
button.danger { background: var(--bad); border-color: var(--bad); color: var(--sheet); }
button.danger:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
button.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
button.linkish:hover { background: none; color: var(--ink); }
button.danger-text { color: var(--bad); }

.notice, .error, .once { border: 1px solid var(--rule); border-left-width: 6px; border-radius: 4px; padding: 0.75rem 1rem; margin: 0 0 1.5rem; }
.notice { background: var(--good-bg); border-color: var(--good); color: var(--good); font-weight: 600; }
.error { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); font-weight: 600; }
.once { background: var(--wait-bg); border-color: var(--wait); }
.once p { margin-bottom: 0.5rem; }
.once input { width: 100%; }

.form { max-width: 40rem; }
.field { margin-bottom: 1.15rem; }
.field.short { max-width: 14rem; }
.field label, .filter label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.optional { font-weight: 400; color: var(--soft); font-size: 0.9rem; }
.app input:not([type="checkbox"]):not([type="hidden"]), .app textarea, .app select {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--soft);
  border-radius: 6px;
}
.app input.code, .app textarea.code { font-family: var(--mono); font-size: 0.95em; }
.app textarea { resize: vertical; line-height: 1.45; }
.app textarea:focus-visible, .app select:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.hint { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--soft); }
.check-line { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; margin: 0 0 0.4rem; }
.check-line input { width: 1.15rem; height: 1.15rem; margin-top: 0.25rem; accent-color: var(--brand); }
.check-line + .hint { margin: 0 0 1.15rem 1.75rem; }
.check-line + button { margin-top: 0.9rem; }
.form.inline, .filter { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; max-width: none; }
.form.inline .field, .filter .field { margin: 0; flex: 1 1 14rem; }
.filter { margin: 1.25rem 0 1.5rem; }

.scroll { overflow-x: auto; }
.list { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.list th { text-align: left; font-weight: 600; color: var(--soft); font-size: 0.85rem; padding: 0.5rem 0.9rem 0.5rem 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.list td { padding: 0.65rem 0.9rem 0.65rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; }
.list .older td { color: var(--soft); }
.list form { margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.state-word { font-weight: 600; }
.state-active { color: var(--good); }
.state-draft { color: var(--wait); }
.state-retired, .state-revoked, .state-withdrawn { color: var(--bad); }
.pager { display: flex; gap: 1.5rem; margin-top: 1rem; }
.sample-file { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 0.75rem 1rem; overflow-x: auto; font: 0.88rem/1.5 var(--mono); }
.app .pairs { margin: 1.25rem 0; }

/* On a phone a table becomes a list: one block per row, first cell as its heading. */
@media (max-width: 42rem) {
  .list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .list, .list tbody { display: block; }
  .list tr { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  .list td { display: block; padding: 0.1rem 0; border: 0; }
  .list td:first-child { font-weight: 600; }
  .list td:empty { display: none; }
  .list .num { text-align: left; }
  .list td[data-label]::before { content: attr(data-label) ": "; color: var(--soft); }
  .whoami { justify-content: flex-start; }
}

/* The holder's own pages. */
.signout { margin: 0; }
.holding { border-top: 1px solid var(--rule); padding-top: 1.5rem; margin-top: 2rem; }
.holding h2 { margin-top: 0; }
.holding details { margin-top: 1rem; }
.holding summary { cursor: pointer; color: var(--bad); }
.holding details[open] summary { margin-bottom: 0.75rem; }
.art { width: 168px; height: 168px; object-fit: contain; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; }
