/* Shared navigation only — no calculator or payment styling. */
.ds-back-to-top {
  position: fixed;
  z-index: 85;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #b2e0d8;
  border-radius: 50%;
  background: #086b5e;
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(13, 38, 44, .22);
  font: 800 29px/1 Arial, sans-serif;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.ds-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.ds-back-to-top:hover { background: #084f46; }
.ds-back-to-top:focus-visible,
.ds-shared-footer .ds-shared-brand-link:focus-visible {
  outline: 3px solid #6dcbbd;
  outline-offset: 4px;
}
html[data-theme="dark"] .ds-back-to-top {
  background: #a0e4c3;
  color: #19372b;
  border-color: #d0f5e0;
  box-shadow: 0 6px 26px rgba(0, 0, 0, .46);
}
html[data-theme="dark"] .ds-back-to-top:hover { background: #c8f1d8; }
.ds-shared-footer .ds-shared-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  color: inherit;
  font-size: inherit !important;
  font-weight: 800;
  text-decoration: none !important;
}
.ds-shared-footer .ds-shared-brand-link:hover { text-decoration: underline !important; }
@media (max-width: 600px) {
  .ds-back-to-top { right: max(14px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; }
  /* Never cover Deal Analysis's fixed mobile verdict/results control. */
  body.da-standalone .ds-back-to-top { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .ds-back-to-top { transition: none; }
}
@media print { .ds-back-to-top { display: none !important; } }
