/* Small-screen reading aids; native links remain keyboard accessible. */
.ml-full-image-link { display: none; }

@media (min-width: 1025px) and (max-width: 1280px) {
  .ml-custom-main > .ml-custom-visual { width: 100% !important; max-width: 100%; min-width: 0; }
}

@media (max-width: 1024px) {
  .ml-app-detail-page :is(#project-contexts, #application-brief, #project-validation, #application-faq, #application-faq-questions, #application-contact) { scroll-margin-top: 86px; }
  body.admin-bar .ml-app-detail-page :is(#project-contexts, #application-brief, #project-validation, #application-faq, #application-faq-questions, #application-contact) { scroll-margin-top: 132px; }
  .ml-full-image-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 16px;
    color: #fff;
    background: #06346f;
    font: 500 13px/1.4 var(--ml-body, Arial, sans-serif);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .ml-full-image-link:hover { color: #fff; background: #082f66; }
  .ml-full-image-link:focus-visible { outline: 2px solid #0d61ff; outline-offset: -3px; }
  /* Keep the home diagram and its link in normal flow, with the full aspect ratio visible. */
  .ml-custom-visual:has(> .ml-full-image-link) { height: auto !important; min-height: 0; aspect-ratio: auto; }
  .ml-custom-visual:has(> .ml-full-image-link) > figure.wp-block-image { position: relative; inset: auto; height: auto !important; }
  .ml-custom-visual:has(> .ml-full-image-link) img { height: auto !important; min-height: 0; object-fit: contain; }
}
