:root {
  color-scheme: light;
  font-family: Tahoma, 'Segoe UI', system-ui, sans-serif;
  color: #192c29;
  background: #f0f5f3;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(1rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse at 78% 0%, #dfede7, transparent 60%), #f0f5f3;
}

.layout {
  width: min(100%, 30rem);
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-block-end: 1.05rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #22473e;
  letter-spacing: 0.015em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: #235a49;
}

.brand-mark::after {
  content: '';
  width: 0.78rem;
  height: 0.95rem;
  border: 2px solid #fff;
  border-radius: 0.17rem 0.17rem 0 0;
  border-block-end-width: 4px;
}

.panel {
  border: 1px solid #d4e2dc;
  border-radius: 1.25rem;
  padding: clamp(1.15rem, 5vw, 2.25rem);
  background: #fff;
  box-shadow: 0 1rem 3.25rem #24443a12;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.35;
}

h2 {
  font-size: 1.15rem;
}

.instructions {
  margin-block: 0.55rem 1.65rem;
  color: #4a6059;
}

form,
.code-field {
  display: grid;
}

label {
  font-size: 0.94rem;
  font-weight: 700;
  margin-block-end: 0.35rem;
}

input,
button {
  font: inherit;
  min-height: 2.85rem;
  border-radius: 0.65rem;
}

.language {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid #b6cbc1;
  border-radius: 0.75rem;
  background: #f5faf8;
}

.language button {
  min-height: 2.75rem;
  padding-inline: 0.55rem;
  color: #235a49;
  background: transparent;
  font-size: 0.86rem;
}

.language button:hover {
  background: #e7f3ee;
}

.language button[aria-pressed='true'] {
  color: #fff;
  background: #235a49;
}

input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid #aabeb5;
  color: #192c29;
  background: #fff;
  font-size: 1rem;
}

.code-field {
  margin-block-start: 0.9rem;
}

button {
  border: 1px solid transparent;
  padding: 0.48rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid #247967;
  outline-offset: 3px;
}

.primary {
  margin-block-start: 1.2rem;
  color: #fff;
  background: #235a49;
}

.primary:hover:enabled {
  background: #194739;
}

.secondary {
  border-color: #b6cbc1;
  color: #235a49;
  background: #f5faf8;
}

.secondary:hover:enabled {
  background: #e7f3ee;
}
form .secondary {
  margin-block-start: 0.55rem;
}

.link {
  justify-self: start;
  color: #235a49;
  background: transparent;
  padding-inline: 0.15rem;
  text-decoration: underline;
  text-underline-offset: 0.24em;
}

form .link {
  margin-block-start: 0.4rem;
}
.link:hover:enabled {
  color: #12372c;
}

.recovery {
  margin-block: 1.4rem 0.75rem;
  padding-block-end: 1.15rem;
  border-block-end: 1px solid #dfebe5;
}

.recovery > p {
  margin-block: 0.35rem 0.8rem;
  color: #4a6059;
}

.issued {
  margin-block-start: 0.85rem;
  padding: 0.75rem;
  border-radius: 0.65rem;
  background: #edf6f1;
}

.issued ul {
  display: grid;
  gap: 0.22rem;
  padding: 0;
  margin: 0.55rem 0 0.15rem;
  list-style: none;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.notice {
  margin-block-start: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-inline-start: 3px solid #36806a;
  border-radius: 0.35rem;
  color: #264f3f;
  background: #edf6f1;
}

.notice:empty {
  margin: 0;
  padding: 0;
  border: 0;
}

.notice[data-kind='error'] {
  border-color: #ae4034;
  color: #782c23;
  background: #fff0ee;
}

@media (max-width: 34rem) {
  body {
    align-items: start;
    padding-block-start: clamp(2rem, 9vh, 4rem);
  }
}
