:root {
  --bg: #ffffff;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.58);
  --line: rgba(23, 23, 26, 0.12);
  --bad: #d9432f;
  --good: #128a5e;
  --tone: var(--bad);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.pf { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: min(340px, 100%); padding: 16px 16px 16px; border-radius: 22px; background: color-mix(in srgb, var(--tone) 5%, #ffffff); box-shadow: inset 0 0 0 1.500px color-mix(in srgb, var(--tone) 38%, transparent), 0 26px 40px -28px color-mix(in srgb, var(--tone) 60%, transparent); overflow: hidden; transition: background-color 0.4s, box-shadow 0.4s; }
.pf[data-state="paid"] { --tone: var(--good); }
.pf__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.pf__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--tone); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 16px -10px var(--tone); transition: background-color 0.4s, box-shadow 0.4s; }
.pf__icon svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.700; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.pf__tick { stroke-width: 2.300; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pf__text { display: grid; gap: 3px; }
.pf__title { display: block; height: 20px; overflow: hidden; font-size: 15.500px; line-height: 20px; font-weight: 720; letter-spacing: -0.008em; white-space: nowrap; }
.pf__title span { display: block; }
.pf__body { min-height: 34px; font-size: 12.500px; line-height: 1.36; color: var(--soft); }
.pf__body span { display: block; }

.pf__tries { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.pf__bars { display: flex; gap: 4px; }
.pf__bars i { display: block; width: 26px; height: 5px; border-radius: 3px; background: rgba(23, 23, 26, 0.13); transition: background-color 0.3s; }
.pf__bars i.is-bad { background: var(--bad); }
.pf__bars i.is-good { background: var(--good); }
.pf__count { display: block; height: 16px; overflow: hidden; font-size: 12px; line-height: 16px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.pf__count span { display: block; }

.pf__actions { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 6px; }
.pf__main { position: relative; width: 148px; height: 44px; border-radius: 22px; background: var(--ink); color: #ffffff; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 18px -12px rgba(23, 23, 26, 0.7); }
.pf__main:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.pf__face { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13.500px; font-weight: 700; white-space: nowrap; opacity: 0; font-variant-numeric: tabular-nums; }
.pf__face[data-face="retry"] { opacity: 1; }
.pf__link { height: 44px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 660; color: var(--ink); }
.pf__link:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
@media (hover: hover) { .pf__link:hover { background: rgba(23, 23, 26, 0.06); } }

/* the new charge runs along the bottom edge */
.pf__run { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }

.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (prefers-reduced-motion: reduce) { .pf, .pf__icon, .pf__bars i { transition: none; } }
