/* One quiet, page-level return control across the current UI shells. */
.ap-back-row {
  box-sizing: border-box;
  margin: 0 auto 12px;
  max-width: 1320px;
  width: calc(100% - 24px);
}

.page-content > .ap-back-row,
.ap-back-row[data-ap-back-placed] {
  width: 100%;
}

.ap2-page > .ap-back-row {
  grid-column: 1 / -1;
}

.ap-back-control {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(25, 25, 29, .2);
  border-radius: 50%;
  box-shadow: none;
  box-sizing: border-box;
  color: #19191d;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  max-width: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 160ms ease, border-color 160ms ease;
  vertical-align: middle;
  width: 44px;
}

.ap-back-control:hover {
  background: #faf3fc;
  border-color: rgba(169, 58, 139, .42);
  color: #19191d;
}

.ap-back-control:focus-visible {
  outline: 2px solid #a93a8b;
  outline-offset: 3px;
}

.ap-back-control svg {
  display: block;
  flex: none;
  height: 20px;
  width: 20px;
}

/* The shared button remains the only visible back control without JavaScript. */
main:has(> .ap-back-row) a.ap2-back-link,
main:has(> .ap-back-row) a.ap2-page-return {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .ap-back-control { transition: none; }
}
