/* Erstgespraech, Schritt 02: kompakter Fragebogen ohne Inhaltsverlust. */
.form-step[data-form-step="2"] .form-block > legend {
  float: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: auto;
  margin-bottom: 0.75rem;
}

.form-step[data-form-step="2"] .form-block-icon {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  padding: 0.6rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sage-pale) 76%, var(--paper));
  fill: none;
  stroke: var(--green-deep);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.form-step[data-form-step="2"] .form-block-title {
  font-size: clamp(1.05rem, 0.95rem + 0.3vw, 1.22rem);
}

.form-step[data-form-step="2"] .form-block-step {
  display: none;
}

@media (min-width: 900px) {
  .form-step[data-form-step="2"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: none;
  }

  .form-step[data-form-step="2"] > .form-block {
    padding: 1rem 1.1rem;
    border-radius: 0.9rem;
  }

  .form-step[data-form-step="2"] > .form-block:first-of-type {
    grid-column: 1 / -1;
    order: 1;
  }

  .form-step[data-form-step="2"] > .form-block:nth-of-type(2),
  .form-step[data-form-step="2"] > .form-block:nth-of-type(3),
  .form-step[data-form-step="2"] > .form-block:nth-of-type(4) {
    grid-column: span 2;
    order: 2;
    align-self: stretch;
  }

  .form-step[data-form-step="2"] > .form-consent {
    grid-column: span 3;
    order: 3;
    min-height: 4rem;
    margin: 0;
    padding: 0.7rem 0.85rem;
    border-radius: 0.7rem;
    align-self: stretch;
  }

  .form-step[data-form-step="2"] .form-consent span {
    font-size: 0.72rem;
    line-height: 1.36;
  }

  .form-step[data-form-step="2"] > .form-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    order: 4;
    gap: 0.65rem 1rem;
    margin-top: 0.15rem;
  }

  .form-step[data-form-step="2"] .form-actions-note {
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
  }

  .form-step[data-form-step="2"] .form-field {
    gap: 0.28rem;
  }

  .form-step[data-form-step="2"] .form-field > label,
  .form-step[data-form-step="2"] .form-legend {
    font-size: 0.73rem;
    line-height: 1.32;
  }

  .form-step[data-form-step="2"] .form-optional {
    font-size: 0.68rem;
  }

  .form-step[data-form-step="2"] .form-field input,
  .form-step[data-form-step="2"] .form-field textarea {
    min-height: 2.05rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
  }

  .form-step[data-form-step="2"] .form-field textarea {
    min-height: 3.2rem;
  }

  .form-step[data-form-step="2"] .form-choices {
    gap: 0.1rem 0.6rem;
  }

  .form-step[data-form-step="2"] .form-choice {
    min-height: 1.9rem;
    gap: 0.45rem;
    padding: 0.12rem 0;
    font-size: 0.73rem;
    line-height: 1.25;
  }

  .form-step[data-form-step="2"] .form-choice input {
    width: 1rem;
    height: 1rem;
  }

  .form-step[data-form-step="2"] .form-block:nth-of-type(2) .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.45rem;
  }

  /* Die unterschiedlich langen Feldbeschriftungen dürfen die beiden
     Gewichtseingaben nicht gegeneinander verschieben. */
  .form-step[data-form-step="2"] .form-block:nth-of-type(2) .form-field {
    display: grid;
    grid-template-rows: minmax(2.15rem, auto) 2.05rem;
    align-content: end;
  }

  .form-step[data-form-step="2"] .form-block:nth-of-type(2) .form-field > label {
    margin: 0;
  }

  .form-step[data-form-step="2"] .form-block:nth-of-type(3) .form-choices + .form-choices {
    margin-top: 0.45rem;
  }

  .form-step[data-form-step="2"] .form-subfield {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem;
    align-items: center;
    gap: 0.45rem;
    max-width: none;
    margin: 0.45rem 0 0;
  }

  .form-step[data-form-step="2"] .form-subfield input {
    min-height: 2rem;
  }

  .form-step[data-form-step="2"] .form-block:nth-of-type(4) .form-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-step[data-form-step="2"] .form-block:nth-of-type(4) .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
    margin-top: 0.4rem;
  }

  .form-step[data-form-step="2"] .form-block:nth-of-type(4) .form-grid .form-field:nth-child(2) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem;
    align-items: center;
    gap: 0.45rem;
  }

  .form-step[data-form-step="2"] .form-block:nth-of-type(4) .form-grid .form-field:nth-child(2) input {
    min-height: 2rem;
  }

  .form-step[data-form-step="2"] .form-block:nth-of-type(4) .form-grid + .form-choices {
    margin-top: 0.4rem;
  }
}

@media (max-width: 899px) {
  .form-step[data-form-step="2"]:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .form-step[data-form-step="2"] > .form-block,
  .form-step[data-form-step="2"] > .form-consent,
  .form-step[data-form-step="2"] > .form-actions {
    margin: 0;
  }

  .form-step[data-form-step="2"] > .form-block:first-of-type { order: 1; }
  .form-step[data-form-step="2"] > .form-block:nth-of-type(2),
  .form-step[data-form-step="2"] > .form-block:nth-of-type(3),
  .form-step[data-form-step="2"] > .form-block:nth-of-type(4) { order: 2; }
  .form-step[data-form-step="2"] > .form-consent { order: 3; }
  .form-step[data-form-step="2"] > .form-actions {
    justify-content: center;
    order: 4;
  }
}

/* Zwischen Desktop und Mobil bleiben die Auswahlzeilen lesbar. Die berufliche
   Situation bekommt dort die volle Breite, statt in eine dritte enge Karte zu
   brechen. */
@media (min-width: 900px) and (max-width: 1199px) {
  .form-step[data-form-step="2"] > .form-block:nth-of-type(2),
  .form-step[data-form-step="2"] > .form-block:nth-of-type(3) {
    grid-column: span 3;
  }

  .form-step[data-form-step="2"] > .form-block:nth-of-type(4) {
    grid-column: 1 / -1;
  }
}
