/* COGO_PROBLEM_BOARD_STABLE_R1_SCROLL
 * The problem route has one vertical scroller: the existing main viewport.
 * Phase 3 capped the table viewport while main also scrolled. Release only
 * the board's structural wrappers; dialogs and their scroll areas stay native.
 * Three #main IDs intentionally outrank the deployed two-ID phase-3 rules.
 */
html body[data-view="bank"] #main#main#main:has(.problem-board) {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

html body[data-view="bank"] #main#main#main > .page:has(.problem-board) {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

html body[data-view="bank"] #main#main#main .problem-board,
html body[data-view="bank"] #main#main#main .problem-board > .board-card,
html body[data-view="bank"] #main#main#main .problem-board > .board-card > #boardViewport.board-viewport {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

html body[data-view="bank"] #main#main#main .problem-board > .board-card > #boardViewport.board-viewport {
  scrollbar-gutter: auto !important;
}

/* With no clipping/scrolling ancestor between the table and main, column
 * headings follow main's scroll position and remain available for long pages. */
html body[data-view="bank"] #main#main#main .problem-board > .board-card > #boardViewport > .problem-table > thead > tr > th {
  position: sticky !important;
  top: 0 !important;
  z-index: 2;
}
