* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #111;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

main {
  max-width: 820px;
  margin: 48px auto;
  padding: 0 20px 80px;
}

section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #bbb;
}

main > section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

h1 {
  margin: 0 0 16px;
  font-size: 40px;
  line-height: 1.2;
}

p {
  margin: 0 0 16px;
}

form,
.result {
  padding: 20px;
  border: 1px solid #999;
}

.result {
  margin-top: 20px;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 5px;
  font-weight: bold;
}

form > label:first-child {
  margin-top: 0;
}

select,
textarea,
input[type="number"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #888;
  background: #fff;
}

textarea {
  resize: vertical;
}

input[type="range"] {
  width: 100%;
}

.range-labels,
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-labels,
.small {
  font-size: 14px;
}

.result-heading {
  justify-content: flex-end;
}

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

button {
  margin-top: 20px;
  padding: 9px 14px;
  border: 1px solid #777;
  border-radius: 2px;
  background: #eee;
  color: #111;
  cursor: pointer;
}

button:hover {
  background: #ddd;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2457d6;
  outline-offset: 2px;
}

.result-heading button {
  margin: 0;
}

blockquote {
  margin: 16px 0;
  padding: 20px;
  overflow-wrap: anywhere;
  border: 1px solid #bbb;
  background: #fafafa;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

@media (max-width: 600px) {
  main {
    margin-top: 24px;
  }

  .two-columns {
    grid-template-columns: 1fr;
  }
}
