:root {
  --fondo: #f2f2f2;
  --carta: #ffffff;
  --bordo: rgba(17, 17, 19, 0.08);
  --testo: #18181b;
  --testo-2: #71717a;
  --testo-3: #a1a1aa;
  --nero: #111113;
  --accento: #6d5efc;
  --rosso-testo: #d4373c;
  --rosso-tenue: #fdeeed;
  --rosso-bordo: rgba(212, 55, 60, 0.28);
}

* { 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;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vmin, 40px);
}

/* the profile card */
.card {
  width: min(340px, 100%);
  padding: 18px 18px 16px;
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(17, 17, 19, 0.04), 0 18px 40px -24px rgba(17, 17, 19, 0.3);
}

.card__top { display: flex; align-items: center; gap: 12px; }

.avatar {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: conic-gradient(from 200deg, #ffb38a, #b49cff, #7ec8ff, #ffb38a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.avatar__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 55%);
}
.avatar__letters {
  position: relative;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.who { display: grid; gap: 2px; min-width: 0; }
.who__name { font-weight: 640; font-size: 15.5px; letter-spacing: -0.005em; }
.who__handle { font-size: 12.5px; color: var(--testo-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card__row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.count { font-size: 13px; color: var(--testo-2); white-space: nowrap; }
.count__num {
  display: inline-flex;
  font-weight: 640;
  color: var(--testo);
  font-variant-numeric: tabular-nums;
}
.digit {
  position: relative;
  display: inline-block;
  height: 1.25em;
  line-height: 1.25em;
  overflow: hidden;
  vertical-align: bottom;
}
.digit__col { display: block; }
.digit__col span { display: block; height: 1.25em; }

/* the button: the GSAP element is .follow (scale and width), the label column is a child */
.follow {
  position: relative;
  flex: none;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  cursor: pointer;
  outline: none;
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
}
.follow__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--nero);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18), 0 6px 14px -6px rgba(17, 17, 19, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.follow__ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--accento);
  opacity: 0;
  pointer-events: none;
}
.follow__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px 0 13px;
  white-space: nowrap;
}
.follow__icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.follow__labels {
  position: relative;
  display: block;
  height: 20px;
  /* hidden above and below, never at the sides: the last letter is never cut */
  clip-path: inset(0 -8px);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}
.follow__col { display: block; }
.lab { display: block; height: 20px; width: max-content; }
.follow:focus-visible { box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--accento); }

/* mutual followers */
.mutual {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--bordo);
  font-size: 12.5px;
  color: var(--testo-2);
  overflow: hidden;
}
.mutual b { color: var(--testo); font-weight: 600; }
.faces { display: flex; flex: none; }
.face {
  width: 22px;
  height: 22px;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid var(--carta);
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(140deg, var(--a), var(--b));
}
.face:first-child { margin-left: 0; }
.mutual__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the drawn pointer of the autopilot */
.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #111113;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  opacity: 0;
  z-index: 5;
}

@media (max-width: 360px) {
  .card { padding: 16px 14px 14px; }
  .card__row { margin-top: 14px; }
}
