* {
  box-sizing: border-box;
}

body {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

header {
  margin-bottom: 2rem;
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid;
}

section:last-of-type {
  border-bottom: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  max-width: 28rem;
}

.field label {
  font-size: 0.9rem;
}

.field input[type="text"],
.field input[type="number"],
.field select {
  padding: 0.4rem 0.5rem;
  font: inherit;
}

.field input[type="file"] {
  font: inherit;
}

#file-name {
  font-size: 0.85rem;
}

button {
  padding: 0.5rem 1rem;
  font: inherit;
  cursor: pointer;
}

#status {
  margin-left: 0.75rem;
  font-size: 0.9rem;
}

#status[data-state="error"] {
  font-weight: bold;
}

#stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
}

#stats .stat {
  min-width: 8rem;
}

#stats dt {
  font-size: 0.8rem;
}

#stats dd {
  margin: 0;
  font-size: 1.3rem;
}

.output-block {
  margin-bottom: 1.75rem;
}

.output-block p {
  font-size: 0.9rem;
  max-width: 38rem;
}

textarea#give-output {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  padding: 0.6rem;
  resize: vertical;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

#give-length {
  font-size: 0.85rem;
}

#give-length[data-warn="true"] {
  font-weight: bold;
}

#about ul {
  padding-left: 1.2rem;
}

#about li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

footer {
  font-size: 0.8rem;
}
