.scientific-form .row {
    row-gap: 0.75rem;
}

.scientific-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.scientific-form .form-group > label {
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.scientific-form .row.align-inputs > .form-group > label {
    min-height: 2.1rem;
}
/* Ensure columns inside align-inputs rows start at the same top baseline */
.scientific-form .row.align-inputs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* Keep form-group layout vertical but ensure inputs align across the row */
.scientific-form .row.align-inputs > .form-group {
    display: flex;
    flex-direction: column;
}

.scientific-form .form-text.help-example {
    margin-bottom: 0.25rem;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.2;
}

/* Ensure inputs start at the top of their column */
.scientific-form .row.align-inputs > .form-group > .form-control {
    margin-top: 0;
}

/* Keep labels and help text in the normal flow but make all
   labels reserve enough vertical space so inputs start at the
   same Y across columns. This avoids absolute positioning and
   prevents overlapping. */
.scientific-form .row.align-inputs > .form-group > label {
    min-height: 2.9rem; /* room for label + one small help line */
    margin-bottom: 0.15rem;
    line-height: 1.2;
    font-weight: 600;
}

.scientific-form .row.align-inputs > .form-group > .form-text.help-example {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.15;
}
