* {
  box-sizing: border-box;
}

body {
  display: grid;
  min-height: 100vh;
  margin: 0;
  padding: 2rem;
  place-items: center;
  font-family: Arial, sans-serif;
  background-color: #f3f4f6;
  color: #1f2937;
}

main {
  width: min(500px, 100%);
  padding: 2rem;
  border-radius: 1rem;
  background-color: #fff;
  box-shadow: 0 10px 30px rgb(0 0 0 / 10%);
}

h1 {
  margin-top: 0;
  text-align: center;
}

form {
  display: grid;
  gap: 1.5rem;
}

.form-control {
  display: grid;
  gap: 0.5rem;
}

label,
legend {
  font-weight: bold;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #9ca3af;
  border-radius: 0.5rem;
  font: inherit;
}

fieldset {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
  border: 2px solid #9ca3af;
  border-radius: 0.5rem;
}

fieldset label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
}

.button-row {
  display: flex;
  gap: 1rem;
}

button {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

button[type="submit"] {
  background-color: #2563eb;
  color: #fff;
}

button[type="button"] {
  background-color: #e5e7eb;
  color: #1f2937;
}

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