:root {
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#202124;
  background:#f5f5f7;
  color-scheme:light dark;
  --surface:#fff;
  --line:#e4e4e8;
  --muted:#68686e;
  --button:#252528;
  --button-text:#fff
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  min-height:100svh;
  display:grid;
  place-items:center;
  padding:40px 20px
}

main {
  width:100%;
  max-width:420px
}

.brand {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:inherit;
  text-decoration:none;
  font-size:20px;
  font-weight:650;
  letter-spacing:-.6px;
  margin-bottom:32px
}

.brand span {
  font-size:24px;
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--line)
}

section {
  background:var(--surface);
  padding:30px;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:0 12px 40px #00000005
}

h1 {
  font-size:26px;
  font-weight:650;
  letter-spacing:-.8px;
  line-height:1.2;
  margin:0 0 12px
}

h2 {
  font-size:17px;
  font-weight:600;
  margin:26px 0 8px
}

p {
  line-height:1.5
}

.intro {
  color:var(--muted);
  margin:0 0 24px;
  font-size:15px
}

.caption {
  font-size:13px;
  color:var(--muted);
  margin:10px 0
}

.methods {
  display:grid;
  gap:10px
}

button,input {
  font:inherit;
  width:100%;
  min-height:46px;
  border-radius:12px
}

button {
  border:1px solid transparent;
  background:var(--button);
  color:var(--button-text);
  padding:12px 14px;
  font-size:14px;
  font-weight:600;
  cursor:pointer
}

button.secondary {
  color:inherit;
  background:transparent;
  border-color:var(--line)
}

button.quiet {
  color:var(--muted);
  background:transparent;
  font-weight:450;
  margin-top:8px
}

button:hover {
  filter:brightness(.92)
}

button:disabled {
  opacity:.5;
  cursor:wait
}

button:focus-visible,input:focus-visible,a:focus-visible {
  outline:3px solid #5983eb;
  outline-offset:3px
}

input {
  color:inherit;
  background:transparent;
  border:1px solid var(--line);
  padding:12px;
  margin:8px 0 12px;
  font-size:16px
}

label {
  font-size:13px;
  font-weight:550;
  display:block
}

form {
  margin-top:20px
}

#code,#current-code,#recovery-code {
  letter-spacing:6px
}

.divider {
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--muted);
  font-size:12px;
  margin-bottom:20px
}

.divider:before,.divider:after {
  content:"";
  height:1px;
  flex:1;
  background:var(--line)
}

#legacy-hint {
  margin-top:24px
}

#message {
  font-size:14px;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:12px;
  padding:12px 14px;
  overflow-wrap:anywhere
}

#message[data-error=true] {
  color:#ba3434
}

footer {
  text-align:center;
  font-size:12px;
  color:var(--muted);
  line-height:1.5;
  margin:24px 16px 0
}

ul {
  list-style:none;
  padding:0;
  margin:12px 0
}

li {
  font-size:14px;
  padding:10px 0;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px
}

li button {
  width:auto;
  min-height:36px;
  padding:6px 10px;
  font-size:12px
}

[hidden] {
  display:none!important
}

@media(prefers-color-scheme:dark) {
  :root {
    color:#f1f1f3;
    background:#171719;
    --surface:#232326;
    --line:#39393d;
    --muted:#a6a6ae;
    --button:#f1f1f3;
    --button-text:#202124
  }
  #message[data-error=true] {
    color:#ff9797
  }
}

@media(max-width:420px) {
  body {
    padding:24px 16px
  }
  section {
    padding:24px
  }
  .brand {
    margin-bottom:24px
  }
  h1 {
    font-size:25px
  }
}

@media(prefers-reduced-motion:no-preference) {
  button {
    transition:filter .12s ease
  }
}
