/* Caravel Pay landing: interactive layer (hero checkout demo, payment flow, fee calculator,
   brand marks). Loaded after landing.css; demo.js drives the states. Without JS everything
   here still renders as a static picture. */

/* =========================================================
   BRAND MARKS: unaltered files on a uniform white badge face
   ========================================================= */
.mbadges { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.mbadge {
  flex: none;
  display: block;
  width: 36px;
  height: 24px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 24, 33, 0.12), 0 1px 1px rgba(20, 24, 33, 0.04);
  object-fit: contain;
}
.mbadge-lg { width: 48px; height: 32px; border-radius: 6px; }
.mbadge-sm { width: 27px; height: 18px; border-radius: 4px; }
.usdc-mark { flex: none; width: 24px; height: 24px; }
.pg-mark { flex: none; width: 14px; height: 14px; }

/* Currency "$" in large amounts, same size, never a superscript. Measured from rendered ink at 3x:
   inline, Inter Tight's "$" is already centred on the digits (its S body sags ~0.01em), but inside the
   demo coin face (a centred 40px box) it sat 0.07em low, which is what showed in the hero. */
.cur { position: relative; top: -0.01em; }
.coin-usd .cur { top: -0.07em; }

/* methods strip */
.pm-chips { gap: 10px; }
.pm-chips li { height: auto; padding: 0; border: 0; background: none; }
.usdc-chip { gap: 8px; padding: 0 16px 0 7px !important; height: 40px !important; }
.usdc-chip .on { color: var(--ink-3); font-weight: 450; }
.usdc-chip .pg-mark { width: 15px; height: 15px; margin-right: -2px; }

/* =========================================================
   HERO: the ship can be dragged and nudged
   ========================================================= */
.sea { z-index: 4; }
.ship-drag {
  pointer-events: auto;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.ship-drag.is-held { cursor: grabbing; }
html:not(.js) .ship-drag { pointer-events: none; cursor: default; }

/* =========================================================
   HERO: checkout demo
   ========================================================= */
.mockup-body { position: relative; }
.mockup[data-demo] { margin-top: 44px; }
.mockup-body.is-held { cursor: grabbing; }
.demo-hint {
  position: absolute;
  top: -31px;
  left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--moon-2);
  transition: opacity 0.4s ease;
}
.demo-hint .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(242, 181, 68, 0.5);
  animation: hint-ping 2.4s ease-out infinite;
}
@keyframes hint-ping {
  0% { box-shadow: 0 0 0 0 rgba(242, 181, 68, 0.55); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(242, 181, 68, 0); }
}
.mockup.was-used .demo-hint { opacity: 0; }
html:not(.js) .demo-hint { display: none; }
.is-offscreen .demo-hint .dot { animation-play-state: paused; }

.window-bar[data-drag-handle] { cursor: grab; touch-action: none; }
.is-held .window-bar[data-drag-handle] { cursor: grabbing; }
html:not(.js) .window-bar[data-drag-handle] { cursor: default; touch-action: auto; }
.window-grip {
  justify-self: end;
  display: grid;
  gap: 3px;
  opacity: 0.5;
}
.window-grip span {
  width: 14px; height: 2px;
  border-radius: 2px;
  background: #cfc6b4;
}

/* payment method radios: native inputs, styled rows */
.co-method {
  position: relative;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.co-method input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
  pointer-events: none;
}
.co-method:hover { border-color: rgba(20, 24, 33, 0.3); }
.co-method:has(input:checked),
.co-method.is-selected { border: 1.5px solid var(--ink); }
.co-method:has(input:checked) .radio,
.co-method.is-selected .radio { border: 5px solid var(--ink); }
.co-method .radio { transition: border-width 0.18s ease; }
.co-method:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.co-method .mbadges { margin-left: auto; }
.mockup.is-busy .co-method { cursor: default; }
.mockup.is-busy .co-method:not(.is-selected) { opacity: 0.5; }

/* pay button: a real button with a progress fill */
.co-button {
  position: relative;
  width: 100%;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background-color 0.35s ease, transform 0.12s ease;
}
.co-button:hover { background: #000; }
.co-button:active { transform: scale(0.985); }
.co-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.co-progress {
  position: absolute;
  inset: 0;
  background: rgba(246, 242, 233, 0.16);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.3, 0.6, 0.3, 1);
}
.co-btn-label { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.co-btn-label svg { width: 15px; height: 15px; }
.mockup.is-busy .co-button { cursor: progress; }
.mockup.is-busy .co-btn-label svg { animation: btn-spin 0.9s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
.mockup.s5 .co-button { background: var(--green); cursor: default; }
.mockup.s5 .co-progress { opacity: 0; }
.mockup.s5 .co-btn-label svg { animation: none; }

.co-fine { min-height: 34px; display: grid; place-items: center; }
.co-fine > * { grid-area: 1 / 1; }
.co-replay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.co-replay:hover { border-color: rgba(20, 24, 33, 0.3); background: var(--cream); }
.co-replay svg { width: 14px; height: 14px; }
.co-replay[hidden] { display: none; }
.mockup.s5 .fine-idle { visibility: hidden; }

/* left column: label + amount morph */
.co-label { display: grid; }
.co-label > span { grid-area: 1 / 1; transition: opacity 0.35s ease, transform 0.35s ease; }
.co-label-b { opacity: 0; transform: translateY(6px); }
.mockup.s2 .co-label-a { opacity: 0; transform: translateY(-6px); }
.mockup.s2 .co-label-b { opacity: 1; transform: none; }

.co-amount { display: flex; align-items: center; }
.co-amount .amt-unit { align-self: flex-end; margin-bottom: 7px; }
.coin {
  position: relative;
  flex: none;
  width: 0.56em;
  height: 40px;
  perspective: 300px;
  transition: width 0.5s cubic-bezier(0.3, 0.7, 0.2, 1), margin 0.5s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.coin-face {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.75s cubic-bezier(0.35, 0.1, 0.2, 1), background-color 0.35s ease, color 0.35s ease, font-size 0.35s ease, box-shadow 0.35s ease;
}
.coin-usd {
  display: grid;
  place-items: center;
  font: inherit;
  line-height: 1;
  color: var(--ink);
}
.coin-usdc { transform: rotateY(-180deg); }
.mockup.s1 .coin { width: 40px; margin-right: 10px; }
.mockup.s1 .coin-usd {
  background: var(--ink);
  color: var(--cream);
  font-size: 21px;
  box-shadow: 0 6px 14px -6px rgba(20, 24, 33, 0.5);
}
.mockup.s2 .coin-usd { transform: rotateY(180deg); }
.mockup.s2 .coin-usdc { transform: rotateY(0deg); }
.amt-num { display: inline-block; transition: transform 0.4s ease; }
.amt-c {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  vertical-align: bottom;
  opacity: 0;
  transition: max-width 0.4s ease 0.3s, opacity 0.4s ease 0.3s;
}
.mockup.s2 .amt-c { max-width: 1ch; opacity: 1; }
.mockup.s2 .amt-unit { color: var(--ink); }
.amt-unit { transition: color 0.4s ease 0.3s; }

/* left column stage: idle lines -> route on Polygon -> 98 / 2 split */
.co-stage { display: grid; margin-top: 26px; }
.co-stage > * { grid-area: 1 / 1; }
.co-stage .co-lines { margin-top: 0; transition: opacity 0.35s ease, transform 0.35s ease; }
.co-lines .v { display: inline-flex; align-items: center; gap: 7px; }
.co-lines li { align-items: center; min-height: 45px; padding-block: 8px; }
.mockup.s3 .co-lines { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.co-route {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
  border-top: 1px solid var(--line-2);
  padding-top: 12px;
  font-size: 13.5px;
}
.mockup.s3 .co-route { opacity: 1; visibility: visible; transform: none; transition-delay: 0.1s, 0.1s, 0s; }
.route-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink-2); }
.route-head > span:first-child { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; color: var(--ink); }
.route-state { display: grid; font-family: var(--font-mono); font-size: 12px; }
.route-state > span { grid-area: 1 / 1; text-align: right; transition: opacity 0.3s ease; }
.route-sending { color: var(--amber-ink); }
.route-done { color: var(--green); opacity: 0; }
.mockup.s4 .route-sending { opacity: 0; }
.mockup.s4 .route-done { opacity: 1; }
.route-track {
  position: relative;
  height: 8px;
  margin: 16px 0 14px;
  border-radius: 99px;
  background: var(--cream-2);
}
.route-fill-a,
.route-fill-b {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 99px;
}
.route-fill-a {
  left: 0;
  width: calc(98% - 3px);
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.route-fill-b {
  right: 0;
  width: max(2%, 7px);
  background: var(--amber);
  opacity: 0;
  transform: scale(0.2);
  transition: opacity 0.3s ease 0.45s, transform 0.4s cubic-bezier(0.3, 1.6, 0.4, 1) 0.45s;
}
.mockup.s4 .route-fill-a { transform: scaleX(1); }
.mockup.s4 .route-fill-b { opacity: 1; transform: none; }
.route-coin {
  position: absolute;
  top: 50%;
  left: 0;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  filter: drop-shadow(0 3px 6px rgba(11, 83, 191, 0.35));
  transform: translateX(var(--rx, 0px));
  transition: transform 1.05s cubic-bezier(0.55, 0.05, 0.3, 1), opacity 0.3s ease;
}
.mockup.s3 .route-coin { --rx: calc(var(--route-w, 300px) - 24px); }
.mockup.s4 .route-coin { opacity: 0; }
.route-split { display: grid; gap: 6px; margin: 0; }
.rs-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.rs-row:nth-child(2) { transition-delay: 0.12s; }
.rs-row:nth-child(3) { transition-delay: 0.24s; }
.mockup.s4 .rs-row { opacity: 1; transform: none; }
.rs-row dt { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); min-width: 0; }
.rs-row dt i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rs-row.is-you dt i { background: var(--green); }
.rs-row.is-fee dt i { background: var(--amber); }
.rs-row .mono { font-size: 12px; color: var(--ink-3); }
.rs-row dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.rs-row dd b { font-weight: 650; color: var(--ink); }
.rs-row.is-you dd b { color: var(--green); }
.rs-row.is-buyer { font-size: 12.5px; }
.rs-row.is-buyer dt { padding-left: 16px; color: var(--ink-3); }
.rs-row.is-buyer dd { color: var(--ink-3); }

/* foot: expiry -> webhook delivered */
.co-foot { display: grid; }
.co-foot > span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: opacity 0.35s ease, transform 0.35s ease; }
.foot-hook { opacity: 0; transform: translateY(6px); justify-content: flex-start !important; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.foot-hook b { margin-left: auto; font-weight: 500; color: var(--green); }
.foot-hook code { padding: 1px 6px; border-radius: 5px; background: var(--cream-2); color: var(--ink); }
.mockup.s5 .foot-idle { opacity: 0; transform: translateY(-6px); }
.mockup.s5 .foot-hook { opacity: 1; transform: none; }

/* store order card: Pending payment -> Processing */
.mockup[data-demo] { padding-bottom: 104px; }
.order-card {
  position: absolute;
  left: -44px;
  top: calc(100% - 20px);
  z-index: 2;
  width: 300px;
  padding: 14px 16px 15px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(20, 24, 33, 0.06), 0 24px 50px -24px rgba(20, 24, 33, 0.4);
  font-size: 13.5px;
  text-align: left;
  color: var(--ink);
}
.oc-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}
.oc-app { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.oc-app svg { width: 13px; height: 13px; }
.oc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.oc-row b { font-weight: 600; }
.oc-flip { display: grid; perspective: 400px; }
.oc-flip > .status {
  grid-area: 1 / 1;
  justify-self: end;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.35, 0.1, 0.2, 1);
}
.oc-paid { transform: rotateX(-180deg); }
.mockup.s5 .oc-pending { transform: rotateX(180deg); }
.mockup.s5 .oc-paid { transform: rotateX(0deg); }
.oc-note {
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  opacity: 0;
  transition: max-height 0.4s ease 0.3s, margin 0.4s ease 0.3s, opacity 0.4s ease 0.4s;
}
.mockup.s5 .oc-note { max-height: 40px; margin-top: 8px; opacity: 1; }

/* example-payments toast: flips through illustrative payouts */
.paid-toast { z-index: 3; }
.paid-toast .toast-coin { flex: none; width: 34px; height: 34px; }
.paid-toast .toast-ok { display: inline-flex; align-items: center; gap: 5px; color: var(--green); }
.paid-toast .toast-ok svg { width: 14px; height: 14px; }
.paid-toast .toast-ok strong { color: var(--ink); }
.paid-toast .sub { display: flex; align-items: center; gap: 7px; }
.paid-toast .sub .mbadge-sm { box-shadow: 0 0 0 1px rgba(20, 24, 33, 0.12); }
.toast-body { perspective: 500px; min-width: 0; }
.toast-tag {
  position: absolute;
  top: -9px;
  right: 14px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--cream-2);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.paid-toast:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.toast-body > p { transform-origin: 50% 50% -12px; }
.toast-body.is-out > p { animation: toast-flip-out 0.28s cubic-bezier(0.5, 0, 0.8, 0.4) both; }
.toast-body.is-in > p { animation: toast-flip-in 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.toast-body.is-in > p.sub { animation-delay: 0.05s; }
@keyframes toast-flip-out { to { opacity: 0; transform: rotateX(70deg) translateY(-4px); } }
@keyframes toast-flip-in { from { opacity: 0; transform: rotateX(-70deg) translateY(4px); } to { opacity: 1; transform: none; } }

.js .paid-toast {
  animation: none;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js .paid-toast.is-shown { opacity: 1; transform: none; }

/* =========================================================
   HOW A PAYMENT MOVES: a coin rides the track with the scroll
   ========================================================= */
.flow-wrap { position: relative; }
.js .flow-wrap .flow::before { display: none; }
html:not(.js) .flow-track { display: none; }
.flow-track { position: absolute; inset: 0; pointer-events: none; }
.flow-line,
.flow-fill {
  position: absolute;
  left: var(--x0, 16px);
  top: var(--y0, 15px);
  width: var(--len, 0px);
  height: 0;
  border-top: 1.5px dashed rgba(20, 24, 33, 0.2);
}
.flow-fill {
  border-top: 2px solid var(--ink);
  margin-top: -0.25px;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}
.flow-wrap.is-vertical .flow-line,
.flow-wrap.is-vertical .flow-fill {
  width: 0;
  height: var(--len, 0px);
  border-top: 0;
  border-left: 1.5px dashed rgba(20, 24, 33, 0.2);
}
.flow-wrap.is-vertical .flow-fill {
  border-left: 2px solid var(--ink);
  margin: 0 0 0 -0.25px;
  transform: scaleY(var(--p, 0));
  transform-origin: top;
}
.flow li { position: relative; }
.flow-dot { z-index: 1; transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease; }
.flow li:last-child .flow-dot { background: var(--cream); color: var(--ink-2); border-color: rgba(20, 24, 33, 0.22); }
.flow li.is-on .flow-dot { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.flow li.is-here .flow-dot { box-shadow: 0 0 0 6px rgba(242, 181, 68, 0.28); }
html:not(.js) .flow li:last-child .flow-dot { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.flow-coin {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 30px;
  height: 30px;
  perspective: 240px;
  transform: translate(calc(var(--cx, 16px) - 15px), calc(var(--cy, 15px) - 15px));
  will-change: transform;
}
.flow-coin .coin-face { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.flow-coin .coin-usd {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 6px 14px -6px rgba(20, 24, 33, 0.55);
}
.flow-wrap.is-usdc .flow-coin .coin-usd { transform: rotateY(180deg); }
.flow-wrap.is-usdc .flow-coin .coin-usdc { transform: rotateY(0deg); }
.flow-coin .coin-usdc { filter: drop-shadow(0 4px 8px rgba(11, 83, 191, 0.3)); }
.flow-fee {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--amber);
  color: #1b1406;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transform: translate(calc(var(--fx, 0px) - 50%), calc(var(--fy, 0px) - 50%)) scale(0.4);
  transition: opacity 0.35s ease, transform 0.6s cubic-bezier(0.25, 1.4, 0.4, 1);
}
.flow-wrap.is-split .flow-fee {
  opacity: 1;
  transform: translate(calc(var(--fx, 0px) - 50% + var(--fdx, 26px)), calc(var(--fy, 0px) - 50% + var(--fdy, -26px))) rotate(-6deg);
}
.flow-wrap.is-vertical .flow-fee { --fdx: 34px; --fdy: 0px; }

.flow-ledger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 14px !important;
  font-size: 13.5px !important;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.4s ease;
}
.flow-ledger b { font-weight: 650; color: var(--ink); }
.flow-ledger > span:last-child { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.flow-ledger .pg-mark { width: 13px; height: 13px; }
.flow-ledger .mbadges { gap: 4px; }
.fl-conv { position: relative; display: inline-flex; width: 24px; height: 24px; }
.fl-conv > * { position: absolute; inset: 0; }
.fl-usd {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  transition: opacity 0.4s ease, transform 0.5s ease;
}
.fl-conv .usdc-mark { transition: opacity 0.4s ease 0.1s, transform 0.5s ease 0.1s; }
.js .flow-wrap li:not(.is-on) .fl-conv .usdc-mark { opacity: 0; transform: scale(0.6); }
.js .flow-wrap li.is-on .fl-usd { opacity: 0; transform: scale(0.6); }
html:not(.js) .fl-usd { display: none; }
.fl-bar { display: flex; gap: 2px; width: 74px; height: 8px; }
.fl-bar i { border-radius: 99px; }
.fl-bar i:first-child { flex: 49; background: var(--green); }
.fl-bar i:last-child { flex: 1; min-width: 5px; background: var(--amber); }
.fl-order { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--cream-2); color: var(--ink); }
.fl-order svg { width: 14px; height: 14px; }
.js .flow-wrap li:not(.is-on) .flow-ledger { opacity: 0.45; }
.js .flow-wrap li:not(.is-on) .status { opacity: 0.45; }
.flow .status { transition: opacity 0.4s ease; }

@media (max-width: 1100px) {
  .flow-wrap .flow {
    grid-template-columns: minmax(0, 1fr);
    max-width: 660px;
    row-gap: 44px;
  }
  .flow-wrap .flow li { padding-left: 58px; }
  .flow-wrap .flow-dot { position: absolute; left: 0; top: -3px; }
  .flow-wrap .flow h3 { margin-top: 0; }
}

/* =========================================================
   PRICING: whose fee is whose, calculator, comparison
   ========================================================= */
.price-tag { font-size: clamp(15px, 1.5vw, 19px); }
.price-sub { max-width: 34ch; }
.fee-pair { display: grid; gap: 0; margin: 26px 0 0; border-top: 1px solid var(--line); }
.fee-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fee-row dt { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16px; }
.fee-row dd { margin: 8px 0 0; padding-left: 70px; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.fee-chip {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.fee-chip.is-plus { background: transparent; color: var(--ink-2); border: 1.5px dashed rgba(20, 24, 33, 0.3); }
.price-checks {
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  column-gap: 32px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.price-checks li { font-size: 15px; padding: 10px 0; border-bottom: 0; }
.price-main .price-cta { margin-top: 28px; }
.price-side { display: grid; gap: 16px; align-content: start; }

.calc {
  padding: 22px 24px 20px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(20, 24, 33, 0.04), 0 20px 40px -30px rgba(20, 24, 33, 0.35);
}
.calc .label,
.price-example .label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.calc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.calc-value { display: flex; align-items: baseline; gap: 6px; }
.calc-value output {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.calc-value > span { font-size: 14px; color: var(--ink-3); }
.calc-slider {
  --p: 0.482;
  position: relative;
  height: 44px;
  margin: 8px 12px 0;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
}
.calc-slider:focus { outline: none; }
.calc-slider:focus-visible .calc-thumb { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.calc-rail {
  position: absolute;
  left: -12px;
  right: -12px;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 99px;
  background: var(--cream-2);
}
.calc-rail::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px;
  top: 12px;
  height: 5px;
  background: repeating-linear-gradient(90deg, rgba(20, 24, 33, 0.18) 0 1px, transparent 1px calc(100% / 20));
  opacity: 0.8;
}
.calc-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: calc(12px + var(--p) * (100% - 24px));
  border-radius: inherit;
  background: var(--ink);
}
.calc-thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--p) * 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 0 4px 10px -4px rgba(20, 24, 33, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.calc-thumb span { width: 1.5px; height: 9px; border-radius: 2px; background: var(--ink-3); }
.calc-slider:hover .calc-thumb { transform: scale(1.06); }
.calc-slider.is-held .calc-thumb { transform: scale(1.14); box-shadow: 0 10px 22px -8px rgba(20, 24, 33, 0.5); }
.calc-scale {
  position: relative;
  height: 18px;
  margin: 2px 12px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.calc-scale span { position: absolute; left: calc(var(--p) * 100%); transform: translateX(-50%); }
.calc-keep {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 14px;
  margin-top: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.calc-keep-label { font-weight: 600; }
.calc-keep-value {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--ink-2);
}
.calc-keep-value .usdc-mark { width: 28px; height: 28px; }
.calc-keep-value b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.03em;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.calc-keep-fee { grid-column: 1 / -1; justify-self: end; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.calc-keep-fee b { font-weight: 600; color: var(--ink-2); }
.calc-compare { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.cc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  font-size: 13.5px;
}
.cc-name { color: var(--ink-2); }
.cc-row.is-us .cc-name { color: var(--ink); font-weight: 600; }
.cc-val { grid-row: 1; grid-column: 2; font-variant-numeric: tabular-nums; color: var(--ink-3); white-space: nowrap; }
.cc-val b { font-weight: 650; color: var(--ink); }
.cc-bar { grid-column: 1 / -1; display: flex; gap: 2px; height: 6px; }
.cc-bar i { border-radius: 99px; }
.cc-bar .k { flex: var(--k); background: var(--ink); opacity: 0.85; }
.cc-row:not(.is-us) .cc-bar .k { background: var(--ink-3); opacity: 0.5; }
.cc-bar .f { flex: var(--f); background: var(--amber); }
.cc-name em { font-style: normal; color: var(--ink-3); }
.cc-row.is-est .cc-bar .k { background: var(--ink-3); opacity: 0.35; }
.cc-row.is-est .cc-bar .f { opacity: 0.7; }
.cc-diff { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.calc .fine a { color: var(--ink-2); text-underline-offset: 3px; }
.cc-diff b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.calc .fine,
.price-example .fine { margin-top: 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }
.price-example { margin-top: 0; }
.price-example .kv dd { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; }

.compare { margin-top: 22px; }
.compare-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.compare-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  overflow: hidden;
  font-size: 14.5px;
  text-align: left;
}
.compare-table th,
.compare-table td { padding: 16px 20px; vertical-align: top; border-top: 1px solid var(--line-2); }
.compare-table thead th {
  border-top: 0;
  padding-block: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--cream);
}
.compare-table tbody th { width: 22%; font-weight: 600; white-space: nowrap; }
.compare-table td { color: var(--ink-2); line-height: 1.6; }
.compare-table td b { color: var(--ink); font-weight: 650; }
.compare-est {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--ink-2);
}
.compare-table tr.is-us th,
.compare-table tr.is-us td { background: rgba(242, 181, 68, 0.1); }
.compare-table tr.is-us th { box-shadow: inset 3px 0 0 var(--amber); }
.compare-table sup { font-size: 0.7em; margin-left: 2px; }
.compare-table sup a { color: var(--ink-3); text-decoration: none; }
.compare-table sup a:hover { color: var(--ink); text-decoration: underline; }
.compare-notes {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.compare-notes a { color: var(--ink-2); text-underline-offset: 3px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .order-card { left: 16px; }
}

@media (max-width: 900px) {
  .demo-hint { left: 50%; transform: translateX(-50%); white-space: nowrap; }
  .co-stage .co-lines { display: block; }
  .co-stage { margin-top: 16px; }
  .co-lines li { min-height: 40px; padding-block: 6px; }
  .co-foot { display: grid !important; padding-top: 16px; }
  .co-foot .foot-idle code { display: none; }
  .mockup[data-demo] { padding-bottom: 56px; }
  .order-card {
    position: relative;
    left: auto;
    top: auto;
    width: min(340px, calc(100% - 24px));
    margin: -26px auto 0;
  }
  .paid-toast { margin-top: 22px !important; }
  .compare-table thead { display: none; }
  .compare-table,
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td { display: block; width: auto; }
  .compare-table tbody tr + tr { border-top: 1px solid var(--line); }
  .compare-table tbody th { width: auto; padding: 16px 18px 4px; border-top: 0; white-space: normal; }
  .compare-table td { padding: 6px 18px; border-top: 0; }
  .compare-table td:last-child { padding-bottom: 16px; }
  .compare-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
}

@media (max-width: 640px) {
  .pm-chips { justify-content: center; }
  .usdc-chip { font-size: 14px; }
  .co-amount .coin-face { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .mockup.s1 .coin { width: 36px; margin-right: 8px; }
  .rs-row .mono { display: none; }
  .fee-row dd { padding-left: 0; }
  .calc { padding: 18px 16px 16px; }
  .calc-value output { font-size: 26px; }
  .calc-keep-value b { font-size: 26px; }
  .cc-row { grid-template-columns: minmax(0, 1fr); }
  .cc-val { grid-row: auto; grid-column: 1; }
  .toast-tag { right: 12px; }
}

/* =========================================================
   REDUCED MOTION: final states, no travel (demo.js sets them)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .mockup *, .mockup *::before, .mockup *::after,
  .flow-wrap *, .calc *, .paid-toast, .order-card {
    transition: none !important;
    animation: none !important;
  }
}
