:root {
  --carta: #f5f3ee;          /* the warm white of the page */
  --inchiostro: #16161a;     /* the ink of the ticks and the reading */
  --grigio: #a3a19b;         /* the grey of the small text and the numbers on the scale */
  --accento: #ff4d1a;        /* the one accent: the ticks that meet and the tenth in the reading */
}

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

html { background: var(--carta); }
body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.corsa {
  position: relative;
  height: 420vh;
}

.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pezzo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 3vh, 26px);
  width: min(88vw, 720px);
}

/* the reading: whole millimetres in ink, the tenth the vernier gives in the accent */
.lettura {
  display: flex;
  align-items: baseline;
  font-size: clamp(34px, min(9vw, 11vh), 76px);
  font-variation-settings: 'wght' 560, 'wdth' 100;
  letter-spacing: -0.03em;
  line-height: 1;
  user-select: none;
}
.lettura__punto { color: var(--grigio); margin: 0 0.02em; }
.lettura__decimo {
  display: inline-block;
  overflow: hidden;
  color: var(--accento);
  padding: 0 0.02em;
  line-height: 1.1;
  margin: -0.05em 0;
}
.lettura__decimo > span { display: inline-block; }
.lettura__unita {
  margin-left: 0.28em;
  font-size: 0.3em;
  font-variation-settings: 'wght' 480, 'wdth' 100;
  letter-spacing: 0.02em;
  color: var(--grigio);
}

.scala {
  display: block;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.scala.tiene { cursor: grabbing; }
.scala line { stroke-linecap: butt; shape-rendering: geometricPrecision; }
.scala__bordo { stroke: var(--inchiostro); stroke-width: 1; }
.scala__bordo--nonio { stroke-opacity: 0.35; }
.scala text {
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  font-size: 10px;
  font-variation-settings: 'wght' 500, 'wdth' 100;
  fill: var(--grigio);
  text-anchor: middle;
  user-select: none;
}

.nota {
  font-size: clamp(10px, min(1.4vw, 2.2vh), 13px);
  font-variation-settings: 'wght' 480, 'wdth' 100;
  letter-spacing: 0.02em;
  color: var(--grigio);
  user-select: none;
}

.scendi {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 5vh, 40px);
  transform: translateX(-50%);
  font-size: 12px;
  font-variation-settings: 'wght' 480, 'wdth' 110;
  letter-spacing: 0.04em;
  color: var(--grigio);
  user-select: none;
}
