/* COGO's standard solve view uses a viewport-height page with a scrolling reading pane.
   For an office workspace the document viewport should own vertical scrolling. */
@media screen {
  html[data-cogo-itq-flow]:root {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  html[data-cogo-itq-flow]:root body[data-view="solve"] {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html[data-cogo-itq-flow]:root body[data-view="solve"] .shell,
  html[data-cogo-itq-flow] body[data-view="solve"] #main#main.content,
  html[data-cogo-itq-flow] body[data-view="solve"] #main#main.content > .page,
  html[data-cogo-itq-flow] body[data-view="solve"] #main#main .question-panel,
  html[data-cogo-itq-flow] body[data-view="solve"] #main#main .question-reading {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: none !important;
    overflow: visible !important;
    overscroll-behavior-y: auto !important;
    scrollbar-gutter: auto !important;
  }
  html[data-cogo-itq-flow] body[data-view="solve"] #main#main .question-panel,
  html[data-cogo-itq-flow] body[data-view="solve"] #main#main .question-reading {
    min-width: 0 !important;
  }
  html[data-cogo-itq-flow] body[data-view="solve"] #main#main .question-actions {
    position: static !important;
  }
  /* The platform's own modal takes the viewport while it is open. */
  html[data-cogo-itq-flow]:root:has(dialog:modal) {
    overflow-y: hidden !important;
  }
}
@media screen {
  /* Keep each paper and the mobile formatting ribbon in the page's vertical flow. */
  .cogo-itq-shell .itqp-hwp .hw-papers,
  .cogo-itq-shell .itqp-hwp .hw-tools {
      max-height: none;
      overflow: visible;
  }

  /* A wide worksheet still pans across columns, while all rows are page content. */
  .cogo-itq-shell .itqp-xls .itqx-gridframe {
      max-height: none;
      overflow-x: auto;
      overflow-y: hidden;
  }

  /* The slide selector uses a column on desktop and a horizontal strip on phones. */
  .cogo-itq-shell .itqp-ppt .pp-rail {
      min-width: 0;
      max-height: none;
      overflow: visible;
  }
}
@media screen and (max-width: 580px) {
    .cogo-itq-shell .itqp-ppt .pp-rail {
        overflow-x: auto;
        overflow-y: hidden;
    }
}
