@font-face {
  font-family: "Instrument Sans";
  src: url("assets/sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --paper: #fffdf9;
  --ink: #111111;
  --muted: #5f5f5f;
  --line: #e6e1d9;
  --accent: #7a55c6;
  --accent-soft: #f1ecfb;
  --green: #246747;
  --red: #c40000;
  --gutter: clamp(20px, 4.4vw, 64px);
  --bill-w: min(88vw, 112svh);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    400 17px/1.5 "Instrument Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.96;
  text-wrap: balance;
}

p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
}

.skip:focus {
  top: 16px;
}

.eyebrow {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: 18px;
}

.fine {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.minus {
  color: var(--red);
}

.plus {
  color: var(--green);
}

/* ---------- Story ---------- */

.story {
  --units: 18;
  position: relative;
}

.js .story {
  height: calc((var(--units) + 1) * 100svh);
}

.anchor {
  position: absolute;
  left: 0;
  top: calc(var(--at) * 100svh);
  width: 1px;
  height: 1px;
}

.js .viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

/* Hero: the bill, then the title */

.hero {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform: translateY(var(--hero-y, 0px));
  opacity: var(--hero-o, 1);
}

.title {
  position: absolute;
  left: var(--gutter);
  top: 13svh;
  z-index: 1;
  font-size: clamp(64px, 12.4vw, 210px);
  line-height: 0.9;
  letter-spacing: -0.058em;
  opacity: var(--title-o, 1);
  transform: translateY(var(--title-y, 0px));
}

.hero.title-front .title {
  z-index: 3;
}

.bill {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 2;
  width: var(--bill-w);
  transform: translate(-50%, -50%) translate(var(--bx, 0px), var(--by, 0px)) rotate(var(--br, -4deg))
    scale(var(--bs, 1));
  filter: drop-shadow(0 28px 36px rgba(48, 38, 16, 0.16));
  will-change: transform;
}

.cue {
  position: absolute;
  left: 50%;
  top: calc(44% + var(--bill-w) * 0.3 + 18px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transform: translateX(-50%);
  opacity: var(--cue-o, 1);
  pointer-events: auto;
}

.cue-dot {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #c9c4bb;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cue-dot::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.cue:hover .cue-dot {
  border-color: var(--ink);
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 7svh;
  color: var(--muted);
  font-size: 18px;
  opacity: var(--hint-o, 0);
}

/* Copy column and stage */

.grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 34%) 1fr;
  gap: 4vw;
  padding: 0 var(--gutter);
}

.copy {
  position: relative;
}

.step h2 {
  max-width: 11.5em;
  font-size: clamp(40px, 4vw, 78px);
}

.step .sub {
  margin-top: 26px;
  font-size: clamp(16px, 1.1vw, 21px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.step .body {
  max-width: 31ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(15px, 1.05vw, 20px);
}

.step[data-step="pay"] .body {
  margin-top: 22px;
}

.js .step {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-50% + 16px));
  transition:
    opacity 0.45s ease,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    visibility 0s 0.45s;
}

.js .step.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
  transition:
    opacity 0.45s ease 0.08s,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s,
    visibility 0s;
}

.stage {
  position: relative;
  container-type: size;
}

.layer {
  position: absolute;
  inset: 0;
  opacity: var(--o, 0);
  pointer-events: none;
}

/* Objects placed by centre point: --x and --y are percentages of the stage. */
.wallet,
.card,
.cafe,
.terminal {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(calc(var(--x) * 1cqw - 50%), calc(var(--y) * 1cqh - 50%)) rotate(calc(var(--r, 0) * 1deg))
    scale(var(--s, 1));
}

.wallet {
  --x: 50;
  --y: 56;
  z-index: 3;
  width: 52cqmin;
  opacity: var(--o, 0);
  filter: drop-shadow(0 18px 24px rgba(60, 40, 90, 0.18));
}

.tap-layer {
  z-index: 1;
}

.cafe {
  --x: 39;
  --y: 73;
  width: 62cqmin;
  filter: drop-shadow(0 16px 22px rgba(60, 40, 10, 0.12));
}

.terminal {
  --x: 71;
  --y: 69;
  width: 16cqmin;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.2));
}

.terminal-ping {
  position: absolute;
  left: 50%;
  top: 21%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #4cc27a;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
}

.is-tapped .terminal-ping {
  animation: ping 1.6s ease-out infinite;
}

@keyframes ping {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.9);
  }
}

/* The metal card is CSS so its name and finish stay editable. */
.card {
  z-index: 2;
  width: 46cqmin;
  aspect-ratio: 1.586;
  border-radius: 3.6cqmin;
  opacity: var(--o, 0);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.003 0.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0 0 0 0 0.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")
      center / cover,
    linear-gradient(112deg, #d3d6d9 0%, #a3a8ae 20%, #eceef0 40%, #b5b9be 57%, #91969c 75%, #d6d9dc 100%);
  background-blend-mode: overlay, normal;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -3px 8px rgba(0, 0, 0, 0.16),
    0 2.4cqmin 5cqmin -1.2cqmin rgba(30, 25, 20, 0.38);
  will-change: transform;
}

.card.is-free {
  z-index: 4;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, 0.5) 44%, transparent 60%);
  mix-blend-mode: soft-light;
}

.chip {
  position: absolute;
  left: 9%;
  top: 33%;
  width: 13%;
}

.contactless {
  position: absolute;
  right: 8%;
  top: 11%;
  width: 7%;
  color: rgba(55, 58, 62, 0.45);
}

.card-name {
  position: absolute;
  left: 9%;
  bottom: 11%;
  color: rgba(66, 69, 74, 0.55);
  font-size: 3.1cqmin;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* Authorization and clearing path */

.chain {
  --gap: min(17cqh, 150px);
  --pos: 0;
}

.path {
  position: absolute;
  left: 18cqw;
  top: 50%;
  padding-left: 38px;
  transform: translateY(calc(-50% - 3cqh));
}

.nodes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.path::before {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(var(--gap) / 2);
  bottom: calc(var(--gap) / 2);
  width: 2px;
  background: linear-gradient(var(--accent-soft), #cdbdf0);
}

.node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--gap);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  white-space: nowrap;
  transition: color 0.3s;
}

.node::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  border: 1.5px solid #b9a6e6;
  background: var(--paper);
}

.node img {
  width: min(13cqmin, 92px);
  height: min(11cqmin, 76px);
  object-fit: contain;
}

.node.is-active {
  color: var(--accent);
  font-weight: 600;
}

.token {
  position: absolute;
  right: calc(100% + 15px);
  top: calc(var(--gap) / 2 + var(--pos) * var(--gap));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #d9cdf3;
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(90, 60, 160, 0.12);
  opacity: var(--token-o, 0);
  transform: translateY(-50%);
}

.token::after {
  content: "";
  position: absolute;
  right: -27px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(122, 85, 198, 0.18);
}

.token.is-back {
  color: var(--green);
  border-color: #b9dcc7;
}

.token.is-back::after {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(36, 103, 71, 0.16);
}

.checks {
  margin: 0 0 0 10px;
  padding: 0;
  list-style: none;
  color: var(--green);
  font-size: 14px;
  font-weight: 500;
}

.checks li {
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.35s,
    transform 0.35s;
}

.checks li::before {
  content: "✓ ";
}

.checks li.is-on {
  opacity: 1;
  transform: none;
}

.chain-caption {
  position: absolute;
  left: calc(18cqw + 38px);
  top: calc(50% + var(--gap) * 2 + 1cqh);
  max-width: 30ch;
  color: var(--muted);
  font-size: 13.5px;
}

/* Receipt */

.receipt-layer {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 22px 26px rgba(40, 30, 10, 0.16));
}

.receipt {
  width: min(300px, max(250px, 44cqmin));
  padding: 30px 26px 40px;
  background: linear-gradient(180deg, #f6f4ef, #eeebe4 70%, #f4f2ec);
  color: #2b2b2b;
  font:
    500 13px/1.6 ui-monospace,
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  transform: translateY(var(--ry, 0px)) rotate(4deg);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}

.receipt-head {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.receipt-head small {
  display: block;
  margin: 2px 0 18px;
  font-size: 12px;
  letter-spacing: 0.2em;
}

.receipt dl {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid #c9c5bc;
}

.receipt dl div,
.receipt-total {
  display: flex;
  justify-content: space-between;
}

.receipt dd {
  margin: 0;
}

.receipt-total {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid #3a3a3a;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.receipt-foot {
  margin-top: 14px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Settlement rail: the bill holds still, the banks slide past it. */

.rail {
  --pitch: 34cqh;
  --pos: 0;
  --rail-x: 16cqw;
}

.rail-line {
  position: absolute;
  left: var(--rail-x);
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(transparent, #b79cf0 18%, var(--accent) 50%, #b79cf0 82%, transparent);
  box-shadow: 0 0 18px 3px rgba(122, 85, 198, 0.28);
}

.rail-caption {
  position: absolute;
  left: calc(var(--rail-x) + 18cqmin);
  top: 7cqh;
  z-index: 2;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rail-caption.is-paid {
  color: var(--green);
}

.rail-window {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(transparent 4%, #000 24%, #000 84%, transparent 100%);
  mask-image: linear-gradient(transparent 4%, #000 24%, #000 84%, transparent 100%);
}

.rail-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(calc(var(--pos) * var(--pitch) * -1));
}

.rail-node {
  position: absolute;
  left: calc(var(--rail-x) + 18cqmin);
  top: calc(var(--i) * var(--pitch));
  display: flex;
  align-items: center;
  gap: 3cqmin;
  opacity: 0.28;
  transform: translateY(-50%);
  transition: opacity 0.4s;
}

.rail-node::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 18cqmin;
  height: 1px;
  background: #cfc8bd;
}

.rail-node.is-active {
  opacity: 1;
}

.rail-node img {
  width: 26cqmin;
  height: 22cqmin;
  object-fit: contain;
}

.rail-node p {
  color: var(--muted);
  font-size: 14.5px;
}

.rail-node strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: clamp(16px, 2.6cqmin, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}

.rail-bill {
  position: absolute;
  left: var(--rail-x);
  top: 50%;
  z-index: 2;
  width: 20cqmin;
  transform: translate(-50%, -50%) rotate(-3deg);
  filter: drop-shadow(0 10px 14px rgba(40, 30, 10, 0.2));
}

.rail-amount {
  position: absolute;
  left: 50%;
  bottom: -12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%) rotate(3deg);
}

.rail-amount.is-paid {
  background: var(--green);
}

/* ---------- Chapter pill ---------- */

.pill {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(30, 25, 20, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.pill.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.pill > button {
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
}

.pill > button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.pill-chapter {
  color: var(--muted);
}

.pill-next {
  font-weight: 600;
}

.pill-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  display: grid;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 16px 40px rgba(30, 25, 20, 0.12);
}

.pill-menu[hidden] {
  display: none;
}

.pill-menu button {
  padding: 9px 12px;
  border-radius: 9px;
  text-align: left;
}

.pill-menu button:hover,
.pill-menu button[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Fees ---------- */

.fees,
.trip {
  max-width: 1360px;
  margin: 0 auto;
  padding: 16vh var(--gutter) 10vh;
}

.fees h2,
.trip h2 {
  font-size: clamp(44px, 5vw, 78px);
}

.fees-intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  gap: 6vw;
  align-items: center;
}

.fees-copy p {
  margin-top: 26px;
  font-size: 17px;
}

.fees-copy .fine {
  max-width: 34ch;
  margin-top: 18px;
}

.big-number {
  margin: 0;
  font-size: clamp(96px, 13vw, 210px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.85;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.change {
  position: relative;
  width: min(100%, 560px);
  margin: 3.5vw auto 0;
}

.note-two {
  width: 84%;
  transform: rotate(-3deg);
  filter: drop-shadow(0 18px 22px rgba(40, 30, 10, 0.15));
}

.coins {
  position: absolute;
  right: 0;
  bottom: -14%;
  width: 34%;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.18));
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.15fr;
  gap: 7vw;
  align-items: start;
  margin-top: 18vh;
}

.lede {
  max-width: 34ch;
  margin-top: 20px;
  color: var(--muted);
}

.slider {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 40px;
  font-size: 14px;
  color: var(--muted);
}

.slider output {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  margin: 12px 0 0;
  accent-color: var(--ink);
}

.ledger {
  margin: 28px 0 12px;
  font-size: 15px;
}

.ledger div {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.ledger dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

details {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

summary {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  transition: transform 0.25s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details ul {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14.5px;
}

details li + li {
  margin-top: 6px;
}

details b {
  color: var(--ink);
}

.shares {
  margin: 0;
  padding: 0;
  list-style: none;
}

.share {
  padding: 26px 0 22px;
  border-top: 1px solid var(--line);
}

.share-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.share h3 {
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.035em;
}

.share-head b {
  font-size: clamp(26px, 2.4vw, 34px);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.share p {
  max-width: 42ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.bar {
  display: block;
  height: 3px;
  margin-top: 22px;
  background: var(--line);
}

.reveal-ready .share,
.reveal-ready .trip li,
.reveal-ready .ledger div {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s ease var(--d, 0ms),
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}

.reveal-ready .is-in {
  opacity: 1;
  transform: none;
}

.reveal-ready .share:not(.is-in) .bar span {
  width: 0;
}

.bar span {
  display: block;
  width: calc(var(--share) * 1%);
  height: 100%;
  background: var(--ink);
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.share small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Trip recap ---------- */

.trip {
  padding-top: 12vh;
  border-top: 1px solid var(--line);
}

.trip ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.trip li span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 22px;
  border: 1.5px solid #b9a6e6;
  border-radius: 50%;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.trip h3 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.trip p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.again {
  display: inline-block;
  margin-top: 64px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px var(--gutter) 90px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Without JavaScript the story reads as a list ---------- */

.no-js .hero {
  position: relative;
  height: 100svh;
}

.no-js .grid {
  position: static;
  display: block;
  max-width: 760px;
}

.no-js .stage,
.no-js .pill,
.no-js .cue {
  display: none;
}

.no-js .step {
  margin: 0 0 14vh;
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  :root {
    --bill-w: 138vw;
  }

  .title {
    top: 16svh;
    font-size: 19vw;
  }

  .bill {
    top: 46%;
  }

  .cue {
    top: auto;
    bottom: 10svh;
  }

  .grid {
    grid-template-columns: 1fr;
    grid-template-rows: 34svh 1fr;
    gap: 0;
    padding-top: 8svh;
    padding-bottom: 72px;
  }

  .js .step {
    top: 0;
    transform: translateY(14px);
  }

  .js .step.is-active {
    transform: none;
  }

  .step h2 {
    font-size: 34px;
  }

  .step .sub {
    margin-top: 16px;
    font-size: 15px;
  }

  .step .body {
    font-size: 14px;
  }

  .chain {
    --gap: 14cqh;
  }

  .path {
    left: 30cqw;
    padding-left: 30px;
  }

  .node {
    gap: 12px;
    font-size: 15px;
  }

  .node::before {
    left: -30px;
  }

  .token {
    right: calc(100% + 11px);
    font-size: 11.5px;
    padding: 6px 9px;
  }

  .token::after {
    right: -23px;
  }

  .checks {
    position: absolute;
    left: 0;
    top: 86%;
    margin: 0;
    font-size: 12.5px;
  }

  .chain-caption {
    display: none;
  }

  .rail {
    --rail-x: 18cqw;
  }

  .rail-node {
    left: calc(var(--rail-x) + 22cqmin);
  }

  .rail-node::before {
    width: 22cqmin;
  }

  .rail-node {
    gap: 10px;
  }

  .rail-node img {
    width: 26cqmin;
    height: 20cqmin;
  }

  .rail-node p {
    font-size: 12px;
  }

  .rail-node strong {
    font-size: 14px;
  }

  .rail-bill {
    width: 28cqmin;
  }

  .rail-caption {
    left: var(--gutter);
    right: var(--gutter);
    top: 2cqh;
  }

  .pill {
    bottom: 14px;
    font-size: 12px;
  }

  .pill > button {
    padding: 8px 11px;
  }

  .fees-intro,
  .split {
    grid-template-columns: 1fr;
  }

  .fees-figure {
    margin-top: 40px;
  }

  .trip ol {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .is-tapped .terminal-ping {
    animation: none;
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }

  .js .step,
  .js .step.is-active,
  .checks li,
  .bar span {
    transition-duration: 0.01s;
    transition-delay: 0s;
  }
}
