/* Share label/control/feedback tracks across each visual row. A long label or
   validation message grows its own track instead of displacing nearby inputs. */
@supports(grid-template-rows:subgrid){
  body .form-aligned{
    --aligned-control-height:40px;
    row-gap:8px!important;
    grid-auto-flow:row;
    align-items:stretch;
  }
  body .form-aligned > :is(.field-group,.structured-field,.structured-toggle,.form-aligned__toggle,.ticket-field,.form-field){
    grid-row:span 3;
    min-width:0;
    margin-block:0 8px;
  }
  body .form-aligned > .form-aligned__container{display:grid;grid-template-rows:subgrid;align-self:stretch!important;row-gap:6px!important}
  body .form-aligned > .form-aligned__container > .form-aligned__field{grid-row:1/-1;margin:0}
  body .form-aligned .form-aligned__field{
    align-content:stretch!important;
    height:auto!important;
    display:grid!important;
    grid-template-rows:subgrid;
    align-self:stretch!important;
    align-items:start;
    row-gap:6px!important;
  }
  body .form-aligned .form-aligned__field > .form-aligned__label:not(.form-aligned__control){
    grid-row:1;
    margin:0;
    align-self:end;
    line-height:1.6;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  body .form-aligned .form-aligned__field > .form-aligned__control{grid-row:2;min-width:0;margin-block:0;align-self:start}
  body .form-aligned .form-aligned__field > .form-aligned__feedback{grid-row:3;display:grid;gap:4px;min-width:0;align-self:start}
  .form-aligned__feedback:empty{display:none!important}
  .form-aligned__feedback :is(small,.field-help,.field-hint,.form-text,.help-text){margin:0;font-size:.72rem;line-height:1.7;font-weight:400}
  body .form-aligned .form-aligned__field > .form-aligned__control:is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select:not([multiple])),
  body .form-aligned .form-aligned__field > .form-aligned__control :is(input.form-control:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),.searchable-select__control){
    min-height:var(--aligned-control-height)!important;
    height:var(--aligned-control-height)!important;
    box-sizing:border-box;
  }
  body .form-aligned .form-aligned__field--toggle > label{
    min-height:var(--aligned-control-height)!important;
    padding-block:6px!important;
    box-sizing:border-box;
    direction:inherit;
  }
  body .form-aligned :is(.field-group--checkbox,.structured-toggle){direction:inherit}
  @media(max-width:700px){
    body .form-aligned{--aligned-control-height:44px;row-gap:14px!important}
    body .form-aligned > :is(.field-group,.structured-field,.structured-toggle,.form-aligned__toggle,.ticket-field,.form-field){margin-block:0}

  }
}
