:root {
  --paper: #000000;
  --pill-top: #16161a;
  --pill-bottom: #0a0a0c;
  --edge: rgba(255, 255, 255, 0.09);
  --text: #f2f1f6;
  --muted: rgba(242, 241, 246, 0.5);
  --ice: #8ee8ff;
  --violet: #9d86ff;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--text);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.wrap { position: relative; }
/* the pooled light reflected on the floor under the pill */
.floor {
  position: absolute;
  left: 12%; right: 12%;
  bottom: -18px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(141, 160, 255, 0.55), rgba(141, 160, 255, 0));
  filter: blur(8px);
  opacity: 0.12;
  pointer-events: none;
}
.tx {
  position: relative;
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 999px;
  display: block;
}
.tx:focus-visible { outline: 2px solid var(--violet); outline-offset: 6px; }
.tx[aria-busy="true"] { cursor: progress; }
/* GSAP moves the body; the material lives in CSS */
.tx__body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(252px, 82vw);
  height: 60px;
  padding: 0 20px 0 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pill-top), var(--pill-bottom));
  box-shadow:
    inset 0 0 0 1px var(--edge),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -10px 18px rgba(0, 0, 0, 0.35),
    inset 0 0 22px var(--inner, rgba(141, 160, 255, 0)),
    0 1px 1px rgba(0, 0, 0, 0.6),
    0 14px 34px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
/* a soft band of light on the upper half of the pill, like lacquer */
.tx__sheen {
  position: absolute;
  inset: 1px 14px auto;
  height: 46%;
  border-radius: 999px 999px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.tx__wave {
  flex: none;
  width: 24px; height: 24px;
  fill: none;
  stroke: rgba(242, 241, 246, 0.78);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.tx__label {
  position: relative;
  flex: 1;
  height: 100%;
}
.tx__word {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 15.5px;
  letter-spacing: 0.005em;
  font-variation-settings: 'wght' 560, 'wdth' 100;
}
.tx__word span, .tx__word small { display: block; }
.tx__word small {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  font-variation-settings: 'wght' 470, 'wdth' 96;
  font-variant-numeric: tabular-nums;
}
.tx__word--done { line-height: 1.1; }
.tx__pct {
  position: relative;
  flex: none;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wght' 500, 'wdth' 92;
  opacity: 0;
}
.tx__liquid {
  position: absolute;
  left: -24px; top: -24px;
  overflow: visible;
  pointer-events: none;
}
.tx__ring { fill: none; stroke: var(--ice); stroke-width: 1; }
.tx__check {
  fill: none;
  stroke: #07070a;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) {
  .tx:hover .tx__wave { stroke: rgba(242, 241, 246, 0.95); }
}
