/* The homepage's three families (M106 prototype): a list of the three on the left, and a stage on
   the right where each plays a short scene of the product doing its job. Scenes are drawn in em
   inside a container that sets its own font size, so one layout scales from phone to desktop. */

.fam {
  --fam-dur: 8s;
  overflow: hidden;
}
.fam__grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  margin-top: 56px;
}

/* The list */
.fam__tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fam__item {
  position: relative;
  padding: 18px 0 18px 26px;
}
.fam__item::before,
.fam__bar {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--ink-100);
}
.fam__bar {
  background: transparent;
  overflow: hidden;
}
.fam__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, var(--blue-500), var(--mint-500));
  transform: scaleY(0);
  transform-origin: top;
}
.fam__item.is-active .fam__bar i {
  transform: scaleY(1);
}
.fam.is-seen .fam__item.is-active .fam__bar i {
  animation: fam-fill var(--fam-dur) linear both;
  animation-play-state: paused;
}
.fam.is-playing .fam__item.is-active .fam__bar i {
  animation-play-state: running;
}
@keyframes fam-fill {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
.fam__tab {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 14px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.fam__tab:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 6px;
  border-radius: 8px;
}
.fam__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink-50);
  color: var(--ink-400);
  transition:
    background 0.3s,
    color 0.3s;
}
.fam__item.is-active .fam__icon--blue {
  background: var(--blue-50);
  color: var(--blue-600);
}
.fam__item.is-active .fam__icon--mint {
  background: var(--mint-50);
  color: var(--mint-700);
}
.fam__item.is-active .fam__icon--lilac {
  background: var(--lilac-100);
  color: var(--lilac-700);
}
.fam__name {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink-400);
  transition: color 0.3s;
}
.fam__tab:hover .fam__name,
.fam__item.is-active .fam__name {
  color: var(--ink-900);
}
.fam__line {
  grid-column: 2;
  margin-top: 2px;
  font-size: var(--fs-label);
  line-height: 1.45;
  color: var(--ink-500);
}
.fam__more {
  display: grid;
  grid-template-rows: 0fr;
  margin-left: 54px;
  opacity: 0;
  transition:
    grid-template-rows 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.3s;
}
.fam__more > * {
  min-height: 0;
  overflow: hidden;
}
.fam__item.is-active .fam__more {
  grid-template-rows: 1fr;
  opacity: 1;
}
/* Each product is a ruled row, its name on the left and one fact about it on the right, like a
   line on a statement. */
.fam__links {
  margin: 0;
  padding: 12px 0 0;
  list-style: none;
}
.fam__links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  column-gap: 12px;
  padding: 9px 0;
  font-size: var(--fs-label);
}
.fam__links li + li a {
  border-top: 1px solid var(--ink-100);
}
.fam__link-name {
  font-weight: 550;
  color: var(--ink-800);
  transition: color 0.15s;
}
.fam__link-fact {
  font-size: 13px;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.fam__links svg {
  color: var(--ink-300);
  transition:
    color 0.15s,
    transform 0.15s;
}
.fam__links a:hover .fam__link-name {
  color: var(--ink-900);
}
.fam__links a:hover svg {
  color: var(--blue-600);
  transform: translateX(2px);
}
.fam__links a:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 2px;
  border-radius: 6px;
}
.fam__more .link-arrow {
  display: inline-flex;
  padding-top: 14px;
}
.fam__note {
  margin-top: 20px;
  text-align: right;
  font-size: var(--fs-caption);
  color: var(--ink-400);
}

/* The stage */
.fam__stage {
  position: relative;
  aspect-ratio: 600 / 440;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background: var(--gradient-hero);
  box-shadow:
    0 40px 80px -40px rgba(20, 31, 94, 0.55),
    0 0 0 1px rgba(11, 16, 32, 0.06);
}
.fam__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 55% at 88% 12%, rgba(0, 209, 167, 0.26), transparent 70%),
    radial-gradient(50% 60% at 8% 100%, rgba(102, 128, 255, 0.36), transparent 70%);
}
.fam__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 7.2% 9.8%;
  mask-image: radial-gradient(75% 70% at 50% 40%, #000, transparent 85%);
  -webkit-mask-image: radial-gradient(75% 70% at 50% 40%, #000, transparent 85%);
}
.fam__scene {
  position: absolute;
  inset: 0;
  font-size: 2.1cqw;
  color: var(--ink-900);
}
.fam__scene:focus-visible {
  outline: 2px solid var(--mint-300);
  outline-offset: -6px;
  border-radius: 28px;
}
.fam__scene > div {
  position: absolute;
  inset: 0;
}
.fam__toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-inverse);
  cursor: pointer;
}
.fam__toggle[hidden] {
  display: none;
}
.fam__toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}
.fam__toggle:focus-visible {
  outline: 2px solid var(--mint-300);
  outline-offset: 2px;
}
.fam__toggle-play,
.fam__toggle[data-state="paused"] .fam__toggle-pause {
  display: none;
}
.fam__toggle[data-state="paused"] .fam__toggle-play {
  display: contents;
}

/* Shared parts of a scene: white panels, toasts and windows, all in em. */
.fs-panel,
.fs-toast,
.fs-win {
  position: absolute;
  background: #fff;
  border-radius: 1.1em;
  box-shadow:
    0 2.4em 4em -1.6em rgba(5, 8, 20, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.35);
}
.fs-panel {
  padding: 1.2em 1.3em;
}
.fs-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8em;
  font-size: 0.86em;
  font-weight: 600;
  color: var(--ink-500);
}
.fs-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.2em 0.7em 0.2em 0.55em;
  border-radius: 99em;
  background: var(--mint-50);
  color: var(--mint-800);
  font-style: normal;
  font-size: 0.9em;
}
.fs-live b {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--mint-500);
  box-shadow: 0 0 0 0 rgba(0, 209, 167, 0.5);
  animation: fs-ping 2s ease-out infinite;
}
@keyframes fs-ping {
  70% {
    box-shadow: 0 0 0 0.6em rgba(0, 209, 167, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 209, 167, 0);
  }
}
.fs-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 0.7em;
  background: var(--ink-50);
  color: var(--ink-700);
}
.fs-ic .icon {
  width: 1.15em;
  height: 1.15em;
}
.fs-ic--blue {
  background: var(--blue-50);
  color: var(--blue-600);
}
.fs-ic--mint {
  background: var(--mint-50);
  color: var(--mint-700);
}
.fs-ic--lilac {
  background: var(--lilac-100);
  color: var(--lilac-700);
}

/* Payments: four ways in, one balance. */
.fs-pay__wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
}
.fs-pay__wires path {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.5;
}
.fs-pay__wires .fs-pay__pulse {
  stroke: var(--mint-300);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 18 100;
  stroke-dashoffset: 18;
  opacity: 0;
}
.fs-pay__sources {
  position: absolute;
  left: 3.5%;
  top: 0;
  bottom: 0;
  width: 21.5%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fs-pay__sources li {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.6em;
  height: 2.9em;
  padding: 0 0.8em 0 0.45em;
  border-radius: 99em;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.95em;
  font-weight: 600;
  white-space: nowrap;
  transform: translateY(-50%);
}
.fs-pay__sources li:nth-child(1) {
  top: 20.9%;
}
.fs-pay__sources li:nth-child(2) {
  top: 38.6%;
}
.fs-pay__sources li:nth-child(3) {
  top: 56.4%;
}
.fs-pay__sources li:nth-child(4) {
  top: 74.1%;
}
.fs-pay__sources li > span {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.fs-pay__sources .icon {
  width: 1.05em;
  height: 1.05em;
}
.fs-pay__panel {
  left: 47%;
  top: 9%;
  width: 48.5%;
  bottom: 9%;
  display: flex;
  flex-direction: column;
}
.fs-pay__rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fs-pay__rows li {
  display: flex;
  align-items: center;
  gap: 0.8em;
  height: 3.65em;
  border-top: 1px solid var(--ink-100);
}
.fs-pay__rows li:first-child {
  border-top: 0;
}
.fs-pay__what {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.fs-pay__what b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.98em;
}
.fs-pay__what small {
  font-size: 0.82em;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}
.fs-pay__amt {
  font-size: 1.02em;
  color: var(--mint-700);
  font-variant-numeric: tabular-nums;
}
.fs-pay__keep {
  margin-top: auto;
  padding: 0.9em 1em;
  border-radius: 0.8em;
  background: var(--ink-50);
}
.fs-pay__keep-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--ink-600);
}
.fs-pay__keep-top b {
  font-size: 1.75em;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}
.fs-pay__meter {
  display: block;
  height: 0.45em;
  margin: 0.5em 0 0.55em;
  border-radius: 99em;
  background: var(--ink-200);
  overflow: hidden;
}
.fs-pay__meter i {
  display: block;
  width: 99%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-500), var(--mint-500));
  transform-origin: left;
}
.fs-pay__keep small {
  display: block;
  font-size: 0.78em;
  line-height: 1.4;
  color: var(--ink-500);
}

/* Accounts & cards: the card, what it spent, what came back. */
.fs-acc__card {
  position: absolute;
  left: 46%;
  top: 9%;
  width: 46%;
  aspect-ratio: 1.586;
  perspective: 60em;
}
.fs-acc__card-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto auto;
  padding: 1.5em 1.7em;
  border-radius: 1.4em;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #3fdfbf 0%, #00b592 55%, #008f74 100%);
  box-shadow:
    0 3em 5em -2em rgba(5, 8, 20, 0.85),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: rotateX(16deg) rotateY(-20deg) rotateZ(5deg);
  overflow: hidden;
}
.fs-acc__card-face::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -40%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg) translateX(-100%);
}
.fs-acc__card-face img {
  width: 2.6em;
  height: auto;
}
.fs-acc__chip {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 2.6em;
  height: 2em;
  border-radius: 0.4em;
  background: linear-gradient(135deg, #f3e7c4, #c9b27a);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.fs-acc__num {
  grid-column: 1 / -1;
  font-size: 1.25em;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.fs-acc__name {
  grid-column: 1 / -1;
  margin-top: 0.2em;
  font-size: 0.85em;
  font-weight: 500;
  opacity: 0.85;
}
.fs-toast {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.8em 1em 0.8em 0.8em;
  line-height: 1.25;
}
.fs-toast > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.fs-toast small {
  font-size: 0.8em;
  color: var(--ink-500);
}
.fs-toast__amt {
  font-variant-numeric: tabular-nums;
}
.fs-toast--mint .fs-toast__amt {
  color: var(--mint-700);
}
.fs-acc__spend {
  left: 4%;
  top: 13%;
  width: 44%;
}
.fs-acc__back {
  left: 9%;
  top: 33%;
  width: 37%;
}
.fs-acc__panel {
  left: 5%;
  bottom: 9%;
  width: 52%;
}
.fs-acc__bal {
  display: block;
  font-size: 2.3em;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.fs-acc__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.9em;
  font-size: 0.85em;
  color: var(--ink-600);
}
.fs-acc__row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.fs-acc__row .icon {
  width: 1.1em;
  height: 1.1em;
}
.fs-acc__limit {
  display: block;
  height: 0.45em;
  margin-top: 0.5em;
  border-radius: 99em;
  background: var(--ink-100);
  overflow: hidden;
}
.fs-acc__limit i {
  display: block;
  width: 96%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-500), var(--mint-500));
  transform-origin: left;
}
.fs-acc__row--payout {
  padding-top: 0.8em;
  border-top: 1px solid var(--ink-100);
}
.fs-acc__free {
  padding: 0.15em 0.7em;
  border-radius: 99em;
  background: var(--mint-50);
  color: var(--mint-800);
  font-weight: 650;
}

/* Business tools: three apps, one day's takings. */
.fs-tools__free {
  position: absolute;
  left: 4%;
  top: 5.5%;
  padding: 0.35em 0.9em;
  border-radius: 99em;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.9em;
  font-weight: 600;
}
.fs-win {
  overflow: hidden;
  padding: 0 1em 1em;
}
.fs-win__bar {
  display: flex;
  align-items: center;
  gap: 0.35em;
  margin: 0 -1em 0.9em;
  padding: 0.7em 1em;
  border-bottom: 1px solid var(--ink-100);
  font-size: 0.8em;
  font-weight: 600;
  color: var(--ink-500);
}
.fs-win__bar i {
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  background: var(--ink-200);
}
.fs-win__bar span {
  margin-left: 0.5em;
}
.fs-tools__till {
  left: 4%;
  top: 15%;
  width: 40%;
}
.fs-tools__tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45em;
}
.fs-tools__tiles span {
  padding: 0.9em 0.5em;
  border-radius: 0.6em;
  background: var(--ink-50);
  font-size: 0.8em;
  font-weight: 600;
  text-align: center;
}
.fs-tools__charge {
  position: relative;
  margin-top: 0.7em;
  height: 2.6em;
  border-radius: 0.6em;
  overflow: hidden;
  font-size: 0.92em;
  font-weight: 650;
  color: #fff;
}
.fs-tools__charge > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
}
.fs-tools__charge-a {
  background: var(--blue-500);
  opacity: 0;
}
.fs-tools__charge-b {
  background: var(--mint-600);
}
.fs-tools__order {
  left: 4%;
  top: 62%;
  width: 40%;
}
.fs-tools__product {
  display: flex;
  align-items: center;
  gap: 0.8em;
}
.fs-tools__product > span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.fs-tools__product small {
  font-size: 0.8em;
  color: var(--ink-500);
}
.fs-tools__img {
  width: 2.6em;
  height: 3em;
  border-radius: 0.5em;
  background: linear-gradient(160deg, #efe6d4, #d9ccb2);
}
.fs-tools__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-top: 0.7em;
  padding: 0.2em 0.7em;
  border-radius: 99em;
  background: var(--mint-50);
  color: var(--mint-800);
  font-size: 0.8em;
  font-weight: 650;
}
.fs-tools__book {
  left: 48%;
  top: 15%;
  width: 48%;
}
.fs-tools__slot {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
}
.fs-tools__slot b {
  padding: 0.3em 0.7em;
  border-radius: 0.5em;
  background: var(--blue-500);
  color: #fff;
  font-size: 0.9em;
}
.fs-tools__slot span {
  font-weight: 600;
}
.fs-tools__today {
  left: 48%;
  top: 48%;
  width: 48%;
  bottom: 7%;
  display: flex;
  flex-direction: column;
}
.fs-tools__today .fs-panel__head {
  margin-bottom: 0.3em;
}
.fs-tools__total {
  font-size: 2em;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.fs-tools__bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.5em;
  margin: 0.6em 0;
}
.fs-tools__bars i {
  flex: 1;
  height: var(--h);
  border-radius: 0.35em 0.35em 0.15em 0.15em;
  background: linear-gradient(180deg, var(--blue-400), var(--blue-600));
  transform-origin: bottom;
}
.fs-tools__bars i:last-child {
  background: linear-gradient(180deg, var(--mint-400), var(--mint-600));
}
.fs-tools__today small {
  font-size: 0.78em;
  color: var(--ink-500);
}
.fs-tools:not(:has(.fs-tools__till)) .fs-tools__order {
  top: 15%;
}

/* Motion. Each scene's resting state is its last frame: the animations only bring things in, so
   with reduced motion (or before the band is seen) everything is simply there. */
.fam.is-seen .fam__scene:not([hidden]) .fs-pay__panel {
  animation: fs-rise 0.7s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-pay__pulse {
  animation: fs-wire 0.75s calc(0.6s + var(--i) * 0.85s) cubic-bezier(0.4, 0, 0.6, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-pay__rows li {
  animation: fs-row 0.5s calc(1.25s + var(--i) * 0.85s) cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-pay__sources li {
  animation:
    fs-in 0.6s calc(var(--i) * 0.08s) cubic-bezier(0.2, 0.8, 0.2, 1) both,
    fs-send 0.9s calc(0.45s + var(--i) * 0.85s) ease both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-pay__keep {
  animation: fs-rise 0.6s 4.6s ease both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-pay__meter i {
  animation: fs-grow 1.1s 4.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes fs-in {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 0.8em));
  }
}
@keyframes fs-rise {
  from {
    opacity: 0;
    transform: translateY(1.6em) scale(0.98);
  }
}
@keyframes fs-wire {
  0% {
    opacity: 1;
    stroke-dashoffset: 18;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    stroke-dashoffset: -100;
  }
}
@keyframes fs-row {
  from {
    opacity: 0;
    transform: translateX(-1.2em);
    background: var(--mint-50);
  }
  60% {
    opacity: 1;
    background: var(--mint-50);
  }
}
@keyframes fs-send {
  0%,
  100% {
    background: rgba(255, 255, 255, 0.1);
  }
  30% {
    background: rgba(0, 209, 167, 0.32);
    box-shadow: inset 0 0 0 1px rgba(77, 226, 195, 0.7);
  }
}
@keyframes fs-grow {
  from {
    transform: scaleX(0);
  }
}

.fam.is-seen .fam__scene:not([hidden]) .fs-acc__card-face {
  animation:
    fs-card 1s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    fs-float 6s 1s ease-in-out infinite;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-acc__card-face::after {
  animation: fs-sheen 1s 1.1s ease both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-acc__panel {
  animation: fs-rise 0.7s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-acc__spend {
  animation: fs-pop 0.6s 1.2s cubic-bezier(0.2, 0.8, 0.2, 1.2) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-acc__limit i {
  animation: fs-limit 1s 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-acc__back {
  animation: fs-pop 0.6s 2.6s cubic-bezier(0.2, 0.8, 0.2, 1.2) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-acc__bal {
  animation: fs-tick 0.9s 3.1s ease both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-acc__row--payout {
  animation: fs-rise 0.6s 3.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes fs-card {
  from {
    opacity: 0;
    transform: rotateX(30deg) rotateY(-36deg) rotateZ(10deg) translateY(3em);
  }
}
@keyframes fs-float {
  50% {
    transform: rotateX(12deg) rotateY(-14deg) rotateZ(4deg) translateY(-0.6em);
  }
}
@keyframes fs-sheen {
  to {
    transform: skewX(-18deg) translateX(560%);
  }
}
@keyframes fs-pop {
  from {
    opacity: 0;
    transform: translateY(0.8em) scale(0.92);
  }
}
@keyframes fs-limit {
  from {
    transform: scaleX(0.04);
  }
}
@keyframes fs-tick {
  40% {
    color: var(--mint-700);
    transform: scale(1.03);
  }
}
.fs-acc__bal {
  transform-origin: left center;
}

.fam.is-seen .fam__scene:not([hidden]) .fs-tools__free {
  animation: fs-pop 0.5s 0.1s ease both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-tools__till {
  animation: fs-rise 0.7s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-tools__tiles .is-hit {
  animation: fs-hit 0.6s 1.1s ease both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-tools__charge-a {
  animation: fs-charge 1.6s 0.6s ease both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-tools__charge-b {
  animation: fs-paid 0.5s 2.1s ease both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-tools__order {
  animation: fs-rise 0.7s 2.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-tools__book {
  animation: fs-rise 0.7s 3.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-tools__today {
  animation: fs-rise 0.7s 3.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fam.is-seen .fam__scene:not([hidden]) .fs-tools__bars i {
  animation: fs-bar 0.8s calc(4s + var(--n, 0) * 0.07s) cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.fs-tools__bars i:nth-child(2) {
  --n: 1;
}
.fs-tools__bars i:nth-child(3) {
  --n: 2;
}
.fs-tools__bars i:nth-child(4) {
  --n: 3;
}
.fs-tools__bars i:nth-child(5) {
  --n: 4;
}
.fs-tools__bars i:nth-child(6) {
  --n: 5;
}
.fs-tools__bars i:nth-child(7) {
  --n: 6;
}
@keyframes fs-hit {
  50% {
    background: var(--mint-100);
    box-shadow: inset 0 0 0 2px var(--mint-500);
    transform: scale(0.95);
  }
  100% {
    background: var(--mint-50);
    box-shadow: inset 0 0 0 1.5px var(--mint-500);
  }
}
.fs-tools__tiles .is-hit {
  background: var(--mint-50);
  box-shadow: inset 0 0 0 1.5px var(--mint-500);
}
@keyframes fs-charge {
  0%,
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes fs-paid {
  from {
    opacity: 0;
  }
}
@keyframes fs-bar {
  from {
    transform: scaleY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fam .fam__scene *,
  .fam .fam__scene *::after,
  .fam .fam__bar i {
    animation: none !important;
  }
  .fam__bar {
    display: none;
  }
}

/* Narrow screens: the stage first, the list under it. */
@media (max-width: 960px) {
  .fam__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin-top: 40px;
  }
  .fam__stage {
    order: -1;
    border-radius: 20px;
  }
  .fam__name {
    font-size: 19px;
  }
  .fam__note {
    text-align: left;
  }
}
