/* Only an active problem workspace uses the viewport width. Other pages retain their layout. */
#oj-content:has(.problem-box) {
  box-sizing: border-box;
  width: 100%;
  max-width: none !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* Replace the standalone page's percentage breakout with the same safe edge as training/contest pages. */
#oj-content .problem-body:has(.problem-box) {
  width: 100%;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#oj-content #problem-main:has(> .problem-box),
#oj-content .problem-box {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Do not override either column's width: the existing drag/collapse controls own their proportions. */
@media (max-width: 991px) {
  #oj-content .problem-box > .problem-left,
  #oj-content .problem-box > .problem-right {
    width: 100% !important;
    float: none !important;
  }
}

@media (max-width: 767px) {
  #oj-content:has(.problem-box) {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}
