/* Fig 5.1 uses the same IDA and terminal windows as the other home scenes. */
.fortios-desk {
  position: relative;
  width: 100%;
  max-width: 1000px;
  min-height: 640px;
  margin: 18px 0 0;
}
.fortios-desk > .f-ida {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 916px;
  max-width: 100%;
}
.fortios-desk > .f-term {
  position: absolute;
  left: min(430px, calc(100% - 540px));
  top: 310px;
  z-index: 3;
  width: 540px;
  max-width: none;
}
@media (min-width: 721px) {
  .fortios-desk + .fig { margin-top: 34px; }
}
@media (min-width: 1080px) {
  /* Reserve room for the heading, caption and browser-height variations. */
  .fortios-desk {
    --fortios-stage-height: clamp(400px, calc(100dvh - 180px), 570px);
    min-height: var(--fortios-stage-height);
  }
  .fortios-desk > .f-ida {
    display: flex;
    flex-direction: column;
    height: calc(var(--fortios-stage-height) - 24px);
  }
  .f-ida > * { flex-shrink: 0; }
  .f-ida > .ida-main { flex: 1 1 auto; min-height: 0; height: auto; }
  .fortios-desk > .f-term { top: calc(var(--fortios-stage-height) - 330px); }
}
@media (min-width: 721px) and (max-width: 1079px) {
  .fortios-desk { min-height: 0; }
  .fortios-desk > .f-ida { position: relative; margin-bottom: 16px; }
  .fortios-desk > .f-term { width: 100%; }
}
@media (max-width: 720px) {
  .fortios-desk { min-height: 0; max-width: none; }
  .fortios-desk > .f-ida { width: 540px; max-width: none; }
  /* Match Grab's 580px phone stage, so terminal text has the same scale. */
  .fortios-desk > .f-term { left: 40px; z-index: 3 !important; }
}
