:root {
  --bg: #ffffff;
  --card: #f6f5f2;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.52);
  --line: rgba(23, 23, 26, 0.1);
  --accent: #f0563a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

/* one shell that changes size and colour; each state is a face laid inside it */
.of { position: relative; width: 178px; height: 48px; border-radius: 24px; background: var(--ink); overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 16px 26px -16px rgba(23, 23, 26, 0.6); }
.of[data-state="panel"], .of[data-state="counter"] { box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 #ffffff, 0 22px 34px -22px rgba(23, 23, 26, 0.45); }
.of[data-state="deal"] { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 26px -14px var(--accent); }
.of__face { position: absolute; left: 50%; top: 0; transform: translateX(-50%); opacity: 0; visibility: hidden; }
.of[data-state="idle"] .of__idle, .of[data-state="panel"] .of__panel, .of[data-state="sent"] .of__sent, .of[data-state="counter"] .of__counter, .of[data-state="deal"] .of__deal { visibility: visible; }
.of[data-state="idle"] .of__idle { opacity: 1; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.of__idle, .of__deal { display: flex; align-items: center; justify-content: center; gap: 8px; width: 178px; height: 48px; border-radius: 24px; color: #ffffff; font-size: 15px; font-weight: 700; white-space: nowrap; }
.of__deal { width: 196px; }
.of__idle svg, .of__deal svg, .of__sent svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.700; stroke-linecap: round; stroke-linejoin: round; }
.of__idle svg circle { fill: currentColor; stroke: none; }
.of__idle:focus-visible, .of__deal:focus-visible { box-shadow: inset 0 0 0 2px #ffffff; }
.of__check { stroke-dasharray: 1; stroke-dashoffset: 1; stroke-width: 2.200; }

.of__panel { width: min(284px, calc(100vw - 24px)); padding: 12px 14px 14px; }
.of__row { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.of__label { font-size: 12px; font-weight: 640; color: var(--soft); letter-spacing: 0.01em; white-space: nowrap; }
.of__close { display: grid; place-items: center; width: 24px; height: 24px; margin-right: -4px; border-radius: 50%; color: var(--soft); transition: background-color 0.2s ease, color 0.2s ease; }
.of__close svg, .of__step svg, .of__no svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.800; stroke-linecap: round; }
.of__close:focus-visible, .of__step:focus-visible, .of__no:focus-visible, .of__chips button:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.of__amount { display: flex; align-items: center; justify-content: space-between; height: 46px; margin-top: 2px; }
.of__step { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #ffffff; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px -1px rgba(23, 23, 26, 0.25); transition: background-color 0.2s ease; }
.of__step[disabled] { opacity: 0.35; cursor: default; }
.of__price { display: inline-flex; align-items: flex-start; gap: 2px; }
.of__price i { margin-top: 7px; font-style: normal; font-size: 18px; font-weight: 640; color: var(--soft); }
.of__digits { display: block; height: 44px; overflow: hidden; }
.of__digits b { display: block; font-size: 40px; line-height: 44px; font-weight: 760; font-stretch: 96%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.of__listed { margin-top: 1px; font-size: 11.500px; line-height: 15px; text-align: center; color: var(--soft); }
.of__listed b { font-weight: 640; color: var(--ink); }
.of__chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 11px; }
.of__chips button { height: 30px; border-radius: 10px; background: #ffffff; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px -1px rgba(23, 23, 26, 0.2); font-size: 12px; font-weight: 640; transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }
.of__chips button[aria-pressed="true"] { background: var(--ink); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 10px -7px rgba(23, 23, 26, 0.8); }
/* how likely the seller is to say yes */
.of__meter { display: grid; gap: 5px; margin-top: 12px; }
.of__track { position: relative; display: block; height: 6px; border-radius: 3px; background: rgba(23, 23, 26, 0.08); overflow: hidden; }
.of__track i { position: absolute; inset: 0; border-radius: 3px; background: var(--accent); transform-origin: 0 50%; }
.of__chance { display: block; height: 15px; overflow: hidden; font-size: 11.500px; line-height: 15px; color: var(--soft); }
.of__chance span { display: block; white-space: nowrap; }
.of__send { display: block; width: 100%; height: 42px; margin-top: 12px; border-radius: 14px; background: var(--accent); color: #ffffff; font-size: 14.500px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 16px -10px var(--accent); }
.of__send:focus-visible, .of__yes:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.of__sent { display: flex; align-items: center; justify-content: center; gap: 8px; width: 196px; height: 48px; color: #ffffff; font-size: 15px; font-weight: 700; }
.of__sent svg { overflow: visible; }
.of__senttext { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.of__senttext span { display: block; white-space: nowrap; }
/* the line that runs along the bottom while the offer travels */
.of__wire { position: absolute; left: 18px; right: 18px; bottom: 6px; height: 2px; border-radius: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

.of__counter { display: flex; align-items: center; gap: 6px; width: min(284px, calc(100vw - 24px)); height: 64px; padding: 0 10px 0 18px; }
.of__who { flex: 1; min-width: 0; display: grid; gap: 1px; }
.of__who strong { display: flex; align-items: baseline; gap: 7px; font-size: 21px; line-height: 24px; font-weight: 760; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.of__who s { font-size: 12.500px; font-weight: 560; letter-spacing: 0; color: var(--soft); text-decoration-thickness: 1.200px; }
.of__no { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--soft); transition: background-color 0.2s ease, color 0.2s ease; }
.of__yes { flex: none; height: 44px; padding: 0 20px; border-radius: 22px; background: var(--accent); color: #ffffff; font-size: 14.500px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 16px -10px var(--accent); }
@media (hover: hover) { .of__close:hover, .of__no:hover { background: rgba(23, 23, 26, 0.07); color: var(--ink); } .of__step:not([disabled]):hover { background: #fbfbfa; } .of__chips button:not([aria-pressed="true"]):hover { background: #fbfbfa; } }

/* an empty box as big as the open card: the preview frames this, so the button stays centred */
.frame { position: absolute; left: 50%; top: 50%; width: 300px; height: 270px; margin: -135px 0 0 -150px; pointer-events: none; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }
