/* SUNDEX processing back control — compact, secondary and consistently placed. */

body.sundex-transaction-system .stx-head:has(> button.stx-back-control),
body.sundex-transaction-system .stx-head:has(> button.sx96-back-control) {
  align-content: flex-start !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  column-gap: 0 !important;
  row-gap: 9px !important;
  padding-top: 20px !important;
}

body.sundex-transaction-system .stx-head:has(> button.stx-back-control) > .stx-title-group,
body.sundex-transaction-system .stx-head:has(> button.sx96-back-control) > .stx-title-group {
  order: 1 !important;
  width: 100% !important;
  flex: 0 0 100% !important;
}

body.sundex-transaction-system .stx-head.stx-head > button.stx-back-control,
body.sundex-transaction-system .stx-head.stx-head > button.sx96-back-control {
  position: static !important;
  inset: auto !important;
  z-index: 6 !important;
  order: 2 !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 13px !important;
  border: 1px solid rgba(214, 224, 237, 0.22) !important;
  border-radius: 12px !important;
  color: #c8d0dc !important;
  background: rgba(123, 136, 154, 0.10) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
  backdrop-filter: blur(14px) saturate(112%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(112%) !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 570 !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
  cursor: pointer !important;
  opacity: 1 !important;
  transform: none !important;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease !important;
}

body.sundex-transaction-system .stx-head.stx-head > button.stx-back-control svg,
body.sundex-transaction-system .stx-head.stx-head > button.sx96-back-control svg {
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 auto !important;
  stroke-width: 1.8 !important;
}

body.sundex-transaction-system .stx-head.stx-head > button.stx-back-control .stx-back-label,
body.sundex-transaction-system .stx-head.stx-head > button.sx96-back-control .stx-back-label {
  display: inline !important;
  font: inherit !important;
}

@media (hover: hover) and (pointer: fine) {
  body.sundex-transaction-system .stx-head.stx-head > button.stx-back-control:hover,
  body.sundex-transaction-system .stx-head.stx-head > button.sx96-back-control:hover {
    color: #f1f5fa !important;
    border-color: rgba(226, 235, 247, 0.42) !important;
    background: rgba(145, 158, 177, 0.16) !important;
    transform: translateY(-1px) !important;
  }
}

body.sundex-transaction-system .stx-head.stx-head > button.stx-back-control:active,
body.sundex-transaction-system .stx-head.stx-head > button.sx96-back-control:active {
  transform: scale(0.98) !important;
}

body.sundex-transaction-system .stx-head.stx-head > button.stx-back-control:focus-visible,
body.sundex-transaction-system .stx-head.stx-head > button.sx96-back-control:focus-visible {
  outline: 2px solid rgba(211, 225, 244, 0.72) !important;
  outline-offset: 3px !important;
}

/* A verification progress rail remains below the compact navigation control. */
body.sundex-transaction-system .stx-head > .stx-vf-progress {
  order: 3 !important;
  width: 100% !important;
  flex: 0 0 100% !important;
}

/* Swap is intentionally a single-page workspace and has no step-back control. */
body.stx-swap-route .sundex-swap-page-head :is(
  .sundex-swap-back,
  .stx-back-control,
  .sx96-back-control
) {
  display: none !important;
}

@media (max-width: 900px) {
  body.sundex-transaction-system .stx-head:has(> button.stx-back-control),
  body.sundex-transaction-system .stx-head:has(> button.sx96-back-control) {
    padding-right: 34px !important;
  }
}

@media (max-width: 640px) {
  body.sundex-transaction-system .stx-head:has(> button.stx-back-control),
  body.sundex-transaction-system .stx-head:has(> button.sx96-back-control) {
    row-gap: 8px !important;
    padding: 18px 20px 6px !important;
  }

  body.sundex-transaction-system .stx-head.stx-head > button.stx-back-control,
  body.sundex-transaction-system .stx-head.stx-head > button.sx96-back-control {
    height: 40px !important;
    min-height: 40px !important;
    padding-inline: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sundex-transaction-system .stx-head.stx-head > button.stx-back-control,
  body.sundex-transaction-system .stx-head.stx-head > button.sx96-back-control {
    transition: none !important;
  }
}
