* {
  box-sizing: border-box;
}

input {
  field-sizing: content;
  min-inline-size: 50px;
}

textarea {
  width: 100%;
  field-sizing: content;

  /* if we just used `height` it would win over `field-sizing` */
  min-height: 4lh;
  /* I think `rows` is nicer generally, but field-sizing wipes it out. */
}

/* This would be required to make a <div> act like a <textarea> with field sizing */
[contenteditable] {
  white-space: pre-wrap;
  font-family: monospace;
  resize: both;
  overflow: hidden;
  &, textarea {
    border: 1px solid black;
    padding: 0.5rem;
  }
}


.name-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-end: 1rem;
  input[type="text"] {
    min-width: 100%;
  }
  label {
    white-space: nowrap;
  }
  > *:not([class="middle"]) {
    flex: 1;
  }
}
.middle {
  min-width: 50px;
}

body {
  margin: 0;
  padding: 1.5rem;
  font: 100% system-ui;
}
