* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #fff;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 28px 20px;
  color: #000;
  font: 14px/1.4 Arial, sans-serif;
}

form,
#success {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.line {
  display: flex;
  align-items: flex-end;
  height: 42px;
  padding-bottom: 7px;
  border-bottom: 2px solid #e6eaef;
  transition: border-color 0.3s;
}

.line input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: #000;
  font: inherit;
}

.line input::placeholder {
  color: #aeb8c4;
  opacity: 1;
}

/* A cross-origin frame has no height of its own, so its container needs one. */
.line > div {
  width: 100%;
  height: 22px;
}

.line.is-focused {
  border-bottom-color: #30b280;
}

.line.is-invalid {
  border-bottom-color: #ff0000;
}

.line.is-invalid input {
  color: #ff0000;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

button {
  width: 100%;
  height: 42px;
  margin-top: 26px;
  border: 0;
  border-radius: 4px;
  background: #00c07d;
  color: #fff;
  font: 600 14px 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

button:hover:enabled {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

button:disabled {
  opacity: 0.65;
  cursor: default;
}

/* Below the button, so a message doesn't move the centred form. */
#error {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin: 10px 0 0;
  color: #ff0000;
  text-align: center;
}

#success {
  padding: 18px;
  border-radius: 4px;
  background: #30b280;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#success h1 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

#success dl {
  margin: 0;
}

#success dl div {
  display: flex;
  align-items: center;
  height: 36px;
  border-bottom: 1px solid #fff;
}

#success dt {
  flex: 0 0 56px;
  font-weight: 600;
}

#success dd {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#again {
  margin-top: 16px;
  background: #fff;
  color: #30b280;
}
