.demo-page {
  height: 100%;
  width: 100%;

  display: flex;
  background-color: @dark-white;

  .leftPanel {
    flex: 2;
    max-width: 600px;
    // min-width: 600px;

    height: 100%;
    overflow-y: auto;

    border-right: 1px solid @grey-200;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    .input {
      flex: 0 0 auto;
    }
    .info {
      flex: 1 0 auto;
    }
    .control {
      border-bottom: 1px solid @grey-200;
      flex: 0 0 auto;
    }
    .examples {
      flex: 1 1 auto;
      min-height: 100px;
    }

  }

  .rightPanel {
    flex: 4;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}

@media all and (max-width: 1300px) {
  .demo-page {
    .leftPanel {
      flex: 1;
      .input {
        .CodeMirror {
          max-height: 12em;
        }
        .CodeMirror-scroll {
          max-height: 12em;
        }
      }
    }

    .rightPanel {
      flex: 1.5;
    }
  }
}

@media all and (max-width: 1000px) {
  .demo-page {
    .leftPanel {
      flex: 1;

      .input {
        .CodeMirror {
          height: auto;
        }
      }

    }

    .rightPanel {
      flex: 1;
    }
  }
}

@media all and (max-width: 640px) {
  .master {
    // height: 100% !important;
    // position: absolute;
  }
  .demo-page {

    position: absolute;
    height: auto !important;

    .leftPanel {
      display: block;
      height: auto;
    }

    .rightPanel {
      > .visualization {
        >.content {
          overflow: visible;
        }
      }
    }
  }
}

// --- print ---
@media print {
 /* All your print styles go here */

  body > :not(.aspectWrapper) {
    display: none !important;
  }

  .originalProgram {
    white-space: pre;
    .monoFont;
    margin-left: 1em;
    margin-top: 1em;
    line-height: 1.2;
    font-size: 10px;
  }

  // http://stackoverflow.com/questions/1311068/scale-a-div-to-fit-in-window-but-preserve-aspect-ratio
  .aspectWrapper {
    display: inline-block; /* shrink to fit */
    width: 100%; /* whatever width you like */
    position: relative; /* so .content can use position: absolute */

    .aspectContent {
      position: absolute;
      top: 0; bottom: 0; right: 0; left: 0; /* follow the parent's edges */
      // outline: thin dashed green; /* just so you can see the box */
      // overflow: hidden;
    }
  }
  .aspectWrapper::after {
    padding-top: 100%; /* percentage of containing block _width_ */
    display: block;
    content: '';
  }

  .printContent {
    display: inline-block;
    top: 0;
    left: 0;
    z-index: 10;
    transform-origin: top left;

    .content {
      overflow: visible;
    }

    .goal {
      font-size: 8px !important;
      line-height: 1.2;

    }
  }
}
