/* Send money (case-study-modern-experience-send-money).
   Markup: site/content/pages/case-study-modern-experience-send-money.mjs and
   site/content/send-money-hero.mjs. Behaviour: assets/js/send-money.js.

   1. Shared: route colours, badges, story notes
   2. Hero scene (.smh): the Figma Send Money card with three lanes in perspective
   3. Route tracks (.smt) and the plain-language explainer (.smx)
   4. The old flow (.smw)
   5. Route logic (.sml)
   6. The working card (.smd, .smc, .smr), rebuilt from Figma node 2322:4802
   7. Results (.smres)
   8. Motion, contrast and print fallbacks

   Every animation moves transform or opacity only. Nothing that flattens 3D
   (opacity below 1, overflow, filters, masks) sits on a preserve-3d box. */

/* ==========================================================================
   1. Shared
   ========================================================================== */

.smx, .smw, .sml, .smd, .smres, .sm-insight, .smn, .smp, .smv-grid, .smo, .smk {
  /* Text-safe route colours (≥ 4.5:1 with white text, and on white). */
  --sm-upi: #0f766e;
  --sm-neft: #b45309;
  --sm-rtgs: #1c3fca;
  --sm-out: cubic-bezier(.16, 1, .3, 1);
  --sm-spring: cubic-bezier(.34, 1.56, .64, 1);
  --sm-move: cubic-bezier(.65, 0, .35, 1);
}
/* Story figures follow the site theme; the working card stays product UI. */
html.dark :is(.smx, .sml, .smres, .smn, .smp) {
  --sm-upi: #2dd4bf;
  --sm-neft: #fbbf24;
  --sm-rtgs: #93a5ff;
}

.sm-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--c, #1c3fca);
  color: #fff;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.sm-badge--upi { --c: #0f766e; }
.sm-badge--neft { --c: #b45309; }
.sm-badge--rtgs { --c: #1c3fca; }
.sm-badge--own { background: color-mix(in srgb, var(--sf-ink) 12%, transparent); color: var(--sf-ink); }
.smd .sm-badge--own { background: #eef1f6; color: #111827; }

.sm-footnote, .sm-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 16px 0 0;
  color: var(--sf-muted);
  font-size: .8125rem;
  line-height: 1.5;
}
.sm-footnote i { margin-right: 6px; }
.sm-sources a { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; color: var(--sf-accent-ink); font-weight: 600; }

.sm-insight {
  margin: 28px 0 0;
  padding: 22px 26px 24px;
  border-left: 3px solid var(--sf-accent);
  border-radius: 0 var(--sf-r-md) var(--sf-r-md) 0;
  background: color-mix(in srgb, var(--sf-accent) 8%, transparent);
}
.sm-insight p { max-width: 64ch; margin: 6px 0 0; color: var(--sf-ink); font-size: var(--sf-fs-lg); font-weight: 600; line-height: 1.5; }

.sm-takeaway { margin-top: 28px; padding: 24px 28px 26px; border-radius: var(--sf-r-lg); background: linear-gradient(135deg, #0a1f5c, #1c3fca 60%, #0f766e); color: #fff; }
.sm-takeaway .sf-eyebrow { color: rgba(255, 255, 255, .8); }
.sm-takeaway p { max-width: 62ch; margin: 8px 0 0; font-size: var(--sf-fs-lg); font-weight: 600; line-height: 1.5; }

/* Reveals run once (is-seen); loops run only in view (is-live). */
html.sf-js [data-sm-live]:not(.is-live) .smt * { animation-play-state: paused; }

/* ==========================================================================
   2. Hero scene (.smh)
   Lengths are design pixels times --u, so the scene keeps its proportions.
   ========================================================================== */

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

.sf-design-preview .sf-preview-stage--live:has(> .smh) {
  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(> .smh)::before,
.sf-design-preview .sf-preview-stage--live:has(> .smh)::after { content: none; }

.smh {
  --upi: #14b8a6;
  --neft: #f59e0b;
  --rtgs: #5b7bff;
  --out: cubic-bezier(.16, 1, .3, 1);
  container: smh / inline-size;
  position: relative;
  width: 100%;
  overflow: clip;
  color: #111827;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-user-select: none;
  user-select: none;
}
.smh *, .smh *::before, .smh *::after { box-sizing: border-box; }
.smh img { display: block; max-width: none; min-height: 0; object-fit: fill; filter: none; }

.smh__scene {
  --sw: 600;
  --u: calc(100cqw / var(--sw));
  position: relative;
  height: calc(var(--u) * 524);
  perspective: calc(var(--u) * 820);
  perspective-origin: 50% 10%;
}
.smh__world {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: smh-float 9s ease-in-out infinite;
}
.smh.is-paused .smh__world { animation-play-state: paused; }
@keyframes smh-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, calc(var(--u) * -6), 0); }
}

/* The floor: tilted back about its near edge, so its far end recedes. */
.smh__floor {
  position: absolute;
  left: calc(var(--u) * 50);
  top: calc(var(--u) * -358);
  width: calc(var(--u) * 500);
  height: calc(var(--u) * 620);
  transform-origin: 50% 100%;
  transform: rotateX(64deg);
  transform-style: preserve-3d;
}
.smh__ground {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--u) * 30);
  background:
    linear-gradient(to right, rgba(148, 170, 255, .1) 1px, transparent 1px) 0 0 / calc(var(--u) * 50) calc(var(--u) * 50),
    linear-gradient(to bottom, rgba(148, 170, 255, .1) 1px, transparent 1px) 0 0 / calc(var(--u) * 50) calc(var(--u) * 50),
    radial-gradient(70% 45% at 50% 100%, rgba(79, 107, 255, .38), transparent 70%),
    linear-gradient(to top, #15276f, #0b1542 60%, #070d2b);
  box-shadow: inset 0 0 0 1px rgba(148, 170, 255, .16);
  -webkit-mask-image: linear-gradient(to top, #000 50%, transparent 100%);
  mask-image: linear-gradient(to top, #000 50%, transparent 100%);
}

/* Lanes */
.smh-lane { position: absolute; top: calc(var(--u) * 30); bottom: 0; width: calc(var(--u) * 96); margin-left: calc(var(--u) * -48); }
.smh-lane--upi, .smh-mover--upi { --c: var(--upi); left: 16.667%; }
.smh-lane--neft, .smh-mover--neft, .smh-mover--batch { --c: var(--neft); left: 50%; }
.smh-lane--rtgs, .smh-mover--rtgs { --c: var(--rtgs); left: 83.333%; }
.smh-lane__track, .smh-lane__beam {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--u) * 16) calc(var(--u) * 16) 0 0;
}
.smh-lane__track {
  background: linear-gradient(to top, color-mix(in srgb, var(--c) 36%, transparent), color-mix(in srgb, var(--c) 6%, transparent) 88%);
  box-shadow: inset calc(var(--u) * 2) 0 0 color-mix(in srgb, var(--c) 60%, transparent), inset calc(var(--u) * -2) 0 0 color-mix(in srgb, var(--c) 60%, transparent);
  opacity: .38;
  transition: opacity .5s ease;
}
.smh-lane__track::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: calc(var(--u) * 3);
  margin-left: calc(var(--u) * -1.5);
  background: repeating-linear-gradient(to top, color-mix(in srgb, var(--c) 80%, #fff) 0 calc(var(--u) * 18), transparent 0 calc(var(--u) * 36));
  opacity: .7;
}
.smh-lane__beam {
  background: linear-gradient(to top, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 30%, transparent));
  transform-origin: 50% 100%;
  transform: scaleY(0);
  opacity: 0;
}
.smh[data-route="upi"] .smh-lane--upi .smh-lane__track,
.smh[data-route="neft"] .smh-lane--neft .smh-lane__track,
.smh[data-route="rtgs"] .smh-lane--rtgs .smh-lane__track { opacity: 1; }

/* NEFT: payments wait at the gate for the half-hourly departure. */
.smh-gate {
  position: absolute;
  left: 50%;
  bottom: 52%;
  width: calc(var(--u) * 104);
  height: calc(var(--u) * 8);
  margin-left: calc(var(--u) * -52);
  border-radius: 99px;
  background: var(--neft);
  box-shadow: 0 0 calc(var(--u) * 18) var(--neft);
  opacity: .45;
  transition: opacity .5s ease;
}
.smh[data-route="neft"] .smh-gate { opacity: 1; }

/* Coins stand up on the floor (rotateX cancels the floor's tilt). Movers travel the lane. */
.smh-mover {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 100%;
  transform-style: preserve-3d;
  transform: translateY(-6%);
}
.smh-mover--batch { transform: translateY(-50%); }
.smh-coin {
  position: absolute;
  bottom: 0;
  left: 0;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotateX(-64deg);
}
.smh-coin__face {
  display: block;
  height: calc(var(--u) * 34);
  padding: 0 calc(var(--u) * 13);
  border-radius: 99px;
  background: var(--c);
  box-shadow: inset 0 0 0 calc(var(--u) * 2) rgba(255, 255, 255, .45), 0 calc(var(--u) * 8) calc(var(--u) * 20) color-mix(in srgb, var(--c) 55%, transparent);
  color: #fff;
  font-size: calc(var(--u) * 16);
  font-weight: 800;
  line-height: calc(var(--u) * 34);
  white-space: nowrap;
  opacity: 0;
}
.smh-mover--upi .smh-coin__face { background: #0f9d8e; }
.smh-mover--neft .smh-coin__face { background: #d97706; }
.smh-mover--rtgs .smh-coin__face { height: calc(var(--u) * 40); padding: 0 calc(var(--u) * 16); background: #3654e0; font-size: calc(var(--u) * 18); line-height: calc(var(--u) * 40); }
.smh-coin--wait { left: calc(var(--u) * -22); }
.smh-coin--wait2 { left: calc(var(--u) * 22); }
.smh-coin--wait .smh-coin__face {
  width: calc(var(--u) * 30);
  height: calc(var(--u) * 30);
  padding: 0;
  background: color-mix(in srgb, var(--neft) 55%, #0b1542);
  box-shadow: inset 0 0 0 calc(var(--u) * 2) rgba(255, 255, 255, .3);
  font-size: calc(var(--u) * 14);
  line-height: calc(var(--u) * 30);
  text-align: center;
  opacity: .9;
}
/* Without the script, or with reduced motion: the UPI payment mid-lane. */
.smh:not(.is-js) .smh-mover--upi { transform: translateY(-46%); }
.smh:not(.is-js) .smh-mover--upi .smh-coin__face { opacity: 1; }

/* The payee's bank, at the far end. */
.smh-dest {
  position: absolute;
  top: 0;
  left: 50%;
  height: calc(var(--u) * 54);
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotateX(-64deg);
}
.smh-dest__face {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 10);
  height: 100%;
  padding: 0 calc(var(--u) * 24);
  border: 1px solid rgba(148, 170, 255, .4);
  border-radius: calc(var(--u) * 16);
  background: linear-gradient(180deg, #23357f, #101c52);
  box-shadow: 0 calc(var(--u) * 10) calc(var(--u) * 24) rgba(8, 12, 40, .35);
  color: #fff;
  font-size: calc(var(--u) * 22);
  font-weight: 700;
  white-space: nowrap;
}
.smh-dest__face i { font-size: calc(var(--u) * 26); }

/* Lane names, between the floor and the card. */
.smh__chips { position: absolute; left: calc(var(--u) * 50); top: calc(var(--u) * 269); width: calc(var(--u) * 500); height: calc(var(--u) * 30); }
.smh-chip {
  --c: var(--upi);
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 6);
  height: calc(var(--u) * 30);
  padding: 0 calc(var(--u) * 12) 0 calc(var(--u) * 10);
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, .08), 0 calc(var(--u) * 4) calc(var(--u) * 12) rgba(8, 12, 40, .14);
  color: #545964;
  font-size: calc(var(--u) * 12);
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: transform .5s var(--out), box-shadow .4s ease;
}
/* Inactive lanes stay legible (WCAG 1.4.3): only the colour dot dims; the active lane gets the ring and lift. */
.smh-chip i { opacity: .45; transition: opacity .4s ease; }
.smh[data-route="upi"] .smh-chip--upi i,
.smh[data-route="neft"] .smh-chip--neft i,
.smh[data-route="rtgs"] .smh-chip--rtgs i { opacity: 1; }
.smh-chip--upi { left: 16.667%; }
.smh-chip--neft { --c: var(--neft); left: 50%; }
.smh-chip--rtgs { --c: var(--rtgs); left: 83.333%; }
.smh-chip i { width: calc(var(--u) * 8); height: calc(var(--u) * 8); border-radius: 50%; background: var(--c); }
.smh-chip b { color: #111827; font-size: calc(var(--u) * 14); font-weight: 800; }
.smh[data-route="upi"] .smh-chip--upi,
.smh[data-route="neft"] .smh-chip--neft,
.smh[data-route="rtgs"] .smh-chip--rtgs {
  opacity: 1;
  transform: translateX(-50%) scale(1.06);
  box-shadow: 0 0 0 calc(var(--u) * 2) var(--c), 0 calc(var(--u) * 6) calc(var(--u) * 18) color-mix(in srgb, var(--c) 40%, transparent);
}

/* The card, from Figma 2322:4802, at responsive-web width. */
.smh-card {
  position: absolute;
  left: calc(var(--u) * 50);
  top: calc(var(--u) * 308);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 12);
  width: calc(var(--u) * 500);
  padding: calc(var(--u) * 18);
  border: 1px solid #ecedf3;
  border-radius: calc(var(--u) * 16);
  background: #fff;
  box-shadow: 0 calc(var(--u) * 1) calc(var(--u) * 5) rgba(16, 24, 40, .1), 0 calc(var(--u) * 30) calc(var(--u) * 60) calc(var(--u) * -30) rgba(8, 12, 40, .55);
}
.smh-card__head { display: flex; align-items: center; justify-content: space-between; }
.smh-card__title { font-size: calc(var(--u) * 18); font-weight: 600; line-height: calc(var(--u) * 26); }
.smh-card__payee { display: inline-flex; align-items: center; gap: calc(var(--u) * 7); color: #1c3fca; font-size: calc(var(--u) * 13); font-weight: 600; white-space: nowrap; }
.smh-card__payee-icon { display: grid; place-items: center; width: calc(var(--u) * 22); height: calc(var(--u) * 22); border-radius: 50%; background: #ab5605; }
/* The preview stage sizes every image to fill it; the scene sizes its own. */
.smh .smh-card__payee-icon img { width: calc(var(--u) * 13.2); height: calc(var(--u) * 13.2); }
.smh .smh-card__go { width: calc(var(--u) * 17); height: calc(var(--u) * 17); }
.smh-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 10) calc(var(--u) * 12); align-items: end; }
.smh-field { display: flex; flex-direction: column; gap: calc(var(--u) * 6); min-width: 0; }
.smh-field__label { font-size: calc(var(--u) * 13); font-weight: 600; line-height: calc(var(--u) * 18); }
.smh-field__box {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
  height: calc(var(--u) * 36);
  padding: 0 calc(var(--u) * 12) 0 calc(var(--u) * 14);
  border: 1px solid #c5c5c5;
  border-radius: calc(var(--u) * 8);
  background: #fff;
  font-size: calc(var(--u) * 13);
}
.smh-field__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smh-field__chev { flex: none; width: calc(var(--u) * 18); height: calc(var(--u) * 18); background: #1c3fca; -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; }
.smh-amount { display: inline-block; font-weight: 600; }
.smh-proceed {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(var(--u) * 36);
  border: 1px solid #1c3fca;
  border-radius: calc(var(--u) * 8);
  color: #1c3fca;
  font-size: calc(var(--u) * 13);
  font-weight: 600;
}
.smh-proceed::after {
  content: "";
  position: absolute;
  inset: calc(var(--u) * -5);
  border: calc(var(--u) * 2) solid rgba(28, 63, 202, .55);
  border-radius: calc(var(--u) * 12);
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   3. Route tracks (.smt) and the explainer (.smx)
   ========================================================================== */

.smt {
  --c: var(--sm-upi);
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
}
.smt--neft { --c: var(--sm-neft); }
.smt--rtgs { --c: var(--sm-rtgs); }
.smt__end {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  font-size: 15px;
}
.smt__road { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; }
.smt__line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  margin-top: -1px;
  background: repeating-linear-gradient(to right, color-mix(in srgb, var(--c) 50%, transparent) 0 6px, transparent 6px 12px);
}
.smt__run { position: absolute; top: 0; bottom: 0; left: 14px; right: 14px; }
.smt__coin {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--c) 50%, transparent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
html.dark .smx .smt__coin { color: #0b1220; }

/* UPI: one quick hop. */
.smt--upi .smt__run { animation: smt-upi-run 2.4s cubic-bezier(.55, 0, .15, 1) infinite; }
.smt--upi .smt__coin { animation: smt-upi-coin 2.4s ease infinite; }
@keyframes smt-upi-run { 0%, 10% { transform: translateX(0); } 36%, 100% { transform: translateX(100%); } }
@keyframes smt-upi-coin {
  0% { opacity: 0; transform: scale(.5); }
  8% { opacity: 1; transform: scale(1); }
  36% { opacity: 1; transform: scale(1); }
  46%, 100% { opacity: 0; transform: scale(.6); }
}

/* NEFT: three payments queue at the gate, then leave together. */
.smt--neft .smt__coin { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.smt--neft .smt__run--1 { animation: smt-neft-1 5.2s var(--sm-move) infinite; }
.smt--neft .smt__run--2 { animation: smt-neft-2 5.2s var(--sm-move) infinite; }
.smt--neft .smt__run--3 { animation: smt-neft-3 5.2s var(--sm-move) infinite; }
.smt--neft .smt__run--1 .smt__coin { animation: smt-neft-c1 5.2s ease infinite; }
.smt--neft .smt__run--2 .smt__coin { animation: smt-neft-c2 5.2s ease infinite; }
.smt--neft .smt__run--3 .smt__coin { animation: smt-neft-c3 5.2s ease infinite; }
@keyframes smt-neft-1 { 0%, 4% { transform: translateX(0); } 20%, 60% { transform: translateX(46%); } 84%, 100% { transform: translateX(100%); } }
@keyframes smt-neft-2 { 0%, 16% { transform: translateX(0); } 32%, 60% { transform: translateX(34%); } 84%, 100% { transform: translateX(88%); } }
@keyframes smt-neft-3 { 0%, 28% { transform: translateX(0); } 44%, 60% { transform: translateX(22%); } 84%, 100% { transform: translateX(76%); } }
@keyframes smt-neft-c1 { 0% { opacity: 0; } 5%, 84% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes smt-neft-c2 { 0%, 15% { opacity: 0; } 18%, 84% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes smt-neft-c3 { 0%, 27% { opacity: 0; } 30%, 84% { opacity: 1; } 92%, 100% { opacity: 0; } }
.smt__gate {
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: calc(14px + (100% - 28px) * .54);
  width: 3px;
  border-radius: 3px;
  background: var(--c);
  transform-origin: 50% 0;
  animation: smt-gate 5.2s ease infinite;
}
@keyframes smt-gate { 0%, 58% { transform: scaleY(1); } 62%, 90% { transform: scaleY(0); } 95%, 100% { transform: scaleY(1); } }

/* RTGS: the line lights up and one large payment goes straight through. */
.smt--rtgs .smt__coin { width: 28px; height: 28px; margin: -14px 0 0 -14px; font-size: 13px; }
.smt__beam {
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  height: 6px;
  margin-top: -3px;
  border-radius: 6px;
  background: linear-gradient(to right, color-mix(in srgb, var(--c) 10%, transparent), var(--c));
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0;
  animation: smt-rtgs-beam 3.4s ease infinite;
}
.smt--rtgs .smt__run { animation: smt-rtgs-run 3.4s cubic-bezier(.45, 0, .25, 1) infinite; }
.smt--rtgs .smt__coin { animation: smt-rtgs-coin 3.4s ease infinite; }
@keyframes smt-rtgs-beam { 0%, 4% { transform: scaleX(0); opacity: 0; } 8% { opacity: .85; } 30% { transform: scaleX(1); opacity: .85; } 58%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes smt-rtgs-run { 0%, 10% { transform: translateX(0); } 42%, 100% { transform: translateX(100%); } }
@keyframes smt-rtgs-coin {
  0%, 6% { opacity: 0; transform: scale(.6); }
  12% { opacity: 1; transform: scale(1); }
  42% { opacity: 1; transform: scale(1); }
  54%, 100% { opacity: 0; transform: scale(.7); }
}

/* The explainer */
.smx__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.smx-card {
  --c: var(--sm-upi);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 20px 22px;
  overflow: hidden;
  border: 1px solid var(--sf-line);
  border-top: 3px solid var(--c);
  border-radius: var(--sf-r-lg);
  background: var(--sf-glass);
}
.smx-card--neft { --c: var(--sm-neft); }
.smx-card--rtgs { --c: var(--sm-rtgs); }
.smx-card .smt { margin: 0 0 6px; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 8%, transparent); }
.smx-card__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.smx-card__name b { color: var(--c); font-size: 1.875rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.smx-card__name span { color: var(--sf-muted); font-size: .8125rem; font-weight: 600; }
.smx-card .smx-card__like { margin: 0; color: var(--sf-ink); font-size: var(--sf-fs-h3); line-height: 1.3; }
.smx-card__body { margin: 0; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.55; }
.smx-card__facts { display: grid; margin: 6px 0 0; }
.smx-card__facts div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--sf-line); }
.smx-card__facts dt { color: var(--sf-muted); font-size: .8125rem; font-weight: 600; line-height: 1.5; }
.smx-card__facts dd { margin: 0; color: var(--sf-ink); font-size: .9rem; line-height: 1.5; }
.smx-card__owner { display: inline-flex; align-items: center; gap: 6px; margin: auto 0 0; padding-top: 4px; color: var(--sf-muted); font-size: .8125rem; font-weight: 600; }

.smx__thumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--sf-r-md);
  background: color-mix(in srgb, var(--sf-ink) 5%, transparent);
}
.smx__thumb-label { display: inline-flex; align-items: center; gap: 8px; margin-right: 4px; color: var(--sf-ink); font-size: .875rem; font-weight: 700; }
.smx__thumb-label i { color: var(--sf-warn); }
.smx__rule {
  --c: var(--sm-upi);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: var(--sf-glass);
  color: var(--sf-text-2);
  font-size: .875rem;
}
.smx__rule--neft { --c: var(--sm-neft); }
.smx__rule--rtgs { --c: var(--sm-rtgs); }
.smx__rule i { color: var(--sf-muted); }
.smx__rule b { color: var(--c); font-weight: 800; }

/* ==========================================================================
   4. The old flow (.smw)
   The finished frame is the static design. With motion allowed, the script
   plays it as a short film. Tiles wait tilted back and dimmed (.is-playing),
   the current one lifts toward the viewer (.is-active), finished ones settle
   part-way (.is-done), and the row lies flat again at the end (.is-played).
   One perspective for the row (.smw__steps) gives a shared vanishing point;
   each tile's pose lives on its lift (.smw-lift), never on the row itself.
   ========================================================================== */

.smw { position: relative; margin: 0 0 28px; }
.smw__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  perspective: 1400px;
  perspective-origin: 50% 20%;
}
.smw-step { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; transform-style: preserve-3d; }

/* Connectors between tiles: they light up as the story moves on. */
.smw-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 76px;
  right: -15px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--sf-muted);
  border-right: 2px solid var(--sf-muted);
  transform: rotate(45deg);
  opacity: .55;
  transition: opacity .4s ease, transform .5s var(--sm-out), border-color .4s ease;
}
.smw.is-playing .smw-step:not(:last-child)::after { opacity: .2; }
.smw.is-playing .smw-step.is-done:not(:last-child)::after { border-color: var(--sf-accent); opacity: 1; transform: translateX(3px) rotate(45deg); }

/* The lift carries the 3D pose; the glow is faded in with opacity only. */
.smw-lift { position: relative; display: block; transform-origin: 50% 100%; transition: transform .8s var(--sm-out); }
.smw-lift::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  box-shadow: 0 0 0 2px #1c3fca, 0 24px 44px -20px rgba(28, 63, 202, .65);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
.smw-step--error .smw-lift::after { box-shadow: 0 0 0 2px #dc2626, 0 24px 44px -20px rgba(220, 38, 38, .6); }
.smw-tile {
  display: flex;
  flex-direction: column;
  height: 160px;
  overflow: hidden;
  border: 1px solid #e3e6ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
  color: #111827;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  contain: layout paint;
  transition: opacity .5s ease;
}
.smw.is-playing .smw-lift { transform: rotateX(16deg) translateZ(-36px); }
.smw.is-playing .smw-tile { opacity: .45; }
.smw.is-playing .smw-step.is-done .smw-lift { transform: rotateX(7deg) translateZ(-14px); }
.smw.is-playing .smw-step.is-done .smw-tile { opacity: .85; }
.smw.is-playing .smw-step.is-active .smw-lift { transform: translateZ(28px); }
.smw.is-playing .smw-step.is-active .smw-tile { opacity: 1; }
.smw.is-playing .smw-step.is-active .smw-lift::after { opacity: 1; }

.smw-tile__bar { display: flex; flex: none; align-items: center; height: 30px; padding: 0 12px; background: #0d2a78; color: #fff; font-size: 12px; font-weight: 600; }

/* 1. The route menu, and the pointer that guesses */
.smw-menu { position: relative; display: grid; gap: 6px; padding: 10px 12px; }
.smw-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  background: #f3f6f9;
  font-size: 12.5px;
  font-weight: 700;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.smw-opt.is-hover { background: #e4e9f3; }
.smw-opt.is-picked { background: #e6ebff; box-shadow: inset 0 0 0 2px #1c3fca; color: #1c3fca; }
.smw-opt em { display: none; padding: 1px 7px; border-radius: 99px; background: #1c3fca; color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; }
.smw[data-retry] .smw-opt em { display: inline-block; }
.smw-cursor {
  position: absolute;
  top: 20px;
  left: calc(100% - 44px);
  color: #111827;
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 2px 4px rgba(16, 24, 40, .3);
  pointer-events: none;
}
.smw-cursor::before { transform: scaleX(-1); } /* the glyph points up-right; a pointer points up-left */

/* 2. The form, typed in */
.smw-form { display: grid; gap: 6px; padding: 10px 12px; font-size: 12px; }
.smw-form > span { display: flex; justify-content: space-between; gap: 8px; min-height: 26px; align-items: center; padding: 4px 8px; border: 1px solid #d5d8e0; border-radius: 6px; }
.smw-form small { color: #6b7280; font-size: 11.5px; }
.smw-form b { font-weight: 600; font-variant-numeric: tabular-nums; }
.smw-form b.is-typing::after { content: ""; display: inline-block; width: 1px; height: 12px; margin-left: 1px; background: #1c3fca; vertical-align: -2px; animation: smw-caret 1s steps(1) infinite; }
@keyframes smw-caret { 50% { opacity: 0; } }
.smw-form .smw-form__btn { justify-content: center; border-color: transparent; background: #1c3fca; color: #fff; font-weight: 600; }

/* 3. The error */
.smw-error { display: flex; align-items: flex-start; gap: 8px; margin: auto 12px; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 8px; background: #fef2f2; color: #b42318; font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.smw-error i { font-size: 15px; line-height: 1.2; }

/* 4. The way back */
.smw-back { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: auto; color: #545964; font-size: 12.5px; font-weight: 600; }
.smw-back__icon { display: block; color: #1c3fca; font-size: 30px; line-height: 1; }
.smw-back__icon i { display: block; }

.smw-step__text { display: grid; gap: 2px; color: var(--sf-text-2); font-size: .9rem; line-height: 1.45; transition: opacity .45s ease; }
.smw-step__text b { color: var(--sf-ink); font-size: .975rem; }
.smw-step--error .smw-step__text b { color: color-mix(in srgb, #dc2626 70%, var(--sf-ink)); }
.smw.is-playing .smw-step:not(.is-active):not(.is-done) .smw-step__text { opacity: .38; }

/* The loop back: from step 4 to step 1, under the captions. */
.smw__return {
  position: relative;
  height: 26px;
  margin: 6px 12.5% 0;
  border: 2px dashed color-mix(in srgb, var(--sf-muted) 50%, transparent);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  transition: border-color .4s ease;
}
.smw__return-head { position: absolute; top: -13px; left: -9px; color: var(--sf-muted); font-size: 15px; line-height: 1; transition: color .4s ease; }
.smw__return-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sf-muted);
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: color .4s ease;
}
.smw.is-returning .smw__return { border-color: var(--sf-accent); }
.smw.is-returning .smw__return-head, .smw.is-returning .smw__return-label { color: var(--sf-accent-ink); }
/* The dot starts at the right end and the run slides left, so the run never sits past
   the right edge of the page (that made the page scroll sideways). */
.smw__return-run { position: absolute; right: 0; bottom: -6px; left: 0; height: 10px; }
.smw__return-dot { position: absolute; top: 0; left: calc(100% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--sf-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sf-accent) 22%, transparent); opacity: 0; }

.smw figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 44px; color: var(--sf-muted); font-size: .8125rem; }
.smw__toggle { flex: none; }

/* Tiles rise in once, in reading order. */
html.sf-js .smw-step { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .7s var(--sm-out); }
html.sf-js .smw-step:nth-child(2) { transition-delay: .07s; }
html.sf-js .smw-step:nth-child(3) { transition-delay: .14s; }
html.sf-js .smw-step:nth-child(4) { transition-delay: .21s; }
html.sf-js .smw.is-seen .smw-step { opacity: 1; transform: none; }

/* ==========================================================================
   5. Route logic (.sml)
   ========================================================================== */

.sml__guard {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--sf-warn) 32%, transparent);
  border-radius: var(--sf-r-md);
  background: color-mix(in srgb, var(--sf-warn) 9%, transparent);
  color: var(--sf-text-2);
  line-height: 1.55;
}
.sml__guard i { color: var(--sf-warn); font-size: 1.25rem; line-height: 1.3; }
.sml__guard strong { color: var(--sf-ink); }
.sml__steps { display: grid; margin: 0; padding: 0; list-style: none; }
.sml-step { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: center; padding-bottom: 26px; }
.sml-step.is-last { padding-bottom: 0; }
.sml-step:not(.is-last)::before { content: ""; position: absolute; top: 50px; bottom: 2px; left: 25px; width: 2px; background: var(--sf-line); }
.sml-step:not(.is-last)::after { content: "No"; position: absolute; bottom: 3px; left: 36px; color: var(--sf-muted); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sml-step__q {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px 16px 10px 11px;
  border: 1px solid var(--sf-line);
  border-radius: 14px;
  background: var(--sf-glass);
  color: var(--sf-ink);
  font-weight: 600;
  line-height: 1.4;
}
.sml-step__n { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--sf-ink) 8%, transparent); font-size: .8125rem; font-weight: 700; }
.sml-step.is-last .sml-step__q { border-style: dashed; background: transparent; }
.sml-step__yes { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.45; }
.sml-step__yes::before { content: ""; position: absolute; top: 50%; left: -22px; width: 14px; height: 2px; background: var(--sf-line); }
.sml-step__say { color: var(--sf-muted); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sml__note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--sf-muted); font-size: .8125rem; }

html.sf-js .sml-step { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .6s var(--sm-out); transition-delay: calc(var(--i, 0) * 80ms); }
html.sf-js .sml.is-seen .sml-step { opacity: 1; transform: none; }

/* ==========================================================================
   6. The working card (.smd)
   Product UI: it keeps the bank's light surfaces in both site themes.
   ========================================================================== */

.smd { margin: 0; min-width: 0; }
.smd > figcaption { margin-top: 14px; color: var(--sf-muted); font-size: .875rem; line-height: 1.55; }
.smd .smt { --sm-upi: #0f766e; --sm-neft: #b45309; --sm-rtgs: #1c3fca; }
.smd__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.smd__try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.smd__try-label { margin-right: 2px; color: var(--sf-muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.smd__try-btn {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: var(--sf-glass);
  color: var(--sf-text-2);
  font: inherit;
  font-size: .8125rem;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .15s ease;
}
.smd__try-btn b { color: var(--sf-ink); }
.smd__try-btn:hover { border-color: color-mix(in srgb, var(--sf-accent) 50%, transparent); color: var(--sf-ink); }
.smd__try-btn:active { transform: scale(.97); }
.smd__try-btn[aria-pressed="true"] { border-color: var(--sf-accent); background: color-mix(in srgb, var(--sf-accent) 12%, transparent); color: var(--sf-ink); }
.smd__try-btn:focus-visible, .smd__view-btn:focus-visible { outline: 2px solid var(--sf-accent-ink); outline-offset: 2px; }
.smd__view { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--sf-ink) 7%, transparent); }
.smd__view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sf-text-2);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.smd__view-btn:hover { color: var(--sf-ink); }
.smd__view-btn[aria-pressed="true"] { background: var(--sf-glass-strong); color: var(--sf-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
html.dark .smd__view-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--sf-ink) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sf-ink) 14%, transparent); }
html:not(.sf-js) .smd__bar { display: none; }
@media (pointer: coarse) { .smd__try-btn, .smd__view-btn { min-height: 44px; } }

.smd__frame { container-type: inline-size; margin-inline: auto; }
.smd.is-phone .smd__frame { max-width: 400px; padding: 10px; border-radius: 46px; background: #0b0b0f; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 80px -40px rgba(8, 8, 24, .7); }
.smd.is-phone .smd__stage { padding: 22px 12px 14px; border-radius: 36px; }
.smd__stage {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: var(--sf-r-lg);
  background:
    radial-gradient(60% 120px at 85% 0, rgba(91, 123, 255, .35), transparent 70%) top / 100% 132px no-repeat,
    linear-gradient(180deg, #0d2a78, #0a1f5c) top / 100% 132px no-repeat,
    #eef2f8;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .06);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Send Money card: Figma 2322:4802 */
.smc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 24px;
  border: 1px solid #ecedf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(16, 24, 40, .1);
  color: #111827;
}
.smc__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 28px; }
.smc .smc__title { margin: 0; color: #111827; font-size: 20px; font-weight: 600; line-height: 28px; letter-spacing: 0; }
.smc__payee { display: inline-flex; align-items: center; gap: 8px; color: #1c3fca; font-size: 14px; font-weight: 600; line-height: 20px; }
.smc__payee-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #ab5605; }
.smc__payee-icon img, .smc__go { display: block; max-width: none; }
.smc__payee-icon img { width: 14.4px; height: 14.4px; }
.smc__go { width: 19.2px; height: 19.2px; }
.smc__grid { display: grid; grid-template-columns: minmax(0, 356fr) minmax(0, 356fr) minmax(0, 237fr) minmax(96px, 103fr); gap: 16px; align-items: start; }
.smc-field { display: flex; flex-direction: column; min-width: 0; }
.smc-field__label { padding-bottom: 8px; color: #111827; font-size: 14px; font-weight: 600; line-height: 20px; }
.smc-field__box {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid #c5c5c5;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.smc-field__control {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 44px 0 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  font: 400 14px/20px Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  text-overflow: ellipsis;
  cursor: pointer;
}
input.smc-field__control { padding-right: 16px; cursor: text; }
.smc-field__control::placeholder { color: #545964; opacity: 1; }
.smc-field__control:focus { outline: none; }
.smc-field__box:focus-within { border-color: #1c3fca; box-shadow: 0 0 0 3px rgba(28, 63, 202, .2); }
.smc-field__chev { position: absolute; top: 50%; right: 16px; width: 20px; height: 20px; margin-top: -10px; background: #1c3fca; -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; pointer-events: none; }
.smc-field__box:has(:disabled) { background: #f3f6f9; }
.smc-field__control:disabled { color: #788da6; cursor: not-allowed; }
.smc-field__box:has(:disabled) .smc-field__chev { background: #a3baf9; }
.smc-field.is-invalid .smc-field__box { border-color: #b42318; }
.smc-field__err { margin: 6px 0 0; color: #b42318; font-size: 12.5px; font-weight: 500; line-height: 18px; }
.smc-field__err:empty { display: none; }
.smc__action { display: flex; padding-top: 28px; }
.smc__proceed {
  flex: 1;
  height: 40px;
  padding: 0 24px;
  border: 1px solid #1c3fca;
  border-radius: 8px;
  background: #fff;
  color: #1c3fca;
  font: 600 14px/20px Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: background-color .15s ease, transform .12s ease;
}
.smc__proceed:hover { background: #f0f3ff; }
.smc__proceed:active { transform: scale(.97); }
.smc__proceed:focus-visible { outline: 2px solid #1c3fca; outline-offset: 2px; }

/* Review: how the money will travel */
.smr {
  display: grid;
  gap: 16px;
  padding: 22px 24px 24px;
  border: 1px solid #ecedf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(16, 24, 40, .1);
  color: #111827;
}
.smr:not([hidden]) { animation: smr-in .5s var(--sm-out) both; }
@keyframes smr-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.smr:focus { outline: none; }
.smr__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.smr .smr__title { margin: 0; color: #111827; font-size: 18px; font-weight: 600; line-height: 26px; letter-spacing: 0; }
.smr__edit, .smr__again {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1c3fca;
  font: 600 14px/20px Inter, system-ui, sans-serif;
  cursor: pointer;
}
.smr__edit:hover, .smr__again:hover { background: #f0f3ff; }
.smr__edit:focus-visible, .smr__again:focus-visible, .smr__send:focus-visible { outline: 2px solid #1c3fca; outline-offset: 2px; }
.smr__summary { margin: 0; color: #545964; font-size: 14px; line-height: 20px; }
.smr__summary b { color: #111827; }
.smr__own { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 16px; border-radius: 12px; background: #f6f8fb; font-size: 14px; line-height: 20px; }
.smr__choose { display: grid; gap: 16px; }
.smr fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.smr legend { margin-bottom: 8px; padding: 0; color: #111827; font-size: 14px; font-weight: 600; line-height: 20px; }
.smr__seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: #f3f6f9; vertical-align: middle; }
.smr__seg label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  color: #545964;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.smr__seg input, .smr-route input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.smr__seg label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .14); color: #111827; }
.smr__seg label:has(input:focus-visible), .smr-route:has(input:focus-visible) { outline: 2px solid #1c3fca; outline-offset: 2px; }
.smr__date { display: inline-flex; margin-left: 10px; vertical-align: middle; }
.smr__date input { height: 38px; padding: 0 10px; border: 1px solid #c5c5c5; border-radius: 8px; background: #fff; color: #111827; font: 14px Inter, system-ui, sans-serif; }
.smr__date input:focus-visible { outline: 2px solid #1c3fca; outline-offset: 1px; }
.smr__route-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.smr-route {
  --c: #0f766e;
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d9dce5;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.smr-route--neft { --c: #b45309; }
.smr-route--rtgs { --c: #1c3fca; }
.smr-route__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.smr-route__top b { color: var(--c); font-size: 16px; font-weight: 800; letter-spacing: .01em; }
.smr-route__tag { padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.smr-route__tag:empty { display: none; }
.smr-route__time { color: #545964; font-size: 13px; line-height: 18px; }
.smr-route:hover { border-color: color-mix(in srgb, var(--c) 50%, #d9dce5); }
.smr-route:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 5%, #fff); box-shadow: inset 0 0 0 1px var(--c), 0 8px 18px -12px var(--c); }
.smr-route:has(input:disabled) { border-style: dashed; background: #f7f8fa; cursor: not-allowed; }
.smr-route:has(input:disabled) input { cursor: not-allowed; }
.smr-route:has(input:disabled) .smr-route__top b { color: #6b7280; }
.smr-route:has(input:disabled) .smr-route__tag { background: #eef0f4; color: #545964; }
.smr__travel { padding: 6px 14px; border-radius: 12px; background: #f6f8fb; }
.smt--review { display: none; }
.smr[data-route="upi"] .smt--review.smt--upi,
.smr[data-route="neft"] .smt--review.smt--neft,
.smr[data-route="rtgs"] .smt--review.smt--rtgs { display: flex; }
.smr__why { margin: 0; color: #111827; font-size: 15px; line-height: 22px; }
.smr__notices { display: grid; gap: 10px; }
.smr__notices:empty { display: none; }
.smr-note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 20px; }
.smr-note i { font-size: 16px; line-height: 20px; }
.smr-note--warn { border: 1px solid #fed7aa; background: #fff7ed; color: #7c2d12; }
.smr-note--warn i { color: #c2410c; }
.smr-note--info { border: 1px solid #c7d4fe; background: #eff4ff; color: #1e3a8a; }
.smr-note--info i { color: #1c3fca; }
.smr__actions { display: flex; justify-content: flex-end; }
.smr__send {
  min-height: 40px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: #1c3fca;
  color: #fff;
  font: 600 14px/20px Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: background-color .15s ease, transform .12s ease;
}
.smr__send:hover { background: #1733a8; }
.smr__send:active { transform: scale(.97); }
.smr__send:disabled { background: #a3baf9; cursor: not-allowed; transform: none; }
.smr__done { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 16px; border: 1px solid #abefc6; border-radius: 12px; background: #ecfdf3; color: #05603a; }
.smr__done:focus { outline: 2px solid #039855; outline-offset: 2px; }
.smr__done > i { color: #039855; font-size: 20px; }
.smr__done p { flex: 1; min-width: 200px; margin: 0; font-size: 14px; line-height: 20px; }
.smr__done:not([hidden]) { animation: smr-in .45s var(--sm-out) both; }

@container (max-width: 820px) {
  .smc__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@container (max-width: 520px) {
  .smc { padding: 18px; }
  .smc .smc__title { font-size: 18px; line-height: 26px; }
  .smc__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .smc__action { padding-top: 2px; }
  .smr { padding: 18px; }
  .smr__route-list { grid-template-columns: minmax(0, 1fr); }
  .smr__date { margin: 10px 0 0; }
  .smr__send { flex: 1; }
}

/* ==========================================================================
   7. Results (.smres)
   ========================================================================== */

.smres { display: grid; gap: 28px; }
.smres__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.smres-metric {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 22px;
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-r-md);
  background: linear-gradient(135deg, color-mix(in srgb, var(--sf-accent) 10%, transparent), transparent 70%), var(--sf-glass);
}
.smres-metric__label { color: var(--sf-text-2); font-size: .875rem; font-weight: 600; }
.smres-metric__value { display: flex; align-items: center; gap: 10px; }
.smres-metric__value s { color: var(--sf-muted); font-size: 1.25rem; font-weight: 600; text-decoration-thickness: 2px; }
.smres-metric__value i { color: var(--sf-muted); }
.smres-metric__value b { color: var(--sf-ink); font-size: var(--sf-fs-num); font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.smres-metric__bars { display: grid; gap: 6px; }
.smres-bar { display: block; height: 8px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--sf-ink) 8%, transparent); }
.smres-bar i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--sf-ink) 30%, transparent); transform: scaleX(var(--v)); transform-origin: 0 50%; transition: transform 1.1s var(--sm-out); }
.smres-bar.is-after i { background: var(--sf-accent); transition-delay: .25s; }
html.sf-js .smres:not(.is-seen) .smres-bar i { transform: scaleX(0); }
.smres-metric__doors { display: flex; align-items: center; gap: 6px; height: 22px; }
.smres-metric__doors i { width: 16px; height: 22px; border: 2px solid color-mix(in srgb, var(--sf-ink) 30%, transparent); border-radius: 4px; }
.smres-metric__doors span { padding: 0 4px; color: var(--sf-muted); }
.smres-metric__doors .is-one { width: 34px; border-color: var(--sf-accent); background: color-mix(in srgb, var(--sf-accent) 16%, transparent); }
.smres-metric__src { color: var(--sf-muted); font-size: .8125rem; line-height: 1.45; }
.smres__note { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; color: var(--sf-muted); font-size: .875rem; line-height: 1.5; }
.smres__note i { color: var(--sf-warn); line-height: 1.5; }

.smres .smres__title { margin: 0 0 10px; color: var(--sf-ink); font-size: var(--sf-fs-h3); }

.smres__evidence { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.smres-col { padding: 18px 22px 22px; border: 1px solid var(--sf-line); border-radius: var(--sf-r-md); background: var(--sf-glass); }
.smres-col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--sf-ink); font-size: 1rem; }
.smres-col.is-known h3 i { color: var(--sf-ok); }
.smres-col.is-open h3 i { color: var(--sf-warn); }
.smres-col.is-next h3 i { color: var(--sf-accent); }
.smres-col ul { display: grid; gap: 10px; margin: 0; padding: 0 0 0 18px; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.55; }
.smres-col strong { color: var(--sf-ink); }

/* ==========================================================================
   9. The three routes as a film (.smx), like the old-flow storyboard
   Cards wait tilted back under one perspective; the current one lifts, its
   route plays once and its facts arrive row by row. Then the rule of thumb
   assembles and the row lies flat with every route looping (.is-played).
   ========================================================================== */

.smx__grid { perspective: 1400px; perspective-origin: 50% 20%; }
.smx-card { transform-origin: 50% 100%; transition: transform .8s var(--sm-out), opacity .5s ease; }
.smx-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--c), inset 0 -40px 60px -50px var(--c); opacity: 0; pointer-events: none; transition: opacity .45s ease; }
/* Waiting cards stay legible: text keeps full contrast (WCAG 1.4.3); the tilt and a dimmed route mark them as waiting. */
.smx.is-playing .smx-card { transform: rotateX(14deg) translateZ(-36px); }
.smx.is-playing .smx-card.is-done { transform: rotateX(6deg) translateZ(-12px); }
.smx .smt { transition: opacity .5s ease; }
.smx.is-playing .smx-card:not(.is-active) .smt { opacity: .4; }
.smx.is-playing .smx-card.is-done .smt { opacity: .75; }
.smx.is-playing .smx-card.is-active { opacity: 1; transform: translateZ(28px); }
.smx.is-playing .smx-card.is-active::after { opacity: 1; }
.smx-card__facts div { transition: opacity .4s ease, transform .5s var(--sm-out); transition-delay: calc(var(--i, 0) * 110ms + 250ms); }
.smx.is-playing .smx-card:not(.is-active):not(.is-done) .smx-card__facts div { opacity: 0; transform: translateY(8px); transition-delay: 0s; }
.smx.is-playing .smx-card:not(.is-active) .smt *, .smx.is-paused .smt * { animation-play-state: paused; }
.smx__rule { transition: opacity .35s ease, transform .55s var(--sm-spring); }
.smx.is-playing .smx__rule:not(.is-on) { opacity: 0; transform: translateY(6px) scale(.92); }
.smx__toggle { margin-left: auto; }

/* ==========================================================================
   10. By the numbers (.smn)
   ========================================================================== */

.smn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0 0; }
/* One row for the picture, then number, caption and source. The picture row has a
   fixed height and every picture sits on its floor, so the three numbers line up and
   the source pills share a baseline at the foot of the tiles. */
.smn-tile { display: grid; grid-template-rows: 112px auto 1fr auto; gap: 10px; min-width: 0; margin: 0; padding: 22px 24px 24px; border: 1px solid var(--sf-line); border-radius: var(--sf-r-lg); background: var(--sf-glass); }
.smn-tile > :first-child { align-self: end; margin-bottom: 12px; }
.smn .smn-tile figcaption { align-self: start; margin-bottom: 6px; }
.smn-tile .smn-src { align-self: end; margin-top: 0; }
.smn-num { margin: 0; color: var(--sf-ink); font-size: 1.125rem; font-weight: 700; line-height: 1; }
.smn-num b { margin-right: 2px; font-size: var(--sf-fs-num); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.smn-tile figcaption, .smp-stat p:not(.smn-num):not(.sm-sources) { margin: 0; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }
:is(.smn-tile figcaption, .smp-stat) strong { color: var(--sf-ink); }
.smn-src { display: inline-flex; width: max-content; max-width: 100%; margin-top: 4px; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--sf-ink) 6%, transparent); color: var(--sf-muted); font-size: .75rem; font-weight: 600; }

/* 12 of 50 tickets lit = 24% */
.smn-tickets { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 6px 5px; width: 100%; max-width: 300px; height: 100px; }
.smn-tickets i { display: block; border-radius: 3px; background: color-mix(in srgb, var(--sf-ink) 12%, transparent); transition: opacity .3s ease, transform .45s var(--sm-spring); transition-delay: calc(var(--i) * 14ms); }
.smn-tickets i.is-on { background: var(--sf-accent); }
html.sf-js .smn:not(.is-seen) .smn-tickets i { opacity: 0; transform: scale(.4); }

.smn-ring { position: relative; display: grid; place-items: center; width: 96px; height: 96px; }
.smn-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.smn-ring__track, .smn-ring__fill { fill: none; stroke-width: 12; }
.smn-ring__track { stroke: color-mix(in srgb, var(--sf-ink) 10%, transparent); }
.smn-ring__fill { stroke: var(--sf-accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--v)); transition: stroke-dashoffset 1.3s var(--sm-out) .2s; }
html.sf-js .smn:not(.is-seen) .smn-ring__fill { stroke-dashoffset: 100; }
.smn-ring i { color: var(--sf-muted); font-size: 28px; }

.smn-doors { display: flex; align-items: flex-end; gap: 10px; height: 96px; }
.smn-doors > span { flex: 0 1 54px; min-width: 0; }
.smn-doors span {
  --c: var(--sm-rtgs);
  position: relative;
  display: grid;
  place-items: end center;
  width: 54px;
  height: 82px;
  padding-bottom: 10px;
  border: 1.5px solid color-mix(in srgb, var(--c) 50%, transparent);
  border-radius: 27px 27px 6px 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 20%, transparent), color-mix(in srgb, var(--c) 6%, transparent));
  color: var(--c);
  font-size: .75rem;
  font-weight: 800;
  transition: opacity .4s ease, transform .6s var(--sm-spring);
}
.smn-doors span:nth-child(2) { --c: var(--sm-neft); transition-delay: .1s; }
.smn-doors span:nth-child(3) { --c: var(--sm-upi); transition-delay: .2s; }
.smn-doors span::after { content: ""; position: absolute; top: 46px; right: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
html.sf-js .smn:not(.is-seen) .smn-doors span { opacity: 0; transform: translateY(12px); }

/* ==========================================================================
   11. A new payee's first day (.smp)
   The clock travels the track while each milestone arrives in turn.
   ========================================================================== */

.smp { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.smp__day, .smp-stat { min-width: 0; margin: 0; padding: 20px 24px 22px; border: 1px solid var(--sf-line); border-radius: var(--sf-r-lg); background: var(--sf-glass); }
.smp__title { display: grid; gap: 4px; margin-bottom: 28px; }
.smp__title strong { color: var(--sf-ink); font-size: var(--sf-fs-h3); line-height: 1.3; }
.smp__track { position: relative; display: block; height: 4px; margin: 0 16.667%; border-radius: 99px; background: color-mix(in srgb, var(--sf-ink) 10%, transparent); }
.smp__track::before, .smp__track::after { content: ""; position: absolute; top: 50%; z-index: 1; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--sf-accent); box-shadow: 0 0 0 3px var(--sf-glass-strong, #fff); }
.smp__track::before { left: 0; }
.smp__track::after { left: 50%; }
.smp__fill { position: absolute; inset: 0; border-radius: inherit; background: var(--sf-accent); transform-origin: 0 50%; transition: transform 2.4s var(--sm-move) .3s; }
.smp__run { position: absolute; inset: 0; transform: translateX(100%); transition: transform 2.4s var(--sm-move) .3s; }
.smp__clock { position: absolute; top: -12px; left: -14px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sf-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sf-accent) 20%, transparent); color: #fff; font-size: 14px; }
html.sf-js .smp:not(.is-seen) .smp__fill { transform: scaleX(0); }
html.sf-js .smp:not(.is-seen) .smp__run { transform: translateX(0); }
.smp__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.smp-step { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: opacity .45s ease, transform .6s var(--sm-spring); transition-delay: calc(var(--i) * 1.2s + .3s); }
html.sf-js .smp:not(.is-seen) .smp-step { opacity: 0; transform: translateY(10px); }
.smp-step__when { padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--sf-accent) 14%, transparent); color: var(--sf-accent-ink); font-size: .75rem; font-weight: 800; letter-spacing: .02em; }
.smp-step .smv__art { width: 96px; margin: 0; }
.smp-step strong { color: var(--sf-ink); font-size: 1rem; }
.smp-step > span:last-child { max-width: 24ch; color: var(--sf-text-2); font-size: .875rem; line-height: 1.45; }
.smp__note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--sf-text-2); font-size: .875rem; }
.smp__note i { color: var(--sf-accent-ink); }
.smp-stat { display: flex; flex-direction: column; gap: 10px; }
.smp-stat .smv__art { margin-bottom: 2px; }
.smp-stat .sm-sources { margin-top: auto; padding-top: 6px; }

/* ==========================================================================
   12. Picture cards (.smv): goals, partners and reflections
   ========================================================================== */

.smv-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.smv {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px 20px 20px;
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-r-lg);
  background: var(--sf-glass);
  transition: opacity .5s ease, transform .7s var(--sm-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
html.sf-js .smv-grid:not(.is-seen) .smv { opacity: 0; transform: translateY(14px); }
.smv.is-me { border-color: color-mix(in srgb, var(--sf-accent) 45%, var(--sf-line)); background: linear-gradient(160deg, color-mix(in srgb, var(--sf-accent) 12%, transparent), transparent 62%), var(--sf-glass); }
.smv__art { display: block; width: 112px; margin: -2px 0 2px -10px; }
.smv__art svg { display: block; width: 100%; height: auto; overflow: visible; }
.smv:hover .action-detail { animation: action-reveal .62s cubic-bezier(.2, .8, .25, 1) both; }
.smv__eyebrow { color: var(--sf-accent-ink); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.smv h3 { margin: 0; color: var(--sf-ink); font-size: 1.0625rem; line-height: 1.3; }
.smv p { margin: 0; color: var(--sf-text-2); font-size: .9375rem; line-height: 1.5; }
.smv .smv__foot { display: flex; align-items: flex-start; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--sf-line); color: var(--sf-muted); font-size: .8125rem; }
.smv-grid--goals .smv h3 + p { margin-bottom: 10px; }
.smv__foot i { color: var(--sf-accent-ink); }

/* What we couldn't change */
.smk { margin-top: 22px; padding: 16px 18px; border-radius: var(--sf-r-md); background: color-mix(in srgb, var(--sf-ink) 5%, transparent); }
.smk__label { display: block; margin-bottom: 12px; color: var(--sf-muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.smk ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; margin: 0; padding: 0; list-style: none; }
.smk li { display: flex; align-items: flex-start; gap: 10px; }
.smk li > i { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--sf-glass); color: var(--sf-accent-ink); font-size: 16px; }
.smk li span { display: grid; gap: 1px; color: var(--sf-text-2); font-size: .875rem; line-height: 1.4; }
.smk li b { color: var(--sf-ink); font-size: .9375rem; }

/* Who decided what: four owners feed one card. */
.smo { margin: 0; }
.smo__owners .smv { position: relative; }
.smo__owners .smv::after { content: ""; position: absolute; bottom: -18px; left: 50%; width: 2px; height: 17px; background: color-mix(in srgb, var(--sf-ink) 16%, transparent); }
.smo__join { position: relative; display: block; height: 2px; margin: 17px 12.5% 0; background: color-mix(in srgb, var(--sf-ink) 16%, transparent); transform-origin: 50% 50%; transition: transform .7s var(--sm-out) .5s; }
.smo__join::after { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 22px; background: inherit; }
.smo__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 420px);
  margin: 22px auto 0;
  padding: 14px 16px;
  border: 1px solid #ecedf3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--sf-accent) 18%, transparent), 0 16px 34px -20px rgba(16, 24, 40, .55);
  color: #111827;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  transition: opacity .5s ease 1s, transform .7s var(--sm-spring) 1s;
}
.smo__card-title { font-size: 14px; font-weight: 600; }
.smo__card-row { display: grid; grid-template-columns: 1fr 1fr .7fr auto; align-items: center; gap: 8px; }
.smo__card-row i { height: 22px; border: 1px solid #c5c5c5; border-radius: 6px; }
.smo__card-row b { padding: 3px 12px; border: 1px solid #1c3fca; border-radius: 6px; color: #1c3fca; font-size: 11px; font-weight: 600; }
.smo figcaption { margin-top: 12px; color: var(--sf-muted); font-size: .8125rem; text-align: center; }
html.sf-js .smo:not(.is-seen) .smo__join { transform: scaleX(0); }
html.sf-js .smo:not(.is-seen) .smo__card { opacity: 0; transform: translateY(10px) scale(.96); }

/* Before and after, as rows */
.smba { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.smba-row {
  display: grid;
  grid-template-columns: 64px minmax(110px, .7fr) minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-r-md);
  background: var(--sf-glass);
  transition: opacity .45s ease, transform .6s var(--sm-out);
  transition-delay: calc(var(--i, 0) * 90ms + .2s);
}
html.sf-js .smres:not(.is-seen) .smba-row { opacity: 0; transform: translateX(-10px); }
.smba-row .smv__art { width: 64px; margin: 0; }
.smba-row__need { color: var(--sf-ink); font-weight: 700; line-height: 1.35; }
.smba-row__before, .smba-row__after { display: flex; align-items: center; gap: 8px; font-size: .9375rem; line-height: 1.4; }
.smba-row__before { color: var(--sf-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--sf-muted) 55%, transparent); }
.smba-row__before i { color: color-mix(in srgb, #dc2626 75%, var(--sf-muted)); }
.smba-row__arrow { color: var(--sf-muted); }
.smba-row__after { padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--sf-accent) 10%, transparent); color: var(--sf-ink); font-weight: 600; }
.smba-row__after i { color: var(--sf-ok); }

/* Card colour lives on a 3px top border, as on the route cards (.smx-card), so it
   follows the rounded corners. The page accent by default; the evidence columns take
   the colour of their icon. Each card's top padding is 2px less to keep its content
   where it was. */
:is(.smn-tile, .smp__day, .smp-stat, .smv, .smres-metric, .smres-col) { border-top: 3px solid var(--sm-top, var(--sf-accent)); }
.smv.is-me { border-top-color: var(--sf-accent); }
.smres-col.is-known { --sm-top: var(--sf-ok); }
.smres-col.is-open { --sm-top: var(--sf-warn); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .smx__grid { grid-template-columns: minmax(0, 1fr); }
  .smw__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .smw-step:nth-child(2)::after { display: none; }
  .smw__return { display: none; }
  .smw figcaption { margin-top: 14px; }
  .smres__metrics, .smres__evidence { grid-template-columns: minmax(0, 1fr); }
  .smp { grid-template-columns: minmax(0, 1fr); }
  .smv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smv-grid--change { grid-template-columns: minmax(0, 1fr); }
  .smo__owners .smv::after, .smo__join { display: none; }
  .smk ul { grid-template-columns: minmax(0, 1fr); }
  .smba-row { grid-template-columns: 56px minmax(0, 1fr); row-gap: 6px; padding: 8px 12px 10px 6px; }
  .smba-row .smv__art { grid-row: span 3; width: 56px; align-self: start; }
  .smba-row__arrow { display: none; }
}
@media (max-width: 720px) {
  .sml-step { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sml-step__yes { padding-left: 52px; }
  .sml-step__yes::before { display: none; }
  .sml-step:not(.is-last)::before { top: 50px; }
  .smn { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .smw__steps { grid-template-columns: minmax(0, 1fr); }
  .smw-step::after { display: none; }
  .smd__view { display: none; }
  .smv-grid { grid-template-columns: minmax(0, 1fr); }
  .smp__track { display: none; }
  .smp__steps { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 0; }
  .smp-step { transition-delay: calc(var(--i) * .25s); }
}

/* ==========================================================================
   8. Motion, contrast and print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .smh__world { animation: none; }
  .smh-chip, .smh-lane__track, .smh-gate { transition: none; }
  .smt *, .smr:not([hidden]), .smr__done:not([hidden]) { animation: none !important; }
  /* Still frames that tell the same story. */
  .smt--upi .smt__run { transform: translateX(70%); }
  .smt--upi .smt__coin { opacity: 1; }
  .smt--neft .smt__run--1 { transform: translateX(46%); }
  .smt--neft .smt__run--2 { transform: translateX(34%); }
  .smt--neft .smt__run--3 { transform: translateX(22%); }
  .smt--neft .smt__coin { opacity: 1; }
  .smt--rtgs .smt__beam { transform: scaleX(.6); opacity: .85; }
  .smt--rtgs .smt__run { transform: translateX(60%); }
  .smt--rtgs .smt__coin { opacity: 1; }
  html.sf-js .smw-step, html.sf-js .sml-step { opacity: 1; transform: none; transition: none; }
  .smw-lift, .smw-tile, .smw-step__text, .smw-step::after { transition: none; }
  .smres-bar i { transition: none; }
  html.sf-js .smres:not(.is-seen) .smres-bar i { transform: scaleX(var(--v)); }
  /* Every reveal shows its finished state at once. */
  html.sf-js :is(.smn, .smp, .smv-grid, .smo, .smres):not(.is-seen) :is(.smn-tickets i, .smn-doors span, .smp-step, .smv, .smo__card, .smba-row) { opacity: 1; transform: none; }
  html.sf-js .smn:not(.is-seen) .smn-ring__fill { stroke-dashoffset: calc(100 - var(--v)); }
  html.sf-js .smp:not(.is-seen) .smp__fill, html.sf-js .smo:not(.is-seen) .smo__join { transform: none; }
  html.sf-js .smp:not(.is-seen) .smp__run { transform: translateX(100%); }
  .smn-tickets i, .smn-doors span, .smn-ring__fill, .smp__fill, .smp__run, .smp-step, .smv, .smo__join, .smo__card, .smba-row, .smx-card, .smx-card__facts div, .smx__rule { transition: none; }
}
@media (forced-colors: active) {
  .smx-card, .smw-tile, .sml-step__q, .smc, .smr, .smr-route, .smres-metric, .smres-col, .smn-tile, .smp__day, .smp-stat, .smv, .smba-row { border: 1px solid CanvasText; }
  .smr-route:has(input:checked) { outline: 3px solid Highlight; }
  .sm-badge, .smt__coin, .smh-coin__face { forced-color-adjust: none; }
  .smc-field__chev { background: ButtonText; }
}
@media print {
  .smh__world, .smt * { animation: none !important; }
  .smd__bar { display: none; }
}
