/* Final responsive safeguards shared by the portal and every application. */
html,
body.has-itft-shell {
  max-width: 100%;
  overflow-x: hidden;
}

body.has-itft-shell :where(img, canvas, svg, video, iframe) {
  max-width: 100%;
}

body.has-itft-shell :where(.card, .tool-card, .panel, .form-card, .content, main, section) {
  min-width: 0;
}

body.has-itft-shell :where(.table-wrap, .table-container) {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

body.has-itft-shell :where(.actions, .action-row, .toolbar, .section-row, .result-bar, .link-row) {
  flex-wrap: wrap;
}

body.has-itft-shell :where(input, select, textarea, button) {
  max-width: 100%;
}

@media (max-width: 640px) {
  body.has-itft-shell :where(.grid, .tool-grid, .content-grid, .method, .contact, .details-grid, .guides, .parties, .privacy-grid, .discovery-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.has-itft-shell :where(.actions, .action-row, .toolbar, .result-bar) {
    align-items: stretch;
    flex-direction: column;
  }

  body.has-itft-shell :where(.actions, .action-row, .toolbar, .result-bar) > :where(button, .btn, .button, a) {
    width: 100%;
  }

  .itft-shell-brand__text span {
    font-size: 0.78rem;
  }

  .itft-shell-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
  }

  .itft-export__menu {
    position: fixed;
    top: 62px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
  }
}

@media (max-width: 420px) {
  .itft-shell-brand__mark {
    width: 31px;
    height: 31px;
  }

  .itft-export summary {
    padding-inline: 9px;
    font-size: 0.78rem;
  }
}
