:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #121416;
  color: #f4f1eb;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 8vw, 5rem);
  background: radial-gradient(ellipse at 80% 15%, #222018 0%, #121416 56%);
}

main {
  width: min(100%, 36rem);
  padding: clamp(1.75rem, 6vw, 3.5rem);
  border: 1px solid #353a40;
  border-radius: 1rem;
  background: #181b1e;
}

.brand, .networks {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 600;
}

.mark {
  width: .85rem;
  height: .85rem;
  border: 2px double #feb94f;
  border-radius: .2rem;
  transform: rotate(-18deg);
}

h1 {
  max-width: 14ch;
  margin: 2rem 0 .8rem;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -.045em;
}

p {
  max-width: 36ch;
  margin: 0;
  color: #bdc5d0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.networks { flex-wrap: wrap; margin: 1.55rem 0 2rem; }

.networks span {
  padding: .35rem .75rem;
  border: 1px solid #3c4045;
  border-radius: 2rem;
  color: #f4f1eb;
  font-size: .9rem;
}

.explorer {
  display: inline-block;
  padding: .75rem 1.1rem;
  border-radius: .5rem;
  background: #f8ba55;
  color: #17130e;
  font-weight: 700;
  text-decoration: none;
}

.explorer:hover { background: #ffce83; }
.explorer:focus-visible { outline: 2px solid #ffce83; outline-offset: .3rem; }

.sign-in-form {
  display: grid;
  gap: .5rem;
  margin-top: 1.5rem;
}

.sign-in-form label { font-weight: 600; }

.sign-in-form input {
  width: 100%;
  margin-bottom: .6rem;
  padding: .65rem .75rem;
  border: 1px solid #818890;
  border-radius: .4rem;
  background: #121416;
  color: #f4f1eb;
  font: inherit;
}

.sign-in-form button, .sign-out-form button {
  justify-self: start;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.sign-in-form button { font-weight: 700; }

.sign-out-form button {
  margin-top: 1rem;
  padding: .3rem 0;
  background: transparent;
  color: #bdc5d0;
  text-decoration: underline;
}

.sign-in-form :focus-visible, .sign-out-form :focus-visible {
  outline: 2px solid #ffce83;
  outline-offset: .2rem;
}

.enrollment { padding: clamp(.75rem, 5vw, 3rem); }
.enrollment [hidden] { display: none !important; }
.enrollment main { padding: clamp(1rem, 5vw, 2.5rem); }
.enrollment h1 { max-width: 18ch; margin-top: 1.45rem; }
.enrollment h2 { margin: 0 0 .25rem; font-size: 1.25rem; line-height: 1.3; }
.enrollment h2:focus { outline: none; }
.enrollment p { max-width: 44ch; font-size: 1rem; }
.enrollment section { display: grid; gap: .65rem; }
.enrollment .sign-in-form { margin-top: 0; }
.enrollment .sign-in-form label { margin-top: .3rem; }
.enrollment .sign-in-form input { margin-bottom: .35rem; }
.enrollment .sign-in-form input[aria-invalid="true"] { border-color: #f5a6a0; }
.enrollment .explorer { width: fit-content; min-height: 2.75rem; }
.enrollment button:disabled { cursor: wait; opacity: .67; }
.enrollment-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .46rem;
  list-style: none;
  margin: 1.35rem 0;
  padding: 0;
}
.enrollment-progress li {
  min-width: 0;
  padding: .45rem 0 0;
  overflow-wrap: anywhere;
  border-top: .18rem solid #41464d;
  color: #bdc5d0;
  font-size: clamp(.78rem, 2.8vw, .94rem);
}
.enrollment-progress li[data-state="complete"] { border-color: #83dab1; }
.enrollment-progress li[data-state="current"] { border-color: #f8ba55; color: #ffcc82; font-weight: 700; }
.enrollment .enrollment-account { margin-bottom: .9rem; overflow-wrap: anywhere; }
.enrollment-account strong { margin-left: .3rem; color: #f4f1eb; }
.enrollment-qr {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-top: .4rem;
  border-radius: .3rem;
  image-rendering: pixelated;
}
.enrollment-key {
  display: grid;
  gap: .35rem;
  min-width: 0;
  margin: .3rem 0;
  padding: .75rem;
  border: 1px solid #41464d;
  border-radius: .45rem;
  background: #121416;
}
.enrollment-key code { overflow-wrap: anywhere; font-size: 1rem; user-select: all; }
.enrollment-key-label { font-weight: 600; }
.enrollment-copy-message { color: #bdc5d0; font-size: .9rem; }
.enrollment-secondary {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  min-height: 2.75rem;
  padding: .35rem 0;
  border: 0;
  background: none;
  color: #d4dbe4;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: underline;
}
.enrollment-secondary:hover { color: #ffcc82; }
.enrollment-secondary:focus-visible { outline: 2px solid #ffce83; outline-offset: .2rem; }
.enrollment-exit { margin-top: .8rem; }
.enrollment .enrollment-error {
  margin-top: .85rem;
  padding: .55rem .7rem;
  border: 1px solid #844747;
  border-radius: .4rem;
  background: #302022;
  color: #fbd0cd;
}
