/* ============================================================
     Horizontal webform — label 40% / field 60%
     ============================================================ */

  /* --- simple fields + single checkbox (div wrappers only) --- */
  .form-horizontal > div.js-form-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 1rem;
    margin-bottom: 1.5rem !important;
    clear: left;
  }

  /* label = 40% */
  .form-horizontal > div.js-form-item > label {
    flex: 0 0 40%;
    max-width: 40%;
    margin-bottom: 0;
    padding: 0.375rem 0 0;
    text-align: left;
    line-height: 1.3;
  }

  /* field control = ~60% */
  .form-horizontal > div.js-form-item > input:not([type="checkbox"]):not([type="radio"]),
  .form-horizontal > div.js-form-item > select,
  .form-horizontal > div.js-form-item > .form-textarea-wrapper {
    flex: 1 1 0;
    min-width: 0;
  }
  .form-horizontal > div.js-form-item > .form-textarea-wrapper textarea {
    width: 100%;
  }

  /* description: own line, indented, width-capped */
  .form-horizontal > div.js-form-item > .description {
    flex: 0 0 100%;
    max-width: calc(60% - 1rem);
    margin-left: calc(40% + 1rem);
    margin-top: 0.35rem;
  }

  /* --- composite fieldsets (select+other, yes/no+other) --- */
  .form-horizontal > fieldset {
    display: flow-root;
    border: 0;
    padding: 0;
    margin-bottom: 1.5rem;
    min-inline-size: auto;
  }
  .form-horizontal > fieldset > legend {
    float: left;
    width: 40%;
    margin: 0;
    padding: 0.375rem 0 0;
    font-size: inherit;
    line-height: 1.3;
    box-sizing: border-box;
  }
  .form-horizontal > fieldset > .fieldset-wrapper {
    float: right;                /* <<< control on the right */
    width: calc(60% - 1.25rem);
    box-sizing: border-box;
  }

 /* radios: honor the element's "one column" display */
  .form-horizontal .form-radios .form-check {
    margin: 0 0 0.35rem;
  }

  /* --- single checkbox: label left, small box right --- */
  .form-horizontal > div.js-form-type-checkbox {
    align-items: center;
    padding-left: 0;
  }
  .form-horizontal > div.js-form-type-checkbox > label {
    order: -1;
    flex: 1 1 40%;
    padding-top: 0;
    margin-bottom: 0;
  }
  .form-horizontal > div.js-form-type-checkbox > input {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    float: none;
  }

  /* long radio questions: stack label on top, options below */
  .form-horizontal > fieldset.webform-type-radios {
    display: block;
  }
  .form-horizontal > fieldset.webform-type-radios > legend {
    float: none;
    width: auto;
    margin-bottom: 0.5rem;
  }
  .form-horizontal > fieldset.webform-type-radios > .fieldset-wrapper {
    float: none;
    width: auto;
  }