:root {
  --paper: #ffffff;
  --ink: #0e0f11;
  --on-ink: #f6f6f3;
  --soft: #74757b;
  --line: rgba(14, 15, 17, .12);
  --accent: #c6f432;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.pay {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 999px;
  display: block;
}
.pay:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
/* GSAP scales this element; the pieces inside are laid out in pixels by the script */
.pay__body {
  position: relative;
  display: block;
  width: min(320px, calc(100vw - 48px));
  height: clamp(54px, 10vmin, 60px);
  will-change: transform;
}
.pay__whole {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--ink);
  box-shadow:
    0 1px 0 rgba(255,255,255,.14) inset,
    0 -1px 0 rgba(0,0,0,.4) inset,
    0 14px 28px -16px rgba(14,15,17,.55),
    0 2px 6px -3px rgba(14,15,17,.35);
}
.pay__segs { position: absolute; inset: 0; }
.pay__seg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow:
    0 0 0 1px var(--edge, transparent) inset,
    0 1px 0 rgba(255,255,255,.12) inset,
    0 12px 24px -16px rgba(14,15,17,.5),
    0 2px 5px -3px rgba(14,15,17,.3);
  opacity: 0;
}
.pay__fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.pay__text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1px;
  line-height: 1.1;
}
.pay__amt {
  display: block;
  font-size: clamp(14px, 2.5vmin, 16px);
  font-variation-settings: 'wght' 600, 'wdth' 96;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.pay__when {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 1.25em;
  font-size: clamp(10.5px, 1.8vmin, 11.5px);
  font-variation-settings: 'wght' 480, 'wdth' 100;
  opacity: .62;
  white-space: nowrap;
}
.pay__check { width: 1.1em; height: 1.1em; overflow: visible; flex: none; }
.pay__check path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pay__seams { position: absolute; inset: 0; pointer-events: none; }
.pay__seam {
  position: absolute;
  /* two short notches at the top and bottom edges: they never cross the words */
  top: 9%;
  bottom: 9%;
  width: 1px;
  background: linear-gradient(to bottom, rgba(246,246,243,.42) 0 20%, transparent 20% 80%, rgba(246,246,243,.42) 80% 100%);
  transform-origin: 50% 50%;
  transform: scaleY(0);
}
.pay__rest {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vmin, 14px);
  color: var(--on-ink);
  font-size: clamp(15.5px, 2.7vmin, 17.5px);
  white-space: nowrap;
}
.pay__label, .pay__total { display: block; will-change: transform; }
.pay__label { font-variation-settings: 'wght' 580, 'wdth' 100; letter-spacing: -0.005em; }
.pay__rule { width: 1px; height: 1.05em; background: rgba(246,246,243,.3); flex: none; }
.pay__total { font-variation-settings: 'wght' 520, 'wdth' 94; opacity: .78; }
.pay__status {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
