/*
 * The account page's own additions.
 *
 * A second sheet rather than edits to hosted.css, which is shared with the
 * sign-in, sign-up, reset and verify screens: this page needs a heading level,
 * a code block and a list of recovery codes that none of those has, and adding
 * them there would restyle four pages that were finished. The variables and
 * the card come from hosted.css, so both are linked.
 */

h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* The first heading sits under the card's own title, so it needs no gap. */
section > h2:first-child {
  margin-top: 0;
}

.lede {
  color: var(--muted);
  margin: 0.25rem 0 0;
}

/*
 * The enrolment key. Monospace and breakable: it is a base32 string somebody
 * is copying by hand onto a phone, and one that overflows its card silently
 * loses its last characters — which reads as a key that simply does not work.
 */
code {
  display: inline-block;
  padding: 0.5rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/*
 * Recovery codes. Two columns where there is room, one on a phone — these get
 * screenshotted and written down, so they are set larger than body text and
 * with tabular figures so the columns line up.
 */
.codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.4rem 1rem;
  margin: 0.75rem 0 1.25rem;
  padding: 0.9rem;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* A quieter button, for the action that undoes something rather than does it. */
button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

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

button.danger {
  background: var(--danger);
  color: #fff;
  border: none;
}
