In css-tricks they have this article about auto-growing inputs:
https://css-tricks.com/auto-growing-inputs-textareas/
The one i like has just a line of JS. I know you said 0 JS, but you dont have many options i think, and it's nothing to complicated.
label {
display: inline-grid;
}
label::after {
content: attr(data-value) ' ';
visibility: hidden;
white-space: pre-wrap;
}
<label>
<input type="text" name="" value="" oninput="this.parentNode.dataset.value = this.value" size="1">
</label>