:root {
  --fondo: #ffffff;
  --binario: #f4f4f5;
  --bordo: rgba(10, 10, 20, 0.08);
  --testo: #0b0b0f;
  --testo-2: #8a8a93;
  --testo-3: #b4b4bb;
  --accento: #d9472b;
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.pick {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 3vh, 18px);
}

.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(312px, 86vw);
  height: clamp(40px, 9vh, 48px);
  padding: 4px;
  background: var(--binario);
  border: 1px solid var(--bordo);
  border-radius: 999px;
}

/* the pill, its shadow on the track and the faint mark it leaves where it lands: one element for GSAP each */
.seg__pill,
.seg__shadow,
.seg__mark {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 999px;
  pointer-events: none;
}

.seg__pill {
  background: var(--accento);
  box-shadow: 0 1px 1px rgba(80, 20, 10, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  z-index: 1;
}

.seg__shadow {
  background: rgba(10, 10, 20, 0.22);
  filter: blur(4px);
  opacity: 0;
  z-index: 0;
}

.seg__mark {
  border: 1px solid var(--accento);
  opacity: 0;
  z-index: 0;
}

.seg__opt {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  font: inherit;
  font-size: clamp(14px, 3.6vw, 15px);
  font-variation-settings: "wght" 460, "wdth" 100;
  letter-spacing: -0.005em;
  color: var(--testo-2);
  cursor: pointer;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

.seg__opt span { display: block; will-change: transform; }

.seg__opt:focus-visible { outline: 2px solid var(--testo); outline-offset: 2px; }

@media (hover: hover) {
  .seg__opt:not([aria-checked="true"]):hover { color: var(--testo); }
}

.pick__note {
  height: 1.2em;
  overflow: hidden;
  font-size: 12.5px;
  font-variation-settings: "wght" 440;
  color: var(--testo-2);
  text-align: center;
}

.pick__note span { display: block; }

.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  fill: var(--testo);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
}
