/* The payment and its agent are one persistent object throughout the walkthrough. */
.pj-art {
  --custody-ink: #123b2e;
  --custody-muted: #365b49;
  --custody-jade: #006f5e;
  container: payment-custody / inline-size;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  align-self: start;
  width: 100%;
  max-width: 600px;
  min-width: 0;
  margin: 0;
  padding: 30px 0 10px;
  color: var(--custody-ink);
  font-family: 'Geist', Arial, sans-serif;
}

.pj-art *, .pj-art *::before, .pj-art *::after { box-sizing: border-box; }

.pj-art .pj-custody-object {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: min(calc(100% - 36px), 370px);
  min-width: 0;
  min-height: 260px;
  padding: 24px;
  border: 1px solid #a6bfb0;
  border-radius: 17px;
  background:
    linear-gradient(118deg, #ffffffb0 0%, #ffffff00 40%, #ffffff35 40.5%, #ffffff00 41.5%),
    linear-gradient(138deg, #f5faf2 2%, #e1eee0 43%, #bfd9c7 100%);
  box-shadow:
    inset 1px 1px 0 #ffffffed,
    inset -1px -1px 0 #5f93783d,
    1px 2px 0 #e9eee7,
    2px 4px 0 #88a391,
    3px 6px 0 #315d48,
    4px 7px 0 #c5d5c7,
    9px 25px 30px -17px #173f354f;
  transform: rotate(-3deg);
}

.pj-art .pj-custody-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 22px;
  color: var(--custody-muted);
}

.pj-art .pj-custody-id {
  font: 500 13px/1.5 var(--mono, monospace);
  letter-spacing: .065em;
}

/* Two opposed paths form the transaction mark, drawn without an image asset. */
.pj-art .pj-custody-glyph {
  position: relative;
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 22px;
  color: var(--custody-jade);
}

.pj-art .pj-custody-glyph::before,
.pj-art .pj-custody-glyph::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 7px;
  transform: skewX(35deg);
}

.pj-art .pj-custody-glyph::before {
  top: 3px;
  left: 2px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.pj-art .pj-custody-glyph::after {
  right: 2px;
  bottom: 3px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
}

.pj-art .pj-custody-amount {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 20px 0 0;
  color: var(--custody-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.pj-art .pj-custody-amount strong {
  min-width: 0;
  font-size: 60px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.07em;
  font-variant-numeric: lining-nums tabular-nums;
}

.pj-art .pj-custody-purpose {
  margin: 8px 0 0;
  color: var(--custody-muted);
  font-size: 16px;
  line-height: 1.5;
}

.pj-art .pj-custody-agent {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #73998170;
}

.pj-art .pj-custody-seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #0e634d;
  border-radius: 50%;
  background: linear-gradient(145deg, #3d7d62, #164a37);
  box-shadow: inset 0 1px 0 #c2dcc04d, 0 1px 0 #ffffffb3;
  color: #f8fbf2;
  font: 500 16px/1 'Geist', Arial, sans-serif;
  letter-spacing: -.025em;
}

.pj-art .pj-custody-agent-label,
.pj-art .pj-custody-agent-id {
  color: var(--custody-ink);
  font: 500 13px/1.5 var(--mono, monospace);
}

.pj-art .pj-custody-agent-label { max-width: 15ch; letter-spacing: .015em; }
.pj-art .pj-custody-agent-id { color: var(--custody-muted); white-space: nowrap; }

.pj-art .pj-custody-caption {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(calc(100% - 32px), 400px);
  margin-top: 35px;
  text-align: center;
}

.pj-art .pj-custody-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  color: var(--custody-jade);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.pj-art .pj-custody-status::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.pj-art .pj-custody-action {
  margin: 0;
  color: var(--custody-muted);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: balance;
}

@container payment-custody (max-width: 360px) {
  .pj-art .pj-custody-object {
    width: calc(100% - 24px);
    min-height: 242px;
    padding: 21px;
    border-radius: 14px;
    transform: rotate(-2deg);
  }

  .pj-art .pj-custody-amount { margin-top: 19px; gap: 9px; }
  .pj-art .pj-custody-amount strong { font-size: 44px; }
  .pj-art .pj-custody-agent { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; margin-top: 20px; }
  .pj-art .pj-custody-seal { width: 36px; height: 36px; }
  .pj-art .pj-custody-caption { margin-top: 30px; }
}

@container payment-custody (max-width: 290px) {
  .pj-art .pj-custody-object { padding-inline: 18px; }
  .pj-art .pj-custody-agent { grid-template-columns: 36px minmax(0, 1fr); gap: 0 10px; }
  .pj-art .pj-custody-seal { grid-row: 1 / span 2; }
  .pj-art .pj-custody-agent-label { max-width: none; }
  .pj-art .pj-custody-agent-id { grid-column: 2; margin-top: 2px; }
}
