/* Quick recharge (case-study-modern-experience-quick-recharge).
   Markup: site/content/quick-recharge.mjs (card, hero, anatomy, demo) and
   site/content/pages/case-study-modern-experience-quick-recharge.mjs (story figures).
   Behaviour: assets/js/quick-recharge.js. Shared story figures: hdfc-story.css.

   1. The card: Figma frame 2323:5033 (558 × 574). Every length is a Figma pixel
      times --u, so one geometry serves the hero (scaled to its column), the still
      card in the anatomy, and the working demo (--u: 1px).
   2. The hero scene (.qrh): the card in 3D. Layers float at their own depths; the
      script only swaps state classes. Only transform and opacity animate.
   3. The still card and its numbered pins (.qrs).
   4. The working demo (.qrd), with its phone layout (container query).
   5. Story figures: glass spots and product schematics, with short words.
   The card is product UI, so it stays white in both site themes. */

@property --u { syntax: "<length>"; inherits: true; initial-value: 1px; }

/* ==========================================================================
   1. The card
   ========================================================================== */

.qr-card {
  --qr-blue: #1c3fca;
  --qr-ink: #111827;
  --qr-support: #545964;
  --qr-grey: #6b7280;
  --qr-line: #ecedf3;
  --qr-out: cubic-bezier(.16, 1, .3, 1);
  --qr-move: cubic-bezier(.65, 0, .35, 1);
  --qr-spring: cubic-bezier(.34, 1.56, .64, 1);
  --qr-in: cubic-bezier(.7, 0, .84, 0);
  --k: 0;
  position: relative;
  width: calc(var(--u) * 558);
  height: calc(var(--u) * 574);
  color: var(--qr-ink);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: calc(var(--u) * 14);
  font-weight: 400;
  line-height: calc(var(--u) * 20);
  letter-spacing: 0;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.qr-card[data-kind="1"] { --k: 1; }
.qr-card[data-kind="2"] { --k: 2; }
.qr-card *, .qr-card *::before, .qr-card *::after { box-sizing: border-box; }
.qr-card img { display: block; max-width: none; min-height: 0; object-fit: fill; filter: none; }

.qr-card__base {
  position: absolute;
  inset: 0;
  border: 1px solid var(--qr-line);
  border-radius: calc(var(--u) * 16);
  background: #fff;
}
.qr-title {
  position: absolute;
  left: calc(var(--u) * 24);
  top: calc(var(--u) * 24);
  margin: 0;
  color: var(--qr-ink);
  font-family: inherit;
  font-size: calc(var(--u) * 20);
  font-weight: 600;
  line-height: calc(var(--u) * 28);
  letter-spacing: 0;
}

/* The person: masked by the design's own rounded rectangle (Rectangle 48117831).
   Figma places it at x 392.002, 166.961 wide, so it runs 0.963px past the card's
   right edge. The box stops at the edge (558); the mask keeps its full Figma
   width so its corners are not squeezed, and the box clips the rest. */
.qr-person {
  position: absolute;
  left: calc(var(--u) * 392.002);
  top: calc(var(--u) * 84);
  width: calc(var(--u) * 165.998);
  height: calc(var(--u) * 332);
  overflow: hidden; /* the mask clips paint, not layout: keep the glow from widening the page */
  -webkit-mask: url(../images/case-studies/hdfc-recharge/person-mask.svg) 0 0 / calc(var(--u) * 166.961) 100% no-repeat;
  mask: url(../images/case-studies/hdfc-recharge/person-mask.svg) 0 0 / calc(var(--u) * 166.961) 100% no-repeat;
}
.qr-card .qr-person__glow {
  position: absolute;
  left: calc(var(--u) * 14.746);
  top: calc(var(--u) * 32.932);
  width: calc(var(--u) * 259.6);
  height: calc(var(--u) * 331.7);
  opacity: .3;
  filter: blur(calc(var(--u) * 40)) !important;
}
.qr-card .qr-person__img {
  position: absolute;
  left: calc(var(--u) * -259.278);
  top: calc(var(--u) * .684);
  width: calc(var(--u) * 516.31);
  height: calc(var(--u) * 331.7);
}
/* Screen over the phone in his hand: Figma 432, 178 on the card (Rectangle 48117834) */
.qr-phone {
  position: absolute;
  left: calc(var(--u) * 39.998);
  top: calc(var(--u) * 94);
  width: calc(var(--u) * 29.7034);
  height: calc(var(--u) * 57);
}
.qr-card .qr-phone__screen { position: absolute; inset: 0; width: 100%; height: 100%; }
.qr-card .qr-phone__rupee {
  position: absolute;
  left: calc(var(--u) * 7.732);
  top: calc(var(--u) * 18.693);
  width: calc(var(--u) * 15.7207);
  height: calc(var(--u) * 19.1089);
  transition: opacity .2s ease, transform .3s var(--qr-out);
}
.qr-phone__state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: calc(var(--u) * 17);
  opacity: 0;
  transform: scale(.55);
  -webkit-mask: url(../images/case-studies/hdfc-recharge/phone-screen.svg) 0 0 / 100% 100% no-repeat;
  mask: url(../images/case-studies/hdfc-recharge/phone-screen.svg) 0 0 / 100% 100% no-repeat;
  transition: opacity .22s ease, transform .5s var(--qr-spring);
}
.qr-phone__state i { display: block; line-height: 1; }
.qr-phone__state--ok { background: #12b76a; }
.qr-phone__state--bad { background: #f79009; }
.qr-card.is-ok .qr-phone__state--ok,
.qr-card.is-bad .qr-phone__state--bad { opacity: 1; transform: none; }
.qr-card.is-ok .qr-phone__rupee,
.qr-card.is-bad .qr-phone__rupee { opacity: 0; transform: scale(.6); }

/* Bills & Recharges strip */
.qr-bills {
  position: absolute;
  left: 0;
  top: calc(var(--u) * 380);
  width: calc(var(--u) * 558);
  height: calc(var(--u) * 194);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 16);
  padding: calc(var(--u) * 24) calc(var(--u) * 22);
  border-radius: calc(var(--u) * 16);
  background: linear-gradient(160.83deg, #7454f2 0%, #583dd0 98%);
  color: #fff;
  overflow: hidden;
}
.qr-bills__title {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: calc(var(--u) * 20);
  font-weight: 600;
  line-height: calc(var(--u) * 28);
  letter-spacing: 0;
}
.qr-bills__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}
.qr-bill { display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 8); width: calc(var(--u) * 80); margin: 0; }
.qr-bill__icon {
  display: grid;
  place-items: center;
  width: calc(var(--u) * 60);
  height: calc(var(--u) * 60);
  border-radius: calc(var(--u) * 20);
  background: #fff;
}
.qr-card .qr-bill__icon img { width: calc(var(--u) * 38); height: calc(var(--u) * 38); }
.qr-bill__label { width: calc(var(--u) * 80); color: #fff; font-size: calc(var(--u) * 12); line-height: calc(var(--u) * 20); text-align: center; }

/* The form: segmented control, field, button */
.qr-form {
  position: absolute;
  left: calc(var(--u) * 34.853);
  top: calc(var(--u) * 76);
  width: calc(var(--u) * 314);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 24);
  margin: 0;
}

/* Sectional buttons. 4 + 90 + 18 + 90 + 18 + 90 + 4 = 314; separators sit in the 18. */
.qr-seg {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 18);
  padding: calc(var(--u) * 4);
  border-radius: calc(var(--u) * 8);
  background: #f3f4f6;
}
.qr-seg__ind {
  position: absolute;
  left: calc(var(--u) * 4);
  top: calc(var(--u) * 4);
  width: calc(var(--u) * 90);
  height: calc(var(--u) * 84);
  border-radius: calc(var(--u) * 8);
  background: #fff;
  box-shadow: 0 calc(var(--u) * 1) calc(var(--u) * 2.5) rgba(16, 24, 40, .1);
  transform: translateX(calc(var(--u) * 108 * var(--k)));
  transition: transform .4s var(--qr-move);
}
.qr-seg__sep {
  position: absolute;
  left: calc(var(--u) * (102 + var(--s) * 108));
  top: calc(var(--u) * 16);
  width: calc(var(--u) * 2);
  height: calc(var(--u) * 60);
  background: #fff;
}
.qr-seg__btn {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 8);
  width: calc(var(--u) * 90);
  margin: 0;
  padding: calc(var(--u) * 8);
  border: 0;
  border-radius: calc(var(--u) * 8);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.qr-seg__icon { position: relative; display: block; width: calc(var(--u) * 40); height: calc(var(--u) * 40); }
.qr-tint {
  display: block;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.qr-seg__glyph {
  position: absolute;
  left: calc(var(--u) * 8);
  top: calc(var(--u) * 8);
  width: calc(var(--u) * 24);
  height: calc(var(--u) * 24);
  transition: opacity .22s ease;
}
.qr-seg__glyph--off { background-color: var(--qr-grey); }
.qr-seg__glyph--on { background-color: var(--qr-blue); opacity: 0; }
.qr-seg__label { display: grid; width: 100%; height: calc(var(--u) * 20); }
.qr-seg__off, .qr-seg__on { grid-area: 1 / 1; text-align: center; white-space: nowrap; transition: opacity .22s ease; }
.qr-seg__off { color: var(--qr-support); font-size: calc(var(--u) * 12); line-height: calc(var(--u) * 20); }
.qr-seg__on { color: var(--qr-blue); font-size: calc(var(--u) * 14); font-weight: 600; line-height: calc(var(--u) * 20); opacity: 0; }
.qr-seg__btn.is-on .qr-seg__glyph--off, .qr-seg__btn.is-on .qr-seg__off { opacity: 0; }
.qr-seg__btn.is-on .qr-seg__glyph--on, .qr-seg__btn.is-on .qr-seg__on { opacity: 1; }

.qr-field { position: relative; display: flex; flex-direction: column; }
.qr-field__label {
  display: grid;
  padding-bottom: calc(var(--u) * 8);
  color: var(--qr-ink);
  font-size: calc(var(--u) * 14);
  font-weight: 600;
  line-height: calc(var(--u) * 20);
}
.qr-field__name { grid-area: 1 / 1; transition: opacity .2s ease, transform .32s var(--qr-out); }
.qr-field__name:not(.is-on) { opacity: 0; transform: translateY(calc(var(--u) * 5)); }
.qr-field__box {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 6);
  height: calc(var(--u) * 40);
  padding: calc(var(--u) * 8) calc(var(--u) * 16);
  border: 1px solid #c5c5c5;
  border-radius: calc(var(--u) * 8);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.qr-field__text { display: flex; align-items: center; gap: calc(var(--u) * 6); white-space: nowrap; }
.qr-field__prefix { color: var(--qr-ink); }
.qr-caret { width: 1px; height: calc(var(--u) * 18); margin-left: -1px; background: var(--qr-blue); opacity: 0; }
.qr-field__help {
  position: absolute;
  left: 0;
  top: calc(var(--u) * 70);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 5);
  min-height: calc(var(--u) * 20);
  color: #067647;
  font-size: calc(var(--u) * 12);
  font-weight: 500;
  line-height: calc(var(--u) * 20);
  white-space: nowrap;
}
.qr-field__help i { font-size: calc(var(--u) * 12); }
.qr-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 6);
  height: calc(var(--u) * 40);
  margin: 0;
  padding: calc(var(--u) * 10) calc(var(--u) * 24);
  border: 0;
  border-radius: calc(var(--u) * 8);
  background: var(--qr-blue);
  color: #fff;
  font-family: inherit;
  font-size: calc(var(--u) * 14);
  font-weight: 600;
  line-height: calc(var(--u) * 20);
  white-space: nowrap;
  transition: transform .14s ease, background-color .15s ease;
}
/* Tap ring, run by the scripts with the Web Animations API */
.qr-btn::after, .qr-seg__btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 calc(var(--u) * 3) rgba(28, 63, 202, .45);
  opacity: 0;
  pointer-events: none;
}
.qr-btn.is-press, .qr-seg__btn.is-press { transform: scale(.96); }

/* Static (hero, still): the field starts empty, as in the frame */
.qr-card:not(.qr-card--live) .qr-field__help,
.qr-card:not(.qr-card--live) .qr-field__prefix { opacity: 0; transition: opacity .2s ease, transform .3s var(--qr-out); }
.qr-card:not(.qr-card--live) .qr-field__help { transform: translateY(calc(var(--u) * -4)); }
.qr-card.has-number .qr-field__prefix { opacity: 1; }
.qr-card.is-typing .qr-caret { animation: qr-blink 1s steps(1) infinite; }
.qr-card.is-typing .qr-field__box { border-color: var(--qr-blue); }
.qr-card.is-help .qr-field__help { opacity: 1; transform: none; }
@keyframes qr-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* Toast (hero): floats out of the phone */
.qr-toast {
  position: absolute;
  left: calc(var(--u) * 312);
  top: calc(var(--u) * 22);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 10);
  width: calc(var(--u) * 238);
  padding: calc(var(--u) * 9) calc(var(--u) * 12);
  border: 1px solid #d1fadf;
  border-radius: calc(var(--u) * 12);
  background: #fff;
  box-shadow: 0 calc(var(--u) * 14) calc(var(--u) * 30) rgba(16, 24, 40, .22);
  opacity: 0;
}
.qr-toast__tick {
  display: grid;
  flex: none;
  place-items: center;
  width: calc(var(--u) * 26);
  height: calc(var(--u) * 26);
  border-radius: 50%;
  background: #12b76a;
  color: #fff;
  font-size: calc(var(--u) * 15);
}
.qr-toast b { display: block; font-size: calc(var(--u) * 13); font-weight: 600; line-height: calc(var(--u) * 18); }
.qr-toast small { display: block; color: var(--qr-support); font-size: calc(var(--u) * 11); line-height: calc(var(--u) * 16); }

/* ==========================================================================
   2. The hero scene
   ========================================================================== */

.sf-design-preview .sf-preview-stage--live:has(> .qrh) {
  display: block; height: auto; min-height: 0; padding: 0; overflow: visible;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
.sf-design-preview .sf-preview-stage--live:has(> .qrh)::before,
.sf-design-preview .sf-preview-stage--live:has(> .qrh)::after { content: none; }

.qrh {
  container: qrh / inline-size;
  position: relative;
  width: 100%;
  overflow: clip;
  -webkit-user-select: none;
  user-select: none;
}
.qrh__scene {
  --sw: 700;
  --u: calc(100cqw / var(--sw));
  position: relative;
  height: calc(var(--u) * 650);
  perspective: calc(var(--u) * 1900);
  perspective-origin: 50% 40%;
  transition: opacity .7s ease;
}
.qrh__enter, .qrh__float, .qrh__tilt { position: absolute; inset: 0; transform-style: preserve-3d; }
.qrh__enter { transition: transform 1.3s cubic-bezier(.16, 1, .3, 1); }
.qrh__float { animation: qrh-float 8s ease-in-out infinite; }
.qrh__tilt { transform: rotateX(9deg) rotateY(-14deg); transform-origin: 50% 50%; }
@keyframes qrh-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(0deg); }
  50% { transform: translate3d(0, calc(var(--u) * -9), 0) rotateX(1.2deg); }
}
.qrh__floor {
  position: absolute;
  left: calc(var(--u) * ((var(--sw) - 520) / 2));
  top: calc(var(--u) * 560);
  width: calc(var(--u) * 520);
  height: calc(var(--u) * 100);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(14, 10, 48, .4), transparent);
  transform: translateZ(calc(var(--u) * -80));
}
.qrh .qr-card {
  position: absolute;
  left: calc(var(--u) * ((var(--sw) - 558) / 2));
  top: calc(var(--u) * 36);
  transform-style: preserve-3d;
}
.qrh .qr-card__base { box-shadow: 0 calc(var(--u) * 30) calc(var(--u) * 60) rgba(12, 10, 40, .3); }
/* Depths: the screen at 0, then the text, the form, the person, the strip, the toast */
.qrh .qr-title { transform: translateZ(calc(var(--u) * 10)); }
.qrh .qr-form { transform: translateZ(calc(var(--u) * 20)); }
.qrh .qr-person { transform: translateZ(calc(var(--u) * 32)); }
.qrh .qr-bills { transform: translateZ(calc(var(--u) * 48)); }
.qrh .qr-toast { transform: translateZ(calc(var(--u) * 100)); }

/* Entrance (script only: without it the scene is simply there) */
.qrh.is-armed:not(.is-in) .qrh__scene { opacity: 0; }
.qrh.is-armed:not(.is-in) .qrh__enter { transform: translate3d(0, calc(var(--u) * 70), calc(var(--u) * -160)) rotateX(22deg); }
.qrh.is-paused .qrh__float, .qrh.is-still .qrh__float,
.qrh.is-paused .qr-caret, .qrh.is-still .qr-caret { animation-play-state: paused; }

@container qrh (max-width: 520px) {
  .qrh__scene { --sw: 600; }
}

/* ==========================================================================
   3. The still card and its pins (anatomy)
   ========================================================================== */

.qr-anatomy { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.qr-anatomy__art {
  min-width: 0;
  padding: clamp(18px, 4vw, 36px);
  border-radius: var(--sf-r-lg);
  background:
    radial-gradient(70% 60% at 85% 20%, rgba(120, 108, 250, .22), transparent 70%),
    radial-gradient(60% 50% at 10% 100%, rgba(28, 63, 202, .14), transparent 70%),
    color-mix(in srgb, var(--sf-ink) 5%, transparent);
}
.qrs { container: qrs / inline-size; position: relative; max-width: 480px; margin-inline: auto; }
.qrs > * { --u: calc(100cqw / 558); }
.qrs .qr-card__base { box-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 24px 48px -16px rgba(16, 24, 40, .28); }
.qr-pin {
  position: absolute;
  z-index: 2;
  left: calc(var(--u) * var(--x));
  top: calc(var(--u) * var(--y));
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: #6d5ef6;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 4px rgba(109, 94, 246, .28), 0 6px 14px rgba(40, 20, 120, .35);
}

/* ==========================================================================
   4. The working demo
   ========================================================================== */

.qrd { margin: 0; min-width: 0; }
.qrd__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 14px; }
.qrd-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sf-ink) 7%, transparent);
}
.qrd-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sf-text-2);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.qrd-toggle__btn:hover { color: var(--sf-ink); }
.qrd-toggle__btn[aria-pressed="true"] { background: var(--sf-glass-strong); color: var(--sf-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.qrd-toggle__btn:focus-visible { outline: 2px solid var(--sf-accent-ink); outline-offset: 2px; }
@media (pointer: coarse) { .qrd-toggle__btn { min-height: 44px; } }
html:not(.sf-js) .qrd__bar { display: none; }
.qrd-sample {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-left: auto;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sf-accent-ink);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.qrd-sample:hover { background: color-mix(in srgb, var(--sf-ink) 7%, transparent); }
.qrd-sample:focus-visible { outline: 2px solid var(--sf-accent-ink); outline-offset: 2px; }
@media (pointer: coarse) { .qrd-sample { min-height: 44px; } }

.qrd__frame {
  padding: clamp(14px, 4vw, 40px);
  border-radius: var(--sf-r-lg);
  background:
    radial-gradient(70% 60% at 90% 10%, rgba(120, 108, 250, .2), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(28, 63, 202, .12), transparent 70%),
    color-mix(in srgb, var(--sf-ink) 5%, transparent);
}
.qrd__device {
  container: qrd / inline-size;
  max-width: 558px;
  margin-inline: auto;
}
.qrd.is-phone .qrd__device { max-width: 375px; }
.qrd .qr-card { --u: 1px; margin-inline: auto; }
.qrd .qr-card__base { box-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 24px 48px -16px rgba(16, 24, 40, .28); }
.qrd [hidden] { display: none !important; }

/* Controls that are real here */
.qrd .qr-seg__btn:focus-visible { outline: 2px solid var(--qr-blue); outline-offset: 1px; }
.qrd .qr-seg__btn:not(.is-on):hover .qr-seg__off { color: var(--qr-ink); }
.qrd .qr-field__box:focus-within { border-color: var(--qr-blue); box-shadow: 0 0 0 3px rgba(28, 63, 202, .16); }
.qrd .qr-field.is-error .qr-field__box { border-color: #d92d20; box-shadow: 0 0 0 3px rgba(217, 45, 32, .12); }
.qrd .qr-field.is-error .qr-field__help { color: #b42318; white-space: normal; }
.qrd .qr-field__help { position: static; margin-top: 4px; white-space: normal; }
.qrd .qr-field__help:empty { display: none; }
.qrd .qr-card[data-kind]:not([data-kind="0"]) .qr-field__prefix { display: none; }
.qr-field__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--qr-ink);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
}
.qr-field__input::placeholder { color: #9ca3af; opacity: 1; }
.qrd .qr-btn { cursor: pointer; }
.qrd .qr-btn:hover:not(:disabled) { background: #1733a8; }
.qrd .qr-btn:focus-visible { outline: 2px solid var(--qr-blue); outline-offset: 2px; }
.qrd .qr-btn:disabled { opacity: .55; cursor: default; }
.qr-btn--ghost { background: #fff !important; color: var(--qr-blue); box-shadow: inset 0 0 0 1px var(--qr-blue); }
.qr-btn--ghost:hover { background: #f4f6ff !important; }

/* Steps after Proceed. Plans take the full width (the person steps aside); the
   wait and the result keep the left column, so the phone in his hand shows the state. */
.qrd-step {
  position: absolute;
  left: 34.853px;
  top: 76px;
  width: 314px;
  height: 290px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}
.qrd-step--choose { left: 24px; width: 510px; gap: 0; }
.qr-person { transition: opacity .3s ease, transform .45s var(--qr-out); }
.qrd .qr-card[data-step="choose"] .qr-person { opacity: 0; transform: translateX(28px); transition-timing-function: ease, var(--qr-in); }
.qrd .qr-card[data-step="paying"] .qr-phone__rupee { animation: qr-pulse 1s ease-in-out infinite; }
@keyframes qr-pulse { 50% { opacity: .35; transform: scale(.86); } }

.qrd-who { display: flex; align-items: center; gap: 12px; }
.qrd-back {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--qr-line);
  border-radius: 50%;
  background: #fff;
  color: var(--qr-ink);
  font-size: 16px;
  cursor: pointer;
}
.qrd-back:hover { background: #f3f4f6; }
.qrd-back:focus-visible { outline: 2px solid var(--qr-blue); outline-offset: 2px; }
.qrd-who__id { display: block; font-size: 16px; font-weight: 600; line-height: 24px; outline: 0; }
.qrd-who__op { display: block; color: var(--qr-support); font-size: 12px; line-height: 18px; }

.qrd-plans { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qrd-plans__legend { margin: 0 0 8px; padding: 0; color: var(--qr-support); font-size: 12px; font-weight: 600; line-height: 18px; }
.qrd-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 12px 12px;
  border: 1px solid var(--qr-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.qrd-plan input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.qrd-plan:hover { border-color: #b8c3f2; }
.qrd-plan:has(input:checked) { border-color: var(--qr-blue); background: #f4f6ff; box-shadow: inset 0 0 0 1px var(--qr-blue); }
.qrd-plan:has(input:focus-visible) { outline: 2px solid var(--qr-blue); outline-offset: 2px; }
.qrd-plan__tag {
  align-self: flex-start;
  margin-bottom: 4px;
  padding: 1px 7px;
  border-radius: 6px;
  background: #ede9fe;
  color: #3b2a9a;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}
.qrd-plan__tag--none { visibility: hidden; }
.qrd-plan__price { font-size: 18px; font-weight: 700; line-height: 24px; }
.qrd-plan__main { font-size: 13px; font-weight: 600; line-height: 18px; }
.qrd-plan__sub { color: var(--qr-support); font-size: 12px; line-height: 16px; }
.qrd-plans-enter > .qrd-plan { animation: qrd-rise .42s var(--qr-out) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes qrd-rise { from { opacity: 0; transform: translateY(10px); } }

.qrd-pay { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.qrd-from { display: inline-flex; align-items: center; gap: 6px; color: var(--qr-support); font-size: 12px; line-height: 18px; }
.qrd-pay .qr-btn { min-width: 160px; }

.qrd-step--wait { align-items: flex-start; justify-content: center; }
.qrd-spin {
  width: 34px;
  height: 34px;
  border: 3px solid #e0e6fb;
  border-top-color: var(--qr-blue);
  border-radius: 50%;
  animation: qrd-spin .9s linear infinite;
}
@keyframes qrd-spin { to { transform: rotate(1turn); } }
.qrd-step__head { display: flex; align-items: center; gap: 10px; }
.qrd-step__title { margin: 0; color: var(--qr-ink); font-family: inherit; font-size: 16px; font-weight: 600; line-height: 24px; letter-spacing: 0; outline: 0; }
.qrd-step__text { margin: 0; color: var(--qr-support); font-size: 13px; line-height: 20px; }
.qrd-step__text strong { color: var(--qr-ink); font-weight: 600; }
.qrd-step--wait .qr-btn { align-self: stretch; margin-top: 8px; }
.qrd-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  animation: qrd-pop .5s var(--qr-spring) both;
}
.qrd-badge--ok { background: #12b76a; }
.qrd-badge--warn { background: #f79009; }
@keyframes qrd-pop { from { opacity: 0; transform: scale(.4); } }

.qrd-receipt { display: grid; gap: 8px; margin: 4px 0 0; padding: 12px 14px; border-radius: 10px; background: #f8f9fb; }
.qrd-receipt div { display: flex; justify-content: space-between; gap: 12px; }
.qrd-receipt dt { color: var(--qr-support); font-size: 12px; line-height: 20px; }
.qrd-receipt dd { margin: 0; font-size: 13px; font-weight: 600; line-height: 20px; text-align: right; }
.qrd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }

.qrd-refund { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.qrd-refund li { display: flex; align-items: flex-start; gap: 8px; color: var(--qr-support); font-size: 12px; line-height: 18px; }
.qrd-refund li > i { display: grid; flex: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #f3f4f6; color: var(--qr-grey); font-size: 11px; }
.qrd-refund li.is-done { color: var(--qr-ink); }
.qrd-refund li.is-done > i { background: #dcfae6; color: #067647; }
.qrd-refund small { display: block; color: var(--qr-support); font-size: 11px; line-height: 16px; }

/* Phone width: the same component, stacked. The person has no room and steps out. */
@container qrd (max-width: 557px) {
  .qrd .qr-card {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px 0;
    border-radius: 16px;
    overflow: hidden;
  }
  .qrd .qr-title, .qrd .qr-form, .qrd .qrd-step, .qrd .qr-bills {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
  }
  .qrd .qr-person { display: none; }
  .qrd .qr-title { font-size: 18px; line-height: 26px; }
  .qrd .qr-form { gap: 24px; }
  .qrd .qr-seg__btn { flex: 1 1 0; width: auto; min-width: 0; }
  .qrd .qr-seg__ind { width: calc((100% - 44px) / 3); transform: translateX(calc(var(--k) * (100% + 18px))); }
  .qrd .qr-seg__sep { left: calc(4px + (100% - 44px) / 3 + 8px + var(--s) * ((100% - 44px) / 3 + 18px)); }
  .qrd .qrd-step { min-height: 0; gap: 12px; }
  .qrd .qrd-step--choose { gap: 0; }
  .qrd .qrd-plans { grid-template-columns: 1fr; gap: 8px; }
  .qrd .qrd-plan { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "price tag" "price main" "price sub"; column-gap: 14px; align-items: center; }
  .qrd .qrd-plan__tag { grid-area: tag; margin: 0; }
  .qrd .qrd-plan__tag--none { display: none; }
  .qrd .qrd-plan__price { grid-area: price; font-size: 20px; }
  .qrd .qrd-plan__main { grid-area: main; }
  .qrd .qrd-plan__sub { grid-area: sub; }
  .qrd .qrd-pay { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 14px; }
  .qrd .qrd-pay .qr-btn { min-width: 0; }
  .qrd .qrd-actions { margin-top: 6px; }
  .qrd .qr-bills { margin: 8px -16px 0; padding: 20px 16px 22px; gap: 14px; border-radius: 16px 16px 0 0; }
  .qrd .qr-bills__title { font-size: 18px; line-height: 26px; }
  .qrd .qr-bill { flex: 1 1 0; width: auto; min-width: 0; }
  .qrd .qr-bill__icon { width: 48px; height: 48px; border-radius: 16px; }
  .qrd .qr-bill__icon img { width: 30px; height: 30px; }
  .qrd .qr-bills__row { gap: 6px; }
  .qrd .qr-bill__label { width: auto; font-size: 10.5px; line-height: 15px; letter-spacing: -.01em; }
}

/* ==========================================================================
   5. Story figures: pictures first, short words beside them
   Glass spots (.qr-spot, 144 × 96) and product schematics (.qr-flat) come from
   site/lib/recharge-illustrations.mjs. A .qr-vis tile plays its spot's story on
   hover or keyboard focus, like the glass cards elsewhere on the site.
   ========================================================================== */

.qr-spot { width: 100%; max-width: 220px; height: auto; aspect-ratio: 144 / 96; margin-inline: auto; }
.qr-flat { display: block; width: 100%; height: auto; }
.qr-flat__spin { transform-box: view-box; transform-origin: 36px 34px; }
@media (prefers-reduced-motion: no-preference) {
  .qr-flat__spin { animation: qrd-spin 1.4s linear infinite; }
  .qr-vis:is(:hover, :focus-within) .sg-h-pop    { animation: sg-pop .9s var(--sg-spring) var(--sg-d, 0s) both; }
  .qr-vis:is(:hover, :focus-within) .sg-h-bump   { animation: sg-bump .7s var(--sg-sway) var(--sg-d, 0s) both; }
  .qr-vis:is(:hover, :focus-within) .sg-h-nudge  { animation: sg-nudge .8s var(--sg-sway) var(--sg-d, 0s) both; }
  .qr-vis:is(:hover, :focus-within) .sg-h-stamp  { animation: sg-stamp .8s var(--sg-sway) var(--sg-d, 0s) both; }
  .qr-vis:is(:hover, :focus-within) .sg-h-drop   { animation: sg-drop .85s var(--sg-spring) var(--sg-d, 0s) both; }
  .qr-vis:is(:hover, :focus-within) .sg-h-tilt   { animation: sg-tilt 1.5s var(--sg-sway) var(--sg-d, 0s) both; }
}

/* Shared tile surface */
.qr-story > li, .qr-topups > li, .qr-moves > li, .qr-options > li, .qr-teams > li, .qr-goals > li {
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-r-md);
  background: var(--sf-glass);
}
.qr-story, .qr-topups, .qr-moves, .qr-options, .qr-teams, .qr-goals, .qr-pills, .qr-film__steps, .qr-film__ends { margin: 0; padding: 0; list-style: none; }
.qr-story strong, .qr-topups h3, .qr-moves strong, .qr-options strong, .qr-teams strong, .qr-goals strong, .qr-film strong, .qr-carry strong { color: var(--sf-ink); font-size: 1rem; font-weight: 650; line-height: 1.4; }
.qr-story p, .qr-topups p, .qr-teams p { margin: 0; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }

/* The story in four pictures: a strip that reads left to right */
.qr-story { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: qr-story; }
.qr-story > li { position: relative; display: grid; align-content: start; gap: 6px; padding: 14px 18px 20px; }
.qr-story > li:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 64px;
  z-index: 1;
  width: 10px;
  height: 10px;
  border: solid var(--sf-muted);
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.qr-story__art { display: block; margin: 0 -6px 4px; }
.qr-story__k { color: var(--sf-muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.qr-story > li:last-child { background: linear-gradient(160deg, color-mix(in srgb, var(--sf-accent) 14%, transparent), transparent 80%), var(--sf-glass); }

/* Top-ups, explained */
.qr-topups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qr-topups > li { display: grid; align-content: start; justify-items: start; gap: 8px; padding: 16px 22px 22px; }
.qr-topups__art { display: block; width: 100%; margin-bottom: 4px; }
.qr-topups h3 { margin: 0; font-size: 1.125rem; }
.qr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sf-accent) 14%, transparent);
  color: var(--sf-ink);
  font-size: .8125rem;
  font-weight: 600;
}
.qr-chip i { color: var(--sf-accent-ink); }
.qr-bench {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 0;
  padding: 8px 24px 8px 8px;
  border: 1px dashed var(--sf-line-strong);
  border-radius: var(--sf-r-md);
  color: var(--sf-text-2);
  font-size: .9375rem;
  line-height: 1.5;
}
.qr-bench strong { color: var(--sf-ink); }
.qr-bench__art { flex: none; width: 132px; }

/* The problem: one number, then the same task two ways */
.qr-problem { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: stretch; }
.qr-stat, .qr-lanes { margin: 0; padding: 24px 26px; border: 1px solid var(--sf-line); border-radius: var(--sf-r-lg); background: var(--sf-glass); }
.qr-stat { display: grid; grid-template-columns: minmax(90px, 130px) minmax(0, 1fr); gap: 22px; align-items: center; }
.qr-waffle { display: block; width: 100%; height: auto; }
.qr-waffle__cell { fill: none; stroke: var(--sf-line-strong); stroke-width: 1; }
.qr-waffle__cell.is-on { fill: var(--sf-accent); stroke: none; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .qr-waffle__cell.is-on { animation: qr-cell linear both; animation-timeline: view(); animation-range: entry calc(var(--i) * .35%) entry calc(30% + var(--i) * .35%); }
  }
}
@keyframes qr-cell { from { opacity: .15; } to { opacity: 1; } }
.qr-stat figcaption { display: grid; gap: 8px; }
.qr-stat b { color: var(--sf-ink); font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.qr-stat figcaption > span { color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }
.qr-stat__key { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: .8125rem !important; }
.qr-stat__key i { display: inline-block; width: 9px; height: 14px; margin-right: -8px; border: 1px solid var(--sf-line-strong); border-radius: 2px; vertical-align: -2px; }
.qr-stat__key i.is-on { border: 0; background: var(--sf-accent); }
.qr-stat__src { font-size: .8125rem !important; }

.qr-lanes { display: grid; align-content: start; gap: 14px; }
.qr-lanes figcaption { color: var(--sf-muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.qr-lane { display: grid; gap: 8px; }
.qr-lane__who { color: var(--sf-ink); font-size: .9375rem; font-weight: 650; }
.qr-lane ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.qr-lane li {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  color: var(--sf-ink);
  font-size: .875rem;
  font-weight: 550;
  line-height: 1.2;
}
.qr-lane li:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -15px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border: solid var(--sf-muted);
  border-width: 1.6px 1.6px 0 0;
  transform: rotate(45deg);
}
.qr-lane.is-app li { background: color-mix(in srgb, var(--sf-ok) 14%, transparent); }
.qr-lane.is-app li i { color: var(--sf-ok); }
.qr-lane.is-bank li { background: color-mix(in srgb, var(--sf-warn) 14%, transparent); }
.qr-lane.is-bank li i { color: var(--sf-warn); }
.qr-lanes__note { margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--sf-line); color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }

/* Goals: an icon, a goal, and its test */
.qr-goals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.qr-goals > li { display: grid; align-content: start; gap: 10px; padding: 20px; }
.qr-goals__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--sf-accent) 16%, transparent);
  color: var(--sf-accent-ink);
  font-size: 20px;
}
.qr-goals__test { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--sf-line); color: var(--sf-text-2); font-size: .875rem; line-height: 1.45; }
.qr-goals__test > i { flex: none; color: var(--sf-muted); }
.qr-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qr-pills li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--sf-ink) 7%, transparent); color: var(--sf-text); font-size: .875rem; font-weight: 550; }
.qr-pills i { color: var(--sf-accent-ink); }

/* Findings to design moves: a finding (glass), an arrow, the card part (schematic) */
.qr-moves { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.qr-moves > li { display: grid; grid-template-rows: auto auto 1fr; overflow: hidden; }
.qr-moves__saw, .qr-moves__did { display: grid; align-content: start; justify-items: start; gap: 6px; padding: 14px 18px 18px; }
.qr-moves__art { display: block; width: 100%; }
.qr-moves__src { padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--sf-ink) 8%, transparent); color: var(--sf-text-2); font-size: .75rem; font-weight: 600; }
.qr-moves__arrow { display: grid; place-items: center; height: 0; color: var(--sf-accent-ink); font-size: 1.1rem; }
.qr-moves__arrow i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sf-bg); box-shadow: 0 0 0 1px var(--sf-line); }
.qr-moves__did { padding-top: 22px; background: color-mix(in srgb, var(--sf-accent) 9%, transparent); }
.qr-moves__ui { display: block; width: 100%; aspect-ratio: 4 / 3; margin: 0 0 6px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--sf-ink) 6%, transparent); }
.qr-moves__ui .qr-flat { width: 100%; height: 100%; }
.qr-moves__cost { display: flex; gap: 7px; margin-top: 2px; color: var(--sf-text-2); font-size: .8125rem; line-height: 1.45; }
.qr-moves__cost i { flex: none; color: var(--sf-warn); }

/* The decision: three options as wireframes */
.qr-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qr-options > li { display: grid; align-content: start; justify-items: start; gap: 6px; padding: 16px 20px 20px; }
.qr-options > li:not(.is-picked) .qr-options__ui { opacity: .72; filter: saturate(.6); }
.qr-options > li.is-picked { border-color: color-mix(in srgb, var(--sf-accent) 55%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--sf-accent) 14%, transparent), transparent 80%), var(--sf-glass); }
.qr-options__ui { display: block; width: 100%; margin-bottom: 8px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--sf-ink) 6%, transparent); }
.qr-options__tag { display: inline-flex; align-items: center; gap: 6px; color: var(--sf-muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.qr-options > li.is-picked .qr-options__tag { color: var(--sf-ok); }
.qr-options > li > span:last-child { color: var(--sf-text-2); font-size: .9375rem; line-height: 1.45; }
.qr-trade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
.qr-trade > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--sf-r-md); }
.qr-trade .is-gain { background: color-mix(in srgb, var(--sf-ok) 10%, transparent); }
.qr-trade .is-cost { background: color-mix(in srgb, var(--sf-warn) 10%, transparent); }
.qr-trade dt { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--sf-ink); font-size: .875rem; font-weight: 700; }
.qr-trade .is-gain dt i { color: var(--sf-ok); }
.qr-trade .is-cost dt i { color: var(--sf-warn); }
.qr-trade dd { margin: 0; padding: 4px 11px; border-radius: 999px; background: var(--sf-glass-strong); color: var(--sf-text); font-size: .8125rem; }

/* The flow after Proceed: a filmstrip that forks at the end */
.qr-film { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.25fr); gap: 28px; align-items: center; padding: 26px 28px; border-radius: var(--sf-r-lg); background: radial-gradient(70% 70% at 15% 0%, color-mix(in srgb, var(--sf-accent) 16%, transparent), transparent 70%), color-mix(in srgb, var(--sf-ink) 5%, transparent); }
.qr-film__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.qr-film__steps > li, .qr-film__ends > li { position: relative; display: grid; align-content: start; justify-items: center; gap: 4px; text-align: center; }
.qr-film__steps > li::after {
  content: '';
  position: absolute;
  right: -19px;
  top: 34%;
  width: 9px;
  height: 9px;
  border: solid var(--sf-muted);
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.qr-film__ui { display: block; width: 100%; max-width: 118px; margin-bottom: 8px; filter: drop-shadow(0 10px 18px rgba(16, 24, 40, .18)); }
.qr-film strong { font-size: .9375rem; }
.qr-film li span:not(.qr-film__ui) { color: var(--sf-text-2); font-size: .875rem; line-height: 1.4; }
.qr-film__ends { position: relative; display: grid; gap: 14px; padding-left: 22px; border-left: 2px dashed var(--sf-line-strong); }
.qr-film__ends > li { grid-template-columns: 64px minmax(0, 1fr); align-items: center; justify-items: start; gap: 12px; text-align: left; }
.qr-film__ends .qr-film__ui { margin: 0; }
.qr-film__ends > li > span:last-child { display: grid; gap: 2px; }
.qr-film__ends .is-ok strong { color: var(--sf-ok); }
.qr-film__ends .is-warn strong { color: var(--sf-warn); }

/* Three teams, three agreements */
.qr-teams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qr-teams > li { display: grid; align-content: start; gap: 6px; padding: 14px 22px 22px; }
.qr-teams__art { display: block; width: 100%; margin-bottom: 4px; }

/* Before and after */
.qr-ba { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 8px; align-items: center; }
.qr-ba figure { display: grid; gap: 12px; margin: 0; padding: 20px 22px; border: 1px solid var(--sf-line); border-radius: var(--sf-r-lg); background: var(--sf-glass); }
.qr-ba figure.is-after { border-color: color-mix(in srgb, var(--sf-accent) 50%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--sf-accent) 12%, transparent), transparent 80%), var(--sf-glass); }
.qr-ba__ui { display: block; width: 100%; max-width: 260px; margin-inline: auto; }
.qr-ba figcaption { display: grid; gap: 2px; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.45; text-align: center; }
.qr-ba figcaption b { color: var(--sf-ink); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.qr-ba__arrow { display: grid; place-items: center; color: var(--sf-accent-ink); font-size: 1.4rem; }

/* The same idea in other products */
.qr-carry { margin-top: 16px; padding: 22px 26px 24px; border: 1px solid var(--sf-line); border-radius: var(--sf-r-lg); background: var(--sf-glass); }
.qr-carry h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--sf-ink); font-size: var(--sf-fs-h3); }
.qr-carry h3 i { color: var(--sf-accent-ink); }
.qr-carry ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.qr-carry li { display: grid; align-content: start; gap: 4px; padding: 8px 16px 16px; border-radius: var(--sf-r-md); background: color-mix(in srgb, var(--sf-accent) 9%, transparent); color: var(--sf-text-2); font-size: .9375rem; line-height: 1.45; }
.qr-carry__art { display: block; width: 100%; }

@media (max-width: 1080px) {
  .qr-moves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qr-film { grid-template-columns: minmax(0, 1fr); }
  .qr-film__ends { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 0 0; border-left: 0; border-top: 2px dashed var(--sf-line-strong); }
}
@media (max-width: 960px) {
  .qr-story, .qr-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qr-story > li:nth-child(2)::after { display: none; }
  .qr-problem { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .qr-anatomy { grid-template-columns: minmax(0, 1fr); }
  .qr-topups, .qr-options, .qr-teams, .qr-carry ul { grid-template-columns: minmax(0, 1fr); }
  .qr-topups > li, .qr-teams > li { grid-template-columns: 132px minmax(0, 1fr); column-gap: 18px; align-items: center; }
  .qr-topups__art, .qr-teams__art { grid-row: span 3; margin: 0; }
  .qr-carry li { grid-template-columns: 110px minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .qr-carry__art { grid-row: span 2; }
  .qr-trade { grid-template-columns: minmax(0, 1fr); }
  .qr-ba { grid-template-columns: minmax(0, 1fr); }
  .qr-ba__arrow { transform: rotate(90deg); height: 32px; }
}
@media (max-width: 560px) {
  .qr-story, .qr-goals, .qr-moves { grid-template-columns: minmax(0, 1fr); }
  .qr-moves .qr-spot { max-width: 150px; }
  .qr-moves__saw, .qr-moves__did { justify-items: stretch; }
  .qr-moves__ui { max-width: 220px; margin-inline: auto; }
  .qr-story > li::after { display: none; }
  .qr-story > li { grid-template-columns: 112px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 10px 14px 14px 8px; }
  .qr-story__art { grid-row: span 3; margin: 0; }
  .qr-topups > li, .qr-teams > li { grid-template-columns: 104px minmax(0, 1fr); padding: 12px 16px 16px 10px; }
  .qr-stat { grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 20px; }
  .qr-lanes { padding: 20px; }
  .qr-bench { padding: 8px 16px 8px 4px; gap: 10px; }
  .qr-bench__art { width: 96px; }
  .qr-film { padding: 20px 16px; }
  .qr-film__steps { gap: 18px; }
  .qr-film__steps > li::after { right: -13px; }
  .qr-film__ends { grid-template-columns: minmax(0, 1fr); }
  .qrd-sample { margin-left: 0; }
}

/* ==========================================================================
   Reduced motion, forced colours
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .qr-card *, .qr-card *::before, .qr-card *::after,
  .qrh *, .qrd * { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .qr-card__base, .qr-seg__ind, .qr-field__box, .qrd-plan, .qr-bill__icon { border: 1px solid CanvasText; }
  .qr-seg__btn.is-on { outline: 3px solid Highlight; }
  .qr-btn { border: 1px solid ButtonText; }
  .qrd-plan:has(input:checked) { outline: 3px solid Highlight; }
}
