legend {
  text-align: center;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  width: 100%;
}

.screenreader {
  position: absolute !important; /* Outside the DOM flow */
  height: 1px; width: 1px; /* Nearly collapsed */
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE 7+ only support clip without commas */
  clip: rect(1px, 1px, 1px, 1px); /* All other browsers */
}

div.error-message {
  text-align: center;
}

ul.error-list {
  margin: 10px 0px 20px;
  padding: 0;
}

ul.error-list li {
  list-style-type: none;
}

ul.error-list a {
  text-decoration: none;
  color: #a70000;
  list-style-type: none;
  margin: 5px 0 5px;
  text-align: center;
  line-height: 1.4;
  padding: 10px 80px;
  display: block;
  border: 1px dashed #ff8a8a;
  width: 80%;
  margin: 0 auto;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #fff4f4;
  box-sizing: border-box;
  position: relative;
  /* outline: chartreuse; */
  /* outline-style: dotted; */
}

ul.error-list a span {
  display: block;
  font-weight: bold;
  color: #a70000;
}

body {
  counter-reset: section;
}

ul.error-list a::before {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translate(0, -50%);
  counter-increment: section;
  content: "Error " counter(section) ": ";
}

.form-required {
    color: #a70000;
}

@media screen and (max-width: 640px) {
  ul.error-list a {
    width: 100%;
    padding: 42px 10px 10px;
  }

  ul.error-list a::before {
  top: 12px;
  left: 50%;
  transform: translate(-50%, 0);
  margin: 0;
  }
}
