/* =====================================================================================
   Online payments (/payments/, /payments/checkout/, /payments/links/, /payments/subscriptions/)
   One visual family for the four pages: a "scene" (.py-scene) that is drawn in em and scales as
   one picture (its font size comes from the stage's width, like the till on /pos/), a window from
   the dashboard, the customer's phone (the /pos/ device frame), floating toasts, and the hosted
   pay page. Sequenced parts use the shared [data-sequence] engine in site.js: without
   JavaScript, or with reduced motion, the markup's resting state shows.
   ===================================================================================== */

/* ---- The stage and its scene ---- */
.py-stage {
  position: relative;
  margin: 0;
  container-type: inline-size;
}
.py-scene {
  --py-ink: #0b1020;
  --py-mute: #5b6380;
  --py-line: #e3e7f1;
  position: relative;
  font-size: calc(100cqw / 38);
  line-height: 1.3;
  color: var(--py-ink);
  text-align: left;
}
.py-scene .icon {
  width: 1.15em;
  height: 1.15em;
}
.py-scene b,
.py-scene strong {
  font-weight: 650;
}
.py-scene small {
  font-size: 0.82em;
}

/* A light stage: a tinted panel with the brand's skewed slabs behind the mock-ups. */
.py-panel {
  padding: 2.6em 2em 3.4em;
  border-radius: 1.6em;
  background: linear-gradient(160deg, #f6f8ff 0%, var(--blue-50) 40%, #efeaff 100%);
  box-shadow:
    0 0 0 1px rgba(59, 91, 255, 0.08) inset,
    0 40px 80px -48px rgba(11, 16, 32, 0.35);
  overflow: hidden;
  isolation: isolate;
}
.py-panel::before,
.py-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 2em;
  transform: skewY(-22deg);
}
.py-panel::before {
  width: 62%;
  height: 76%;
  right: -16%;
  top: -22%;
  background: linear-gradient(160deg, var(--blue-300) 0%, var(--blue-500) 70%, var(--blue-600) 100%);
  opacity: 0.32;
}
.py-panel::after {
  width: 56%;
  height: 56%;
  left: -18%;
  bottom: -30%;
  background: linear-gradient(160deg, var(--mint-200) 0%, var(--mint-400) 100%);
  opacity: 0.45;
}
.py-panel--mint {
  background: linear-gradient(160deg, #effcf8 0%, #e8fbf6 35%, var(--blue-50) 100%);
}
.py-panel--mint::before {
  background: linear-gradient(160deg, var(--mint-300) 0%, var(--mint-500) 100%);
  opacity: 0.4;
}
.py-panel--mint::after {
  background: linear-gradient(160deg, var(--blue-200) 0%, var(--blue-400) 100%);
  opacity: 0.35;
}
.py-panel--lilac {
  background: linear-gradient(160deg, #f7f5ff 0%, #f0ecff 45%, var(--tp-lilac) 100%);
}
.py-panel--lilac::before {
  background: linear-gradient(160deg, var(--lilac-300, #c9bffc) 0%, var(--blue-400) 100%);
  opacity: 0.45;
}
.py-panel--lilac::after {
  background: linear-gradient(160deg, var(--sunrise-200) 0%, var(--sunrise-300) 100%);
  opacity: 0.4;
}
/* On the dark hero: a sheet of glass, no tint. */
.py-glass {
  padding: 2em 1.8em 3.2em;
  border-radius: 1.6em;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 50px 100px -40px rgba(5, 8, 20, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* The pause button sits in the stage's corner, outside the decorative mock-up. */
.py-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
}
.py-toggle--light {
  border-color: var(--ink-200);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-700);
}
.py-toggle--light:hover {
  background: #fff;
}

/* ---- Small parts shared by every scene ---- */
.py-chip {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 0.7em;
  background: var(--blue-50);
  color: var(--blue-600);
}
.py-chip--mint {
  background: var(--mint-50);
  color: var(--mint-700);
}
.py-chip--lilac {
  background: var(--lilac-100, #ede9ff);
  color: var(--lilac-700, #5b3fd6);
}
.py-chip--sunrise {
  background: var(--sunrise-50);
  color: var(--sunrise-700);
}
.py-chip--ink {
  background: var(--tp-midnight);
  color: #fff;
}
.py-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.22em 0.6em;
  border-radius: 99em;
  font-size: 0.74em;
  font-weight: 600;
  white-space: nowrap;
  background: var(--ink-100);
  color: var(--ink-700);
}
.py-badge::before {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: currentColor;
}
.py-badge--ok {
  background: #dff8f1;
  color: #00745d;
}
.py-badge--warn {
  background: var(--sunrise-50);
  color: var(--sunrise-800, #9a3b14);
}
.py-badge--danger {
  background: #ffe8e6;
  color: #b42318;
}
.py-badge--blue {
  background: var(--blue-50);
  color: var(--blue-700);
}
/* Two states of one badge, stacked in one place. */
.py-swap {
  display: inline-grid;
  justify-items: end;
}
.py-swap > * {
  grid-area: 1 / 1;
}
.py-code-chip {
  font: 0.78em / 1.4 var(--font-mono);
  padding: 0.15em 0.45em;
  border-radius: 0.35em;
  background: var(--ink-50);
  color: var(--blue-700);
  border: 1px solid var(--py-line);
  white-space: nowrap;
}

/* A dashboard window. */
.py-win {
  background: #fff;
  border-radius: 1em;
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.06),
    0 30px 60px -28px rgba(11, 16, 32, 0.35),
    0 10px 24px -14px rgba(11, 16, 32, 0.2);
  overflow: hidden;
}
.py-win__bar {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.7em 0.9em;
  background: var(--ink-50);
  border-bottom: 1px solid var(--py-line);
}
.py-win__bar > i {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: #ff6b5f;
}
.py-win__bar > i:nth-child(2) {
  background: #ffbd2e;
}
.py-win__bar > i:nth-child(3) {
  background: #28c840;
}
.py-win__bar > em {
  margin-left: 0.6em;
  font-style: normal;
  font-size: 0.78em;
  color: var(--py-mute);
}
.py-win__body {
  position: relative;
  padding: 1.1em 1.2em 1.2em;
}
.py-win__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  margin-bottom: 0.9em;
}
.py-win__head b {
  font-size: 1.15em;
  letter-spacing: -0.01em;
}
.py-win__head small {
  display: block;
  color: var(--py-mute);
  font-size: 0.74em;
  margin-top: 0.15em;
}
.py-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  padding: 0.5em 0.85em;
  border-radius: 0.55em;
  background: var(--tp-blue);
  color: #fff;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}
.py-btn--ghost {
  background: #fff;
  color: var(--ink-800);
  box-shadow: 0 0 0 1px var(--py-line) inset;
}

/* A toast: something that happened, floating over the scene. */
.py-toast {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.75em 0.95em;
  border-radius: 0.9em;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.06),
    0 24px 48px -20px rgba(11, 16, 32, 0.45);
  font-size: 0.92em;
}
.py-toast > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  min-width: 0;
}
.py-toast small {
  color: var(--py-mute);
}
.py-toast--dark {
  background: var(--tp-midnight);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 24px 48px -20px rgba(11, 16, 32, 0.6);
}
.py-toast--dark small {
  color: var(--ink-300);
}
.py-toast .ui-float__pulse {
  width: 0.75em;
  height: 0.75em;
}

/* Code, as a dark card. */
.py-code {
  border-radius: 1em;
  background: #0d1326;
  color: #d6dcf5;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 30px 60px -28px rgba(11, 16, 32, 0.55);
  overflow: hidden;
}
.py-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  padding: 0.6em 0.9em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76em;
  color: var(--ink-300);
}
.py-code__bar b {
  color: #fff;
  font-weight: 600;
}
.py-code pre {
  margin: 0;
  padding: 0.8em 0.95em 0.9em;
  font: 0.7em / 1.65 var(--font-mono);
  white-space: pre;
  overflow: hidden;
  background: none;
  color: inherit;
}
.py-code .k {
  color: #9fb0ff;
}
.py-code .s {
  color: #6ff0cf;
}
.py-code .n {
  color: #ffb38f;
}
.py-code .c {
  color: #7d86a8;
}
.py-code .f {
  color: #d4c8ff;
}
.py-code__line {
  display: block;
}
.py-code__hl {
  display: block;
  margin: 0 -0.95em;
  padding: 0 0.95em;
  background: rgba(0, 209, 167, 0.12);
  box-shadow: inset 2px 0 0 var(--tp-mint);
}
.py-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.1em 0.5em;
  border-radius: 99em;
  background: rgba(0, 209, 167, 0.16);
  color: #6ff0cf;
  font-weight: 600;
}

/* ---- The customer's phone and the hosted pay page ----
   The frame is /pos/'s (.device--phone). Inside, 1em = the screen's width / 17. */
.py-phone {
  position: relative;
  z-index: 2;
}
.py-pay {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-size: calc(100cqw / 17);
  line-height: 1.3;
  color: var(--tp-midnight);
  background: #f6f7fb;
}
.py-pay .icon {
  width: 1.1em;
  height: 1.1em;
}
.py-pay__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9em 1.4em 0.2em;
  font-size: 0.8em;
  font-weight: 600;
}
.py-pay__island {
  width: 4.4em;
  height: 1.3em;
  border-radius: 1em;
  background: var(--tp-midnight);
}
.py-pay__url {
  margin: 0.5em 0.9em 0;
  padding: 0.35em 0.6em;
  border-radius: 0.6em;
  background: #e9ecf4;
  color: var(--py-mute, #5b6380);
  font-size: 0.68em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.py-pay__url .icon {
  width: 0.95em;
  height: 0.95em;
  vertical-align: -0.12em;
  margin-right: 0.2em;
}
.py-pay__screens {
  flex: 1;
  display: grid;
  min-height: 0;
}
.py-pay__screens > * {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  padding: 1.1em 1.2em 0.8em;
  min-height: 0;
}
.py-pay__brand {
  display: flex;
  align-items: center;
  gap: 0.55em;
  margin-bottom: 0.4em;
  font-weight: 650;
  font-size: 0.95em;
}
.py-pay__logo {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  border-radius: 0.55em;
  background: var(--tp-midnight);
  color: #fff;
  font-size: 0.85em;
  font-weight: 700;
}
.py-pay__logo--blue {
  background: var(--tp-blue);
}
.py-pay__logo--mint {
  background: var(--mint-600);
}
.py-pay__logo--sunrise {
  background: var(--sunrise-500);
}
.py-pay__title {
  font-size: 1.25em;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.py-pay__sub {
  margin-top: -0.3em;
  color: var(--py-mute, #5b6380);
  font-size: 0.82em;
}
.py-pay__amount {
  margin: 0.15em 0 0.35em;
  font-size: 2em;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.py-pay__label {
  font-size: 0.74em;
  font-weight: 600;
  color: var(--ink-600);
}
.py-pay__field {
  display: flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.65em 0.7em;
  border: 1px solid var(--ink-200);
  border-radius: 0.6em;
  background: #fff;
  font-size: 0.8em;
  color: var(--ink-700);
  white-space: nowrap;
}
.py-pay__field--empty {
  color: var(--ink-400);
}
.py-pay__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45em;
}
.py-pay__card {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  padding: 0.7em;
  border-radius: 0.8em;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ink-100);
}
.py-pay__terms {
  padding: 0.7em;
  border-radius: 0.7em;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ink-100);
  font-size: 0.72em;
  color: var(--ink-600);
}
.py-pay__terms b {
  display: block;
  margin-bottom: 0.2em;
  color: var(--tp-midnight);
}
.py-pay__btn {
  position: relative;
  margin-top: 0.3em;
  padding: 0.8em;
  border-radius: 0.7em;
  background: var(--tp-blue);
  color: #fff;
  text-align: center;
  font-weight: 650;
  font-size: 0.92em;
  overflow: hidden;
}
.py-pay__btn--mint {
  background: var(--mint-600);
}
.py-pay__btn--sunrise {
  background: var(--sunrise-600, #e0602d);
}
.py-pay__foot {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35em;
  padding-top: 0.6em;
  font-size: 0.62em;
  color: var(--ink-500);
}
.py-pay__foot img {
  height: 1.2em;
  width: auto;
}
.py-pay__done {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.py-pay__done .py-pay__brand {
  position: absolute;
  top: 1.1em;
  left: 1.2em;
}
.py-pay__donecard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45em;
  width: 100%;
  padding: 1.4em 0.9em;
  border-radius: 0.9em;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ink-100);
}
.py-pay__donecard b {
  font-size: 1.15em;
  letter-spacing: -0.01em;
}
.py-pay__donecard span {
  color: var(--ink-500);
  font-size: 0.82em;
}
.py-pay__donecard .till__tick {
  width: 2.8em;
  height: 2.8em;
  margin-bottom: 0.3em;
  background: #dff8f1;
  color: #00745d;
}
.py-pay__donecard .till__tick .icon {
  width: 1.5em;
  height: 1.5em;
}
.py-pay__back {
  font-size: 0.72em;
  color: var(--ink-400);
}
/* The bank's check (the 3-D Secure window) over the pay page. */
.py-pay__screens > .py-pay__bank {
  background: rgba(11, 16, 32, 0.4);
  justify-content: flex-end;
  padding: 0;
}
.py-pay__sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55em;
  padding: 1.3em 1.1em 1.6em;
  border-radius: 1.2em 1.2em 0 0;
  background: #fff;
  text-align: center;
}
.py-pay__sheet b {
  font-size: 1.05em;
}
.py-pay__sheet > span:not(.py-pay__btn) {
  font-size: 0.78em;
  color: var(--ink-500);
}
.py-pay__shield {
  display: grid;
  place-items: center;
  width: 2.8em;
  height: 2.8em;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-600);
}
.py-pay__shield .icon {
  width: 1.5em;
  height: 1.5em;
}
.py-pay__code {
  display: flex;
  gap: 0.35em;
  margin: 0.2em 0;
}
.py-pay__code i {
  display: grid;
  place-items: center;
  width: 1.8em;
  height: 2.2em;
  border-radius: 0.45em;
  border: 1px solid var(--ink-200);
  font-style: normal;
  font-weight: 650;
}
.py-pay__sheet .py-pay__btn {
  align-self: stretch;
}
.is-on > .py-pay__sheet {
  animation: py-sheet 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes py-sheet {
  from {
    transform: translateY(100%);
  }
}

/* A press: a button dips and a ripple spreads. */
.py-press.is-at {
  animation: py-press 0.5s ease both;
}
.py-press.is-at::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1em;
  height: 1em;
  margin: -0.5em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  animation: py-ripple 0.6s ease-out both;
}
@keyframes py-press {
  40% {
    transform: scale(0.95);
  }
}
@keyframes py-ripple {
  from {
    transform: scale(0);
    opacity: 1;
  }
  to {
    transform: scale(14);
    opacity: 0;
  }
}

/* Typing: a field fills in from the left, with a caret while it is being typed. */
.py-type {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
}
.is-at .py-type,
.py-type.is-at {
  animation: py-type 0.9s steps(12, end) both;
}
.py-caret.is-at::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--tp-blue);
  animation: py-blink 0.6s steps(2) infinite;
}
@keyframes py-type {
  from {
    max-width: 0;
  }
  to {
    max-width: 12em;
  }
}
@keyframes py-blink {
  50% {
    opacity: 0;
  }
}

/* Entrances (only while a sequence runs: at rest everything is simply there). */
[data-sequence][data-step] .py-rise:not(.is-on) {
  transform: translateY(0.9em) scale(0.98);
}
[data-sequence][data-step] .py-slide:not(.is-on) {
  transform: translateX(-1.2em);
}
[data-sequence][data-step] .py-drop:not(.is-on) {
  transform: translateY(-0.9em) scale(0.97);
}
[data-sequence][data-step] .py-phone[data-seq-from]:not(.is-on) {
  transform: translateY(10%) rotate(3deg);
}

/* =====================================================================================
   /payments/ — three ways in, one balance, one payout
   ===================================================================================== */
.py-hero {
  padding-bottom: 128px;
}
.py-hero__grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}
.py-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.4em minmax(0, 0.95fr);
  grid-template-rows: auto auto;
  row-gap: 1.6em;
}
.py-flow__label {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  margin-bottom: -0.6em;
  font-size: 0.74em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.py-flow__ins {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.8em;
}
.py-src {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.7em;
  row-gap: 0.55em;
  padding: 0.85em 0.9em;
  border-radius: 0.95em;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.04),
    0 20px 40px -22px rgba(5, 8, 20, 0.65);
}
.py-src__text {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  min-width: 0;
}
.py-src__text b {
  font-size: 0.95em;
}
.py-src__text small {
  color: var(--py-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.py-src__foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5em;
  border-top: 1px dashed var(--py-line);
}
.py-src__foot b {
  font-size: 1.05em;
  font-variant-numeric: tabular-nums;
}
.py-flow__wires {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.py-wire {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.py-wire--run {
  stroke: var(--mint-300);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 22 78;
  stroke-dashoffset: 100;
  opacity: 0;
}
.py-wire--run.is-at {
  opacity: 1;
  animation: py-run 1.1s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes py-run {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: -22;
  }
}
.py-bal {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  padding: 1.2em 1.15em;
  border-radius: 1.1em;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.04),
    0 30px 60px -26px rgba(5, 8, 20, 0.75);
}
.py-bal__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.py-bal__label {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--py-mute);
}
.py-bal__amt {
  display: block;
  font-size: 2.35em;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.py-bal__bar {
  display: flex;
  gap: 0.2em;
  height: 0.55em;
  border-radius: 99em;
  background: var(--ink-50);
  overflow: hidden;
}
.py-bal__bar i {
  flex: 0 0 var(--w);
  border-radius: 99em;
  background: var(--tp-blue);
  transform-origin: left;
}
.py-bal__bar i.py-seg--mint {
  background: var(--tp-mint);
}
.py-bal__bar i.py-seg--lilac {
  background: #8b7cf6;
}
[data-sequence][data-step] .py-bal__bar i:not(.is-on) {
  transform: scaleX(0);
}
.py-bal__rows {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  font-size: 0.82em;
}
.py-bal__rows > span {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55em;
  color: var(--ink-600);
}
.py-bal__rows i {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--tp-blue);
}
.py-bal__rows i.py-seg--mint {
  background: var(--tp-mint);
}
.py-bal__rows i.py-seg--lilac {
  background: #8b7cf6;
}
.py-bal__rows b {
  color: var(--py-ink);
  font-variant-numeric: tabular-nums;
}
.py-payout {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(3em, 1fr) auto auto;
  align-items: center;
  gap: 0.8em;
  padding: 0.85em 1em;
  border-radius: 1em;
  background: var(--tp-midnight);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 30px 60px -26px rgba(5, 8, 20, 0.8);
}
.py-payout .py-chip {
  background: rgba(255, 255, 255, 0.1);
  color: var(--mint-300);
}
.py-payout__text {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}
.py-payout__text small {
  color: var(--ink-300);
  white-space: nowrap;
}
.py-payout__track {
  position: relative;
  height: 0.3em;
  border-radius: 99em;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.py-payout__track i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-400), var(--tp-mint));
  transform-origin: left;
}
.py-payout__track i.is-at {
  animation: py-fill 1.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes py-fill {
  from {
    transform: scaleX(0);
  }
}
.py-payout > b {
  font-size: 1.15em;
  font-variant-numeric: tabular-nums;
}
.py-payout .py-badge--warn {
  background: rgba(255, 138, 91, 0.18);
  color: var(--sunrise-300);
}
.py-payout .py-badge--ok {
  background: rgba(0, 209, 167, 0.18);
  color: var(--mint-300);
}
/* The link from the balance down to the payout. */
.py-payout::before {
  content: "";
  position: absolute;
  right: 22%;
  bottom: 100%;
  width: 1.5px;
  height: 1.6em;
  background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.35));
}

/* The three ways, as cards with a picture each. */
.py-ways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.py-way {
  padding: 0;
  overflow: hidden;
  gap: 0;
}
.py-way__art {
  position: relative;
  display: grid;
  place-items: center;
  height: 240px;
  padding: 24px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, #f6f8ff 0%, var(--blue-50) 100%);
  border-bottom: 1px solid var(--ink-100);
}
.py-way__art::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 60%;
  height: 120%;
  right: -18%;
  top: -40%;
  border-radius: 24px;
  transform: skewY(-22deg);
  background: linear-gradient(160deg, var(--blue-200) 0%, var(--blue-400) 100%);
  opacity: 0.45;
}
.py-way__art--mint {
  background: linear-gradient(160deg, #effcf8 0%, #e3f9f3 100%);
}
.py-way__art--mint::before {
  background: linear-gradient(160deg, var(--mint-200) 0%, var(--mint-400) 100%);
}
.py-way__art--lilac {
  background: linear-gradient(160deg, #f7f5ff 0%, var(--tp-lilac) 100%);
}
.py-way__art--lilac::before {
  background: linear-gradient(160deg, #cfc6ff 0%, #9d8ff8 100%);
}
.py-way__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px 30px;
  flex: 1;
}
.py-way__body .link-arrow {
  margin-top: auto;
}
.py-way__body p {
  color: var(--text-secondary);
}
/* The mini mock-ups inside those cards are drawn in px: they never scale. */
.py-mini {
  width: 100%;
  max-width: 250px;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.05),
    0 18px 36px -18px rgba(11, 16, 32, 0.35);
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-900);
}
.py-mini .icon {
  width: 16px;
  height: 16px;
}
.py-mini__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.py-mini__brand i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--tp-midnight);
  color: #fff;
  font-style: normal;
  font-size: 11px;
}
.py-mini__amt {
  margin: 8px 0 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.py-mini__field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--ink-200);
  color: var(--ink-600);
  font-size: 12px;
}
.py-mini__btn {
  margin-top: 8px;
  padding: 9px;
  border-radius: 8px;
  background: var(--tp-blue);
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
}
.py-mini--link {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 12px;
  align-items: center;
}
.py-mini--link .qr {
  width: 76px;
  height: 76px;
  border-radius: 6px;
}
.py-mini__url {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--mint-50);
  color: var(--mint-800, #00594a);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.py-mini__meta {
  display: block;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 12px;
}
.py-mini__rows {
  display: flex;
  flex-direction: column;
}
.py-mini__rows > span {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--ink-100);
  font-size: 12px;
}
.py-mini__rows > span:first-child {
  border-top: 0;
}
.py-mini__rows small {
  color: var(--ink-500);
  font-size: 11px;
}
.py-mini__rows .py-badge {
  font-size: 10px;
}

/* Everything around the payment: tiles. */
.py-kit {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.py-kit--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.py-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 26px 28px;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
}
.section--cloud .py-tile {
  border-color: transparent;
}
.py-tile h3 {
  font-size: var(--fs-body-lg);
  line-height: 1.3;
}
.py-tile p {
  color: var(--text-secondary);
  font-size: var(--fs-label);
  line-height: 1.55;
}
.py-tile__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
}
.py-tile__icon--mint {
  background: var(--mint-50);
  color: var(--mint-700);
}
.py-tile__icon--lilac {
  background: #efebff;
  color: #5b3fd6;
}
.py-tile__icon--sunrise {
  background: var(--sunrise-50);
  color: var(--sunrise-700);
}
.py-tile--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px 20px;
}
.py-tile--wide .py-tile__icon {
  margin: 0;
}
.py-tile__events {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.py-tile__events code {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  font-size: 12px;
  color: var(--blue-700);
  white-space: nowrap;
}
.py-tile--feature {
  background: linear-gradient(160deg, var(--blue-600) 0%, var(--tp-midnight) 100%);
  border-color: transparent;
  color: #fff;
}
.py-tile--feature p {
  color: var(--ink-200);
}
.py-tile--feature .py-tile__icon {
  background: rgba(255, 255, 255, 0.12);
  color: var(--mint-300);
}
.py-tile--feature a {
  color: var(--mint-300);
}

/* =====================================================================================
   Sub-page heroes: the light page hero, made deeper
   ===================================================================================== */
.py-phero {
  padding: 88px 0 96px;
  background:
    radial-gradient(50% 60% at 90% 10%, rgba(59, 91, 255, 0.1) 0%, rgba(59, 91, 255, 0) 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(0, 209, 167, 0.1) 0%, rgba(0, 209, 167, 0) 70%),
    linear-gradient(180deg, var(--ink-50) 0%, var(--surface-card) 100%);
}
.py-phero::after {
  display: none;
}
.py-phero .page-hero__grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
}
.py-phero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--fs-label);
  color: var(--ink-600);
}
.py-phero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.py-phero__meta .icon {
  color: var(--mint-600);
}

/* ---- Checkout: the API call, the pay page, the bank's check, the webhook ---- */
.py-co {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13.2em;
  grid-template-rows: auto 1fr auto;
  column-gap: 1.6em;
  row-gap: 1.1em;
  align-items: start;
}
.py-co__call {
  grid-column: 1;
  grid-row: 1;
}
.py-co__phone {
  grid-column: 2;
  grid-row: 1 / 4;
  margin-top: 0.4em;
}
.py-co__hook {
  grid-column: 1;
  grid-row: 3;
}
/* A notification banner over the top of the phone. */
.py-notif {
  position: absolute;
  z-index: 3;
  top: 7%;
  left: 4%;
  right: 4%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55em;
  align-items: center;
  padding: 0.6em 0.65em;
  border-radius: 1em;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.06),
    0 18px 36px -14px rgba(11, 16, 32, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.68em;
  line-height: 1.3;
}
.py-notif > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}
.py-notif small {
  font-size: 0.9em;
  color: var(--py-mute);
}
.py-notif .py-chip {
  width: 2.4em;
  height: 2.4em;
  border-radius: 0.6em;
}
[data-sequence][data-step] .py-notif:not(.is-on) {
  transform: translateY(-1.2em);
}
.py-co__arrow {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--blue-700);
}
.py-co__arrow::before {
  content: "";
  flex: 1;
  height: 1.5px;
  background: repeating-linear-gradient(90deg, var(--blue-300) 0 0.5em, transparent 0.5em 0.9em);
  order: 2;
}
.py-co__arrow .icon {
  order: 3;
  color: var(--blue-400);
}

/* ---- Links: create, share, paid ---- */
.py-ln {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12em;
  column-gap: 1.2em;
  align-items: start;
}
.py-ln__win {
  grid-column: 1;
  grid-row: 1;
  margin-top: 3.4em;
}
.py-ln__phone {
  grid-column: 2;
  grid-row: 1;
}
.py-ln__table {
  display: flex;
  flex-direction: column;
  font-size: 0.74em;
}
.py-ln__tr {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 0.8fr 0.8fr 0.5fr 0.9fr;
  gap: 0.6em;
  align-items: center;
  padding: 0.7em 0.2em;
  border-top: 1px solid var(--py-line);
}
.py-ln__tr--head {
  border-top: 0;
  padding-top: 0;
  color: var(--py-mute);
  font-weight: 600;
  font-size: 0.92em;
}
.py-ln__tr > :nth-child(4),
.py-ln__tr > :nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.py-ln__tr small {
  display: block;
  color: var(--py-mute);
}
.py-ln__tr--new {
  margin: 0 -0.6em;
  padding-left: 0.8em;
  padding-right: 0.8em;
  border-radius: 0.6em;
  background: var(--blue-50);
  border-top-color: transparent;
}
.py-ln__actions {
  display: flex;
  gap: 0.5em;
  margin-top: 0.8em;
  font-size: 0.9em;
}
.py-ln__dialog {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0.6em;
  background: rgba(11, 16, 32, 0.32);
}
.py-ln__form {
  width: 100%;
  max-width: 19em;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  padding: 1.1em;
  border-radius: 0.9em;
  background: #fff;
  box-shadow: 0 30px 60px -20px rgba(11, 16, 32, 0.6);
  font-size: 0.76em;
}
.py-ln__form > b {
  font-size: 1.1em;
}
.py-ln__form > small {
  margin-top: -0.4em;
  color: var(--py-mute);
}
.py-ln__field {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  font-size: 0.86em;
  font-weight: 600;
}
.py-ln__input {
  display: block;
  padding: 0.55em 0.65em;
  border-radius: 0.5em;
  border: 1px solid var(--ink-200);
  font-weight: 450;
  color: var(--py-ink);
}
.py-ln__input.is-at {
  border-color: var(--tp-blue);
  box-shadow: 0 0 0 3px rgba(59, 91, 255, 0.18);
}
.py-ln__check {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.86em;
}
.py-ln__check i {
  display: grid;
  place-items: center;
  width: 1.1em;
  height: 1.1em;
  border-radius: 0.25em;
  background: var(--tp-blue);
  color: #fff;
}
.py-ln__check .icon {
  width: 0.85em;
  height: 0.85em;
  stroke-width: 3;
}
.py-ln__formfoot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
  margin-top: 0.3em;
}
.py-ln__formfoot .py-btn {
  position: relative;
  overflow: hidden;
}
.py-ln__qr {
  position: absolute;
  z-index: 3;
  left: 1.4em;
  top: 1.2em;
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.6em 0.8em 0.6em 0.6em;
  border-radius: 0.9em;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.06),
    0 24px 48px -20px rgba(11, 16, 32, 0.45);
  font-size: 0.86em;
}
.py-ln__qr .qr {
  width: 3.6em;
  height: 3.6em;
  border-radius: 0.3em;
}
.py-ln__qr span {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}
.py-ln__qr small {
  color: var(--py-mute);
}
.py-ln__feed {
  position: absolute;
  z-index: 3;
  left: 4.5em;
  bottom: 1.4em;
  width: 17em;
}
/* The merchant's app: one row of the Home feed. */
.py-feed {
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  padding: 0.8em 0.9em;
  border-radius: 1em;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.06),
    0 24px 48px -20px rgba(11, 16, 32, 0.5);
  font-size: 0.9em;
}
.py-feed__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--py-mute);
}
.py-feed__live {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.py-feed__live::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--tp-mint);
  box-shadow: 0 0 0 0.2em rgba(0, 209, 167, 0.2);
}
.py-feed__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65em;
}
.py-feed__row .py-chip {
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: #dff8f1;
  color: #00745d;
}
.py-feed__row > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}
.py-feed__row small {
  color: var(--py-mute);
}
.py-feed__amt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2em;
  font-variant-numeric: tabular-nums;
}
/* The customer's messages: the link, as it arrives. */
.py-pay__screens > .py-msgs {
  justify-content: flex-start;
  gap: 0.5em;
  background: #fff;
}
.py-msgs__who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--ink-100);
  font-size: 0.75em;
  font-weight: 600;
}
.py-msgs__who i {
  display: grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  background: var(--mint-600);
  color: #fff;
  font-style: normal;
  font-size: 1.1em;
}
.py-msgs__time {
  align-self: center;
  font-size: 0.62em;
  color: var(--ink-400);
}
.py-bubble {
  max-width: 85%;
  padding: 0.55em 0.75em;
  border-radius: 1em 1em 1em 0.3em;
  background: #eceef4;
  font-size: 0.8em;
}
.py-bubble--link {
  padding: 0;
  overflow: hidden;
  background: #eceef4;
}
.py-bubble__card {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  padding: 0.6em 0.75em;
}
.py-bubble__card small {
  color: var(--ink-500);
}
.py-bubble__hero {
  display: flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.8em 0.75em;
  background: linear-gradient(135deg, var(--mint-500), var(--tp-blue));
  color: #fff;
  font-weight: 650;
}
.py-bubble__hero i {
  display: grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 0.4em;
  background: rgba(255, 255, 255, 0.22);
  font-style: normal;
}
.py-bubble.is-at {
  animation: py-press 0.45s ease both;
}

/* ---- Subscriptions: a renewal, a decline, the way back ---- */
.py-sb {
  padding-bottom: 6.5em;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12em;
  column-gap: 1.2em;
  align-items: start;
}
.py-sb__win {
  grid-column: 1;
  grid-row: 1;
  margin-top: 0.4em;
}
.py-sb__phone {
  grid-column: 2;
  grid-row: 1;
  margin-top: 2.2em;
}
.py-sb__who {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7em;
  padding-bottom: 0.9em;
  border-bottom: 1px solid var(--py-line);
}
.py-sb__who > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}
.py-sb__who small {
  color: var(--py-mute);
  white-space: nowrap;
}
.py-sb__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6em;
  padding: 0.8em 0;
}
.py-sb__facts > span {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding: 0.55em 0.7em;
  border-radius: 0.6em;
  background: var(--ink-50);
  font-size: 0.86em;
}
.py-sb__facts small {
  color: var(--py-mute);
}
.py-tl {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  padding-left: 0.2em;
}
.py-tl::before {
  content: "";
  position: absolute;
  left: 0.95em;
  top: 0.8em;
  bottom: 0.8em;
  width: 1.5px;
  background: var(--py-line);
}
.py-tl__item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.7em;
  font-size: 0.86em;
}
.py-tl__dot {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: #dff8f1;
  color: #00745d;
  box-shadow: 0 0 0 0.25em #fff;
}
.py-tl__dot .icon {
  width: 1em;
  height: 1em;
  stroke-width: 2.4;
}
.py-tl__dot--warn {
  background: #ffe8e6;
  color: #b42318;
}
.py-tl__dot--mail {
  background: var(--blue-50);
  color: var(--blue-600);
}
.py-tl__item > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding-top: 0.1em;
}
.py-tl__item small {
  color: var(--py-mute);
}
.py-tl__item .py-code-chip {
  align-self: flex-start;
  margin-top: 0.2em;
  font-size: 0.72em;
}
.py-tl__when {
  padding-top: 0.2em;
  font-size: 0.86em;
  color: var(--py-mute);
  white-space: nowrap;
}
.py-sb__pdf {
  position: absolute;
  z-index: 3;
  left: 9em;
  bottom: 1.6em;
  width: 22em;
  padding: 1.1em 1.2em 1em;
  border-radius: 0.5em;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(11, 16, 32, 0.06),
    0 30px 60px -24px rgba(11, 16, 32, 0.55);
  font-size: 0.68em;
  transform: rotate(-3deg);
}
[data-sequence][data-step] .py-sb__pdf:not(.is-on) {
  transform: rotate(-3deg) translateY(1.5em);
}
.py-sb__pdf::after {
  content: "PDF";
  position: absolute;
  top: -0.7em;
  left: -0.7em;
  padding: 0.25em 0.55em;
  border-radius: 0.4em;
  background: #e5484d;
  color: #fff;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.py-sb__pdfhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--py-line);
}
.py-sb__pdfhead b {
  font-size: 1.1em;
}
.py-sb__pdfhead span {
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1em;
  text-align: right;
}
.py-sb__pdfhead small {
  color: var(--py-mute);
}
.py-sb__pdfline {
  display: flex;
  justify-content: space-between;
  gap: 0.8em;
  padding-top: 0.55em;
}
.py-sb__pdfline small {
  color: var(--py-mute);
}
.py-sb__pdfline--total {
  margin-top: 0.4em;
  padding-top: 0.5em;
  border-top: 1px solid var(--py-line);
  font-weight: 650;
}
.py-sb__mail {
  justify-content: flex-start;
  background: #fff;
}
.py-sb__mailhead {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--ink-100);
  font-size: 0.78em;
}
.py-sb__mailhead small {
  color: var(--ink-500);
}
.py-sb__mail p {
  margin: 0;
  font-size: 0.72em;
  line-height: 1.45;
  color: var(--ink-700);
}
.py-sb__mail h4 {
  margin: 0.2em 0 0;
  font-size: 0.95em;
  letter-spacing: -0.01em;
}
.py-sb__toast {
  position: absolute;
  z-index: 3;
  left: -1em;
  top: -1.4em;
}

/* Below the heroes */
.py-howto {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
}
.py-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: py-step;
}
.py-steps > div {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 18px 0;
}
.py-steps > div + div {
  border-top: 1px solid var(--ink-100);
}
.py-steps .step__num {
  grid-row: span 2;
}
.py-steps p {
  color: var(--text-secondary);
}
/* Checkout's two ways to take the card: embedded (first, highlighted) and hosted. */
.py-entries {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}
.py-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 32px;
  border-radius: var(--radius-panel);
  background: var(--surface-card);
  box-shadow: 0 0 0 1px var(--ink-100);
}
.py-entry--main {
  box-shadow:
    0 0 0 2px var(--tp-blue),
    0 30px 60px -30px rgba(59, 91, 255, 0.45);
}
.py-entry p {
  color: var(--text-secondary);
}
.py-entry .code {
  align-self: stretch;
  margin-top: auto;
}
.py-steps--row {
  flex-direction: row;
  gap: 32px;
  margin-top: 48px;
}
.py-steps--row > div {
  flex: 1 1 0;
}
.py-steps--row > div + div {
  border-top: 0;
}
/* The card fields in the checkout mock-up, mounted by @tuppence/js on the merchant's page. */
.py-pay__card--embed {
  position: relative;
  margin-top: 0.4em;
  box-shadow: 0 0 0 1.5px var(--mint-500);
  outline: 1px dashed var(--mint-500);
  outline-offset: 0.3em;
}
/* The wallets Stripe's Payment Element offers where the device has them. */
.py-pay__wallets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45em;
}
.py-pay__wallet {
  padding: 0.55em 0.4em;
  border-radius: 0.6em;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink-200);
  color: var(--ink-900);
  font-size: 0.72em;
  font-weight: 650;
  text-align: center;
  white-space: nowrap;
}
.py-pay__wallet--dark {
  background: var(--ink-900);
  box-shadow: none;
  color: #fff;
}
.py-pay__embedtag {
  position: absolute;
  top: -0.85em;
  right: 0.6em;
  padding: 0.1em 0.5em;
  border-radius: var(--radius-pill);
  background: var(--mint-500);
  color: var(--ink-900);
  font-size: 0.58em;
  font-weight: 700;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.py-pocket {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 48px 32px;
}
.py-pocket .device {
  width: 230px;
}
.py-appqr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  height: 100%;
  padding: 2.2em 1.4em;
  background: #fff;
  font-size: calc(100cqw / 17);
  text-align: center;
  color: var(--tp-midnight);
}
.py-appqr img {
  width: 6em;
  height: auto;
  margin-bottom: 1.2em;
}
.py-appqr b {
  font-size: 1.15em;
}
.py-appqr__amt {
  font-size: 2em;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.4em;
}
.py-appqr .qr {
  width: 11em;
  height: 11em;
}
.py-appqr small {
  margin-top: 0.8em;
  font-size: 0.72em;
  color: var(--ink-500);
}
.py-pocket__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 240px;
}

/* ---- Responsive ---- */
/* A narrow stage: the flow turns to a column, so its type can stay readable. */
@container (max-width: 520px) {
  .py-flow {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1em;
    font-size: calc(100cqw / 25);
    padding: 1.3em 1.1em 4em;
  }
  .py-flow__label,
  .py-flow__wires,
  .py-payout::before,
  .py-payout__track,
  .py-src__foot .py-badge {
    display: none;
  }
  .py-flow__ins {
    gap: 0.6em;
  }
  .py-src {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding: 0.7em 0.8em;
  }
  .py-src__foot {
    grid-column: auto;
    border: 0;
    padding: 0;
  }
  .py-payout {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 1100px) {
  .py-hero__grid,
  .py-phero .page-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .py-hero .py-stage,
  .py-phero .py-stage {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
  }
  .py-kit--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .py-ways,
  .py-kit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .py-howto,
  .py-entries {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .py-steps--row {
    flex-direction: column;
    gap: 8px;
  }
  .py-steps--row > div + div {
    border-top: 1px solid var(--ink-100);
  }
  .py-tile--wide {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .py-tile__events {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  .py-ways,
  .py-kit,
  .py-kit--4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .py-phero {
    padding: 64px 0 72px;
  }
  .py-hero {
    padding-bottom: 88px;
  }
  .py-pocket {
    flex-direction: column;
    padding: 32px 16px;
  }
  .py-pocket__side {
    max-width: none;
  }
  .py-toggle {
    right: 10px;
    bottom: 10px;
  }
}

/* /payments/: the payouts tile, two by two, with the Balance page in miniature. */
.py-tile--big {
  grid-column: span 2;
  grid-row: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 32px;
}
.py-tile__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.py-tile--big p {
  font-size: var(--fs-body);
}
.py-mini--bal {
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}
.py-mini__k {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 600;
}
.py-mini__k--sep {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--ink-100);
}
.py-mini__big {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.py-mini__kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-600);
}
.py-mini__kv b {
  color: var(--ink-900);
}
.py-mini__po {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.py-mini__po > i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--blue-50);
  color: var(--blue-600);
}
.py-mini__po > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}
.py-mini__po small {
  color: var(--ink-500);
  font-size: 11px;
}
.py-mini__po .py-badge {
  font-size: 10px;
}
@media (max-width: 1100px) {
  .py-tile--big {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .py-tile--big {
    grid-row: auto;
  }
}
@media (max-width: 640px) {
  .py-tile--big {
    grid-column: auto;
    padding: 24px;
  }
}

/* Checkout: the merchant's own basket, before the pay page. */
.py-pay__line {
  display: flex;
  justify-content: space-between;
  gap: 0.6em;
  font-size: 0.8em;
}
.py-pay__line--total {
  margin-top: 0.2em;
  padding-top: 0.5em;
  border-top: 1px solid var(--ink-100);
  font-size: 0.9em;
}
.py-pay__btn--ink {
  background: var(--tp-midnight);
}

/* Links: the merchant's own messages are on the right, in their colour. */
.py-bubble--me {
  align-self: flex-end;
  border-radius: 1em 1em 0.3em 1em;
  background: var(--tp-blue);
  color: #fff;
}
.py-bubble--link {
  padding: 0.55em 0.75em;
  background: var(--tp-blue);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.py-pocket .py-feed {
  font-size: 14px;
}
.py-pocket .py-feed .icon,
.py-pocket .py-ln__check .icon {
  width: 16px;
  height: 16px;
}
.py-pocket .py-chip {
  width: 30px;
  height: 30px;
}
.py-pocket .py-btn {
  align-self: flex-start;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
}
.py-pocket .py-ln__check i {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.py-pocket .py-feed__live::before {
  width: 8px;
  height: 8px;
}
.py-pocket .py-badge {
  font-size: 11px;
}

/* Narrow stages (phones): the window or code goes full width, and the phone overlaps it
   from below, so the type stays readable instead of shrinking with the whole picture. */
@container (max-width: 520px) {
  .py-co,
  .py-ln,
  .py-sb {
    grid-template-columns: minmax(0, 1fr);
    font-size: calc(100cqw / 24);
    padding: 1.4em 1.1em 4.4em;
  }
  .py-co__arrow {
    display: none;
  }
  .py-co__phone,
  .py-ln__phone,
  .py-sb__phone {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    width: 12.5em;
  }
  .py-co__phone {
    margin-top: 1em;
  }
  /* The React component sits under the phone, so the payment form it shows stays in view. */
  .py-co__hook {
    grid-column: 1;
    grid-row: 3;
  }
  .py-ln__win {
    margin-top: 5.2em;
  }
  .py-ln__phone {
    margin-top: -4em;
  }
  .py-ln__qr {
    left: 1.1em;
    top: 1.2em;
  }
  .py-ln__feed {
    left: 1.1em;
    bottom: 6em;
    width: 14em;
  }
  .py-sb {
    padding-bottom: 4.4em;
  }
  .py-sb__phone {
    margin-top: -0.6em;
  }
  .py-sb__pdf {
    left: 1.1em;
    bottom: 6em;
  }
}

/* ---- Phones (mobile audit, Oct 2026) ---- */
/* The hero's payout row: "To your bank •••• 6789" ran under the amount on a narrow stage. */
@container (max-width: 520px) {
  .py-payout__text {
    min-width: 0;
  }
  .py-payout__text small {
    white-space: normal;
  }
}
/* The payouts mock: on a phone the badge goes under the amount, so "To your bank" keeps its
   line instead of breaking word by word. */
@media (max-width: 420px) {
  .py-mini__po {
    grid-template-columns: auto minmax(0, 1fr) auto;
    row-gap: 2px;
  }
  .py-mini__po > i,
  .py-mini__po > span:nth-child(2) {
    grid-row: span 2;
  }
  .py-mini__po .py-badge {
    grid-column: 3;
    justify-self: end;
  }
}
