:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --testo: #17161c;
  --testo-2: #5d5a66;
  --testo-3: #a3a0ab;
  --linea: #ecebf0;
  --traccia: #f5f4f8;
  --accento: #3b3fc4;        /* the single accent: ink blue, on the pill and the confirmed card */
  --accento-scuro: #2a2d9c;
  --accento-velo: #eef0ff;
  --ombra: 26, 24, 60;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { font-size: clamp(12px, min(3.5vw, 3.1vh), 17px); }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stage { min-height: 100vh; display: grid; place-items: center; padding: 1em; }

.card {
  position: relative;
  width: min(21em, 92vw);
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: 1.3em;
  padding: 1.2em 1.2em 1.2em;
  box-shadow: 0 1px 2px rgba(var(--ombra), .04), 0 22px 48px -30px rgba(var(--ombra), .32);
  overflow: hidden;
}
.card__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .9em; }
.shop { font-weight: 650; font-stretch: 105%; letter-spacing: -.01em; }
.step { font-size: .78em; color: var(--testo-3); }

.rows { list-style: none; border-top: 1px solid var(--linea); }
.row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75em; padding: .7em 0; border-bottom: 1px solid var(--linea); }
.thumb { width: 2.5em; height: 2.5em; border-radius: .7em; background: var(--traccia); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(var(--ombra), .05); }
.thumb svg { width: 1.4em; height: 1.4em; fill: none; stroke: var(--testo-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.row__text { display: grid; gap: .1em; min-width: 0; }
.row__name { font-weight: 600; font-size: .92em; }
.row__meta { font-size: .76em; color: var(--testo-3); }
.row__price { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: .86em; font-weight: 600; }

.total { display: flex; justify-content: space-between; align-items: baseline; padding: .85em 0 1em; color: var(--testo-2); font-size: .92em; }
.total__sum { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-weight: 700; color: var(--testo); font-size: 1.08em; }

.action { position: relative; height: 3.3em; }
.morph {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  border-radius: 1.65em;
  background: linear-gradient(180deg, #4a4ed6, var(--accento) 60%, var(--accento-scuro));
  box-shadow: 0 10px 22px -10px rgba(59, 63, 196, .55), inset 0 1px 0 rgba(255,255,255,.22);
  z-index: 0;
  will-change: transform, width, height, left, top, border-radius;
}
.pill {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  color: #fff; font-weight: 640; font-size: 1.02em;
  border-radius: 1.65em;
  outline: none;
}
.pill:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accento); }
.pill__label { display: inline-flex; align-items: baseline; gap: .45em; font-stretch: 100%; white-space: nowrap; }
.pill__dot { opacity: .55; }
.pill__work { position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: rgba(255,255,255,.22); overflow: hidden; opacity: 0; }
.pill__work span { position: absolute; top: 0; bottom: 0; left: 0; width: 34%; border-radius: 2px; background: #fff; }

.done {
  position: absolute; inset: 0; z-index: 2;
  display: grid; align-content: center; justify-items: center; gap: .45em;
  padding: 1.4em; text-align: center; color: #fff;
  pointer-events: none; visibility: hidden;
}
.done.is-on { pointer-events: auto; visibility: visible; }
.done__check { width: 3.4em; height: 3.4em; margin-bottom: .4em; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.done__check circle { stroke: rgba(255,255,255,.4); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; }
.done__check path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.done__title { font-size: 1.5em; font-weight: 680; font-stretch: 110%; letter-spacing: -.02em; }
.done__code { font-size: .86em; color: rgba(255,255,255,.72); }
.done__label { text-transform: uppercase; letter-spacing: .12em; font-size: .78em; }
.code { font-family: "JetBrains Mono Variable", ui-monospace, monospace; color: #fff; font-weight: 600; letter-spacing: .04em; display: inline-flex; }
.code i { font-style: normal; display: inline-block; min-width: .62em; text-align: center; }
.done__when { font-size: .95em; color: rgba(255,255,255,.86); }
.done__when strong { font-weight: 650; color: #fff; }
.done__sum { font-size: .76em; color: rgba(255,255,255,.6); padding-top: .55em; margin-top: .3em; border-top: 1px solid rgba(255,255,255,.18); }
.done__back { margin-top: .7em; font-size: .84em; font-weight: 600; padding: .55em 1.1em; border-radius: 2em; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); color: #fff; }
.done__back:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) { .done__back:hover { background: rgba(255,255,255,.22); } }
