.compteur-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20ch, 25ch);
  gap: 3ch;
  align-items: start;
}

.compteur-text-field {
  display: block;
  margin: 0;
}

.compteur-text-field label {
  display: block;
}

.compteur-text-field textarea {
  display: block;
  width: 100%;
  min-height: 12lh;
  max-height: 60vh;
  overflow-y: auto;
}

.compteur-results {
  position: sticky;
  top: 1lh;
  padding-top: 1lh;
}

.compteur-row {
  display: grid;
  grid-template-columns: 14ch minmax(0, 1fr);
  gap: 1ch;
}

.compteur-settings {
  display: flex;
  align-items: baseline;
  gap: 1ch;
  margin-top: 2lh;
}

.compteur-settings .kit-field {
  display: contents;
}

.compteur-settings input {
  width: 10ch;
}

.compteur-settings select {
  width: auto;
}

.compteur-settings label:not(:first-child) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.compteur-limit-result {
  min-height: 1lh;
  overflow-wrap: anywhere;
}

.compteur-repetitions {
  margin: 2lh 0;
}

.compteur-heading {
  margin-bottom: 0.5lh;
}

.compteur-repeat-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 599px) {
  .compteur-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1lh;
  }

  .compteur-results {
    position: static;
    padding-top: 0;
  }

  .compteur-settings {
    display: block;
  }

  .compteur-settings .kit-field {
    display: grid;
  }

  .compteur-settings input,
  .compteur-settings select {
    width: 100%;
  }

  .compteur-settings label:not(:first-child) {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
}
