:root {
  --fondo: #f5f3ee;
  --inchiostro: #141414;
  --grigio: #77746e;
  --grigio-chiaro: #b9b5ad;
  --linea: rgba(20, 20, 20, 0.1);
  --tinta: #2f5bff;
  --tinta-tenue: rgba(47, 91, 255, 0.12);
  --bianco: #ffffff;
}

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

html, body { height: 100%; overflow: hidden; }

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

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

.stats {
  --cifra: clamp(32px, min(8.6vw, 14vh), 92px);
  position: relative;
  width: min(100%, 860px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.eyebrow__soft { color: var(--grigio); font-weight: 450; }
.mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--inchiostro);
}
.mark svg { width: 14px; height: 14px; fill: none; stroke: var(--bianco); stroke-width: 1.6; stroke-linejoin: round; }

.title {
  margin-top: clamp(6px, 1.4vh, 12px);
  font-size: clamp(18px, min(3.4vw, 5.2vh), 34px);
  font-weight: 640;
  font-variation-settings: "wdth" 92;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.grid {
  margin-top: clamp(14px, 4.5vh, 44px);
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 3vw, 36px);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}
.stat__label { font-size: 13px; font-weight: 560; color: var(--grigio); }
.stat__note { margin-top: 7px; font-size: 12px; color: var(--grigio-chiaro); }

/* the figure: one span per character, each with its own width and weight on the font's axes */
.num {
  margin-top: 4px;
  display: flex;
  align-items: flex-end;
  height: calc(var(--cifra) * 1.08);
  font-size: var(--cifra);
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.ch {
  --w: 100;
  --g: 520;
  position: relative;
  display: inline-block;
  height: 1.08em;
  overflow: hidden;
  font-variation-settings: "wdth" var(--w), "wght" var(--g);
}
.ch > i {
  display: block;
  font-style: normal;
  line-height: 1.08;
  will-change: transform;
}
.ch--digit { width: 0.6em; text-align: center; }
.ch--dot { margin: 0 -0.02em; }
.ch--unit { margin-left: 0.02em; }

.rule {
  position: relative;
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 8px;
  background: var(--linea);
  overflow: hidden;
}
.rule__fill {
  position: absolute;
  inset: 0;
  background: var(--inchiostro);
  transform-origin: left center;
  transform: scaleX(0);
}

.replay {
  margin-top: clamp(14px, 4vh, 40px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px 0 11px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--bianco);
  color: var(--inchiostro);
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
  opacity: 0;
}
.replay svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .replay:hover { border-color: rgba(20, 20, 20, 0.22); }
}

/* in a narrow box the three figures become rows: the name on the left, the figure on the right */
@media (max-width: 560px) {
  .stats { --cifra: clamp(30px, min(11vw, 9.4vh), 52px); }
  .grid { grid-template-columns: 1fr; gap: clamp(8px, 2.2vh, 16px); }
  .stat {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    align-items: end;
  }
  .stat__label { grid-column: 1; grid-row: 1; align-self: end; padding-bottom: 2px; }
  .stat__note { grid-column: 1; grid-row: 2; margin-top: 2px; align-self: start; }
  .num { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; justify-content: flex-end; }
  .rule { grid-column: 1 / span 2; grid-row: 3; margin-top: 6px; }
}
