.ahr-platform-view {
  border-top: 1px solid var(--pst-color-border);
  margin-top: 1rem;
  padding-top: 0.75rem;
}

.ahr-platform-view__heading {
  color: var(--pst-color-text-base);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.ahr-platform-view__list {
  display: grid;
  gap: 0.1rem;
}

.ahr-platform-view__link {
  border-left: 2px solid transparent;
  color: var(--pst-color-text-muted);
  display: block;
  line-height: 1.35;
  padding: 0.3rem 0.5rem;
  text-decoration: none;
}

.ahr-platform-view__link:hover,
.ahr-platform-view__link:focus-visible {
  color: var(--pst-color-primary);
  text-decoration: none;
}

.ahr-platform-view__link:focus-visible {
  outline: 2px solid var(--pst-color-primary);
  outline-offset: 1px;
}

.ahr-platform-view__link[aria-current="true"] {
  border-left-color: var(--pst-color-primary);
  color: var(--pst-color-primary);
  font-weight: 600;
}

.ahr-page article .mermaid {
  margin: 1.5rem auto;
  max-width: 480px;
  width: 100%;
}

.ahr-page article .mermaid svg {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100% !important;
  width: 100% !important;
}

.ahr-page article #shared-break-fix-lifecycle .mermaid {
  max-width: 760px;
}

.ahr-page article #shared-post-rma-workflow .mermaid {
  max-width: 460px;
}

.ahr-page article #switch-post-rma .mermaid {
  max-width: 340px;
}

.ahr-page article img[src*="flowchart"] {
  display: block;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  max-width: min(100%, 500px);
}

/* Keep whatever was scrolled to clear of the sticky page header. */
.ahr-page article .ahr-platform-view__scroll-anchor {
  scroll-margin-top: calc(var(--pst-header-height) + 1rem);
}

/* Confirm a platform switch that did not move the page. */
.ahr-page article .sd-tab-set.ahr-platform-view__flash {
  animation: ahr-platform-view-flash 1.2s ease-out;
}

@keyframes ahr-platform-view-flash {
  from {
    box-shadow: 0 0 0 4px var(--pst-color-primary-highlight, rgba(118, 185, 0, 0.35));
  }
  to {
    box-shadow: 0 0 0 4px transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ahr-page article .sd-tab-set.ahr-platform-view__flash {
    animation: none;
  }
}

@media print {
  .ahr-platform-view {
    display: none;
  }
}
