/* Keep the onboarding controls anchored while switching simple/specialist modes. */
.learning-wizard-form{display:flex;flex-direction:column;overflow-anchor:none}
.learning-wizard-form>fieldset:not(.journey-level){order:2;margin-top:22px}
.journey-profile-fields{order:1;margin-top:0}
.journey-form-error{order:3}
.journey-mode-hint{order:4;min-height:28px}
.journey-mode-hint[hidden]{display:block!important;visibility:hidden;pointer-events:none}
.journey-submit{order:5;align-self:flex-start}

/* URL and work mode are stable controls. Optional specialist fields open below them. */
@media(min-width:761px){
  .journey-profile-fields{grid-template-columns:minmax(230px,.9fr) minmax(0,1.55fr);grid-template-areas:"url level" "site level";align-items:start}
  .journey-profile-fields>label:first-child{grid-area:url}
  .journey-profile-fields>label:nth-child(2){grid-area:site}
  .journey-level{grid-area:level;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-content:start}
  .journey-level>legend{grid-column:1/-1}
  .journey-level label{min-width:0;flex:none}
  .journey-level span{height:52px;padding-inline:8px}
}

/* On phones the same rule applies: the mode switch never gets pushed by optional fields. */
@media(max-width:760px){
  .journey-profile-fields{display:grid;grid-template-columns:1fr}
  .journey-profile-fields>label:first-child{grid-column:1;grid-row:1}
  .journey-level{grid-column:1;grid-row:2}
  .journey-profile-fields>label:nth-child(2){grid-column:1;grid-row:3}
  .learning-wizard-form>fieldset:not(.journey-level){margin-top:18px}
  .journey-submit{width:100%}
}
