:root {
  --fondo: #000000;
  --pillola: #f4f2ec;
  --inchiostro: #0b0b0c;
  --superficie: #131315;
  --bordo: rgba(255, 255, 255, 0.1);
  --testo: #f4f2ec;
  --grigio: #8b8b91;
  --accento: #d6ff3f;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.frame {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 92vw;
  padding: 8px 4px;
}

/* the pill: one element for GSAP (scale, width), the skin and the layers for CSS */
.q {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  padding: 0 26px 0 22px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--inchiostro);
  font: inherit;
  font-size: 16px;
  font-weight: 590;
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.005em;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  max-width: 92vw;
}
.q:focus-visible { outline: 2px solid var(--accento); outline-offset: 4px; }

.q__skin, .q__dark, .q__rise {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -2;
}
.q__skin {
  background: var(--pillola);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 10px 28px -14px rgba(244, 242, 236, 0.35);
}
.q__dark {
  background: var(--superficie);
  box-shadow: inset 0 0 0 1px var(--bordo), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 30px -18px rgba(0, 0, 0, 0.9);
  opacity: 0;
}
.q__rise {
  z-index: -1;
  background: var(--accento);
  clip-path: inset(calc(100% - 1px) 22px 0 22px round 0);
  opacity: 0;
}

.q__line {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  overflow: hidden;
}
.q__line-fill {
  position: absolute;
  inset: 0;
  background: var(--accento);
  transform-origin: left center;
  transform: scaleX(0);
}

.q__ico { position: relative; width: 20px; height: 20px; flex: none; }
.ico {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico__perf { stroke-dasharray: 1.2 1.9; }
.ico__track { opacity: 0.18; }
.ico--wait, .ico--go { opacity: 0; }

.q__labels {
  position: relative;
  display: block;
  height: 22px;
  overflow: hidden;
}
.q__label {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: 22px;
  line-height: 22px;
  white-space: nowrap;
  opacity: 0;
}
.q__label[data-l="join"] { opacity: 1; }
.q__ahead { flex: none; margin-left: 0.32em; color: var(--grigio); font-weight: 480; }
.q__sep { margin: 0 0.42em; opacity: 0.45; }

/* the odometer: one window per character, tabular figures */
.odo {
  display: inline-flex;
  font-weight: 640;
}
.odo__slot {
  position: relative;
  display: inline-block;
  height: 22px;
  overflow: hidden;
  min-width: 0;
  clip-path: inset(0);
  text-align: center;
}
.odo__ch { display: block; height: 22px; line-height: 22px; }
.odo__ch + .odo__ch { position: absolute; left: 0; right: 0; top: 0; }

.note {
  position: relative;
  margin: 0;
  height: 18px;
  width: 100%;
  min-width: 260px;
  font-size: 13px;
  font-weight: 460;
  color: var(--grigio);
}
.note__t {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}
.note__t[data-n="join"] { opacity: 1; }

.measure {
  position: absolute;
  font-weight: 640;
  left: 0;
  top: 0;
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
  font-size: 16px;
  letter-spacing: -0.005em;
}

@media (max-width: 400px) {
  .q { height: 56px; font-size: 15px; padding: 0 22px 0 18px; gap: 9px; }
  .measure { font-size: 15px; }
  .q__line { left: 18px; right: 18px; }
  .note { font-size: 12px; min-width: 0; }
}
