/* All workspace pages render their title in base.html's page_header slot.
   Keep actions and record context below the title so neither shifts its anchor.
   Screen layout is separate from printed document letterheads. */
@media screen {
  .workspace-shell #main-content {
    padding-top: 32px;
  }
  #main-content > .workspace-page-heading {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 16px 12px;
    width: 100%;
    max-width: none;
    margin: 0 0 28px;
    padding: 0;
    text-align: center;
  }
  #main-content > .workspace-page-heading > .workspace-page-titles {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 100%;
    min-width: 0;
    gap: 6px;
    margin: 0;
    padding: 0;
    text-align: center;
  }
  #main-content > .workspace-page-heading h1 {
    order: -1;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: -.45px;
    text-align: center;
    overflow-wrap: anywhere;
  }
  #main-content > .workspace-page-heading h1 .ui-heading {
    align-items: center;
    text-align: center;
  }
  #main-content > .workspace-page-heading .workspace-page-titles > p {
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  #main-content > .workspace-page-heading > .button-group,
  #main-content > .workspace-page-heading > .schedule-top-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
  }
  #main-content > .back-link {
    display: inline-flex;
    margin: 0 0 16px;
  }
}
@media screen and (max-width: 600px) {
  .workspace-shell #main-content { padding-top: 24px; }
  #main-content > .workspace-page-heading { margin-bottom: 24px; }
  #main-content > .workspace-page-heading h1 { font-size: 25px; }
  #main-content > .workspace-page-heading > .button-group,
  #main-content > .workspace-page-heading > .schedule-top-actions { width: 100%; }
}
