/* MSW Technical Atlas: touch targets only; no contact dock/runtime dependency.
 * Load after msw-university-atlas/assets/atlas.css in the standalone shell.
 */
#msw-atlas .btn,
#msw-atlas .account,
#msw-atlas .sidebar nav a,
#msw-atlas .quick-links a {
  min-height: 44px;
}

#msw-atlas .btn,
#msw-atlas .account {
  min-width: 44px;
}

#msw-atlas .topbar .brand {
  min-width: 0;
  min-height: 44px;
}

#msw-atlas .topbar .brand > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

#msw-atlas .topbar .emblem,
#msw-atlas .topbar .account {
  flex-shrink: 0;
}

/* Research Mesh appends this link directly after the Atlas root in body. */
#msw-atlas ~ #qrm-link {
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  max-width: min(360px, calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Leave room to scroll the final footer links above the fixed 44px control. */
#msw-atlas .main {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 680px) {
  #msw-atlas .topbar {
    gap: 12px;
  }

  #msw-atlas .topbar .brand {
    flex: 1 1 auto;
  }
}
