:root {
  --fondo: #ffffff;
  --carta: #fcfcfd;
  --inchiostro: #14161c;
  --grigio: #6b7080;
  --tenue: #a9aebb;
  --linea: rgba(20, 22, 28, 0.08);
  --accento: #2a55d8;
  --accento-chiaro: #5a80f0;
  --accento-tenue: rgba(42, 85, 216, 0.1);
  --no: #1d2029;
  --stella: #f0a92b;
  --font: 'Mona Sans Variable', system-ui, sans-serif;
  --cifra: 1.2em;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vh, 32px) 12px;
}

/* the card */
.review {
  --mx: 70%;
  --my: 0%;
  position: relative;
  width: min(392px, 92vw);
  padding: clamp(14px, 3vh, 22px) clamp(14px, 4.4vw, 22px) clamp(12px, 2.4vh, 18px);
  border-radius: 22px;
  background:
    radial-gradient(130% 70% at 100% 0%, rgba(42, 85, 216, 0.06), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .035 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    var(--carta);
  border: 1px solid rgba(20, 22, 28, 0.07);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 1px 2px rgba(20, 22, 28, 0.05),
    0 10px 24px -8px rgba(20, 22, 28, 0.13),
    0 34px 70px -28px rgba(28, 44, 110, 0.28);
  overflow: hidden;
  isolation: isolate;
}
/* the edge that catches light where the pointer is */
.review__edge {
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(160px 120px at var(--mx) var(--my), rgba(42, 85, 216, 0.55), rgba(42, 85, 216, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 2;
}
.review__sheen {
  position: absolute; top: -20%; bottom: -20%; left: 0;
  width: 46%;
  background: linear-gradient(100deg, transparent, rgba(90, 128, 240, 0.09) 40%, rgba(255, 255, 255, 0.7) 50%, rgba(90, 128, 240, 0.09) 60%, transparent);
  transform: translateX(-160%) skewX(-12deg);
  pointer-events: none;
  z-index: 1;
}

.review__head { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; flex: none;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) inset, 0 4px 12px -4px rgba(35, 70, 184, 0.5);
}
.avatar svg { display: block; width: 100%; height: 100%; }
.review__who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.review__name { font-weight: 640; font-size: 15px; letter-spacing: -0.01em; }
.review__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--grigio); white-space: nowrap; }
.review__dot { color: var(--tenue); }
.badge { display: inline-flex; align-items: center; gap: 4px; color: var(--accento); font-weight: 560; }
.badge svg { width: 14px; height: 14px; }
.badge__ring { fill: var(--accento-tenue); stroke: var(--accento); stroke-width: 1.1; stroke-linejoin: round; }
.badge__tick { fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.review__rate {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: clamp(10px, 2.2vh, 16px);
}
.stars { display: inline-flex; gap: 3px; }
.star { width: 17px; height: 17px; display: block; overflow: visible; }
.star__base { fill: rgba(20, 22, 28, 0.08); }
.star__gold { fill: var(--stella); }
.star__glint { fill: rgba(255, 255, 255, 0.85); }
.review__car {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 520; color: var(--grigio);
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.04);
  border: 1px solid var(--linea);
  white-space: nowrap;
}
.review__car svg { width: 15px; height: 15px; fill: none; stroke: var(--grigio); stroke-width: 1.3; stroke-linejoin: round; }

.review__title {
  margin: clamp(8px, 1.8vh, 12px) 0 4px;
  font-size: clamp(15px, 2.4vh, 16.5px);
  font-weight: 650;
  font-stretch: 96%;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.review__text {
  margin: 0;
  font-size: clamp(12.5px, 1.95vh, 13.5px);
  line-height: 1.5;
  color: #474b57;
}

.review__foot {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: clamp(12px, 2.6vh, 18px);
  padding-top: clamp(10px, 2.2vh, 14px);
  border-top: 1px solid var(--linea);
}
.ask { position: relative; flex: 1; min-width: 0; height: 20px; overflow: hidden; }
.ask__line {
  position: absolute; left: 0; top: 0; right: 0;
  display: flex; align-items: center; gap: 6px;
  height: 20px;
  font-size: 12.5px; font-weight: 540;
  white-space: nowrap;
}
.ask__q { color: var(--grigio); }
.ask__thanks { color: var(--inchiostro); opacity: 0; }
.ask__thanks svg { width: 16px; height: 16px; flex: none; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ask__ring { stroke: var(--accento); stroke-width: 1.5; fill: var(--accento-tenue); }
.ask__tick { stroke: var(--accento); stroke-width: 1.8; }
.ask__thanks.is-no .ask__ring { stroke: var(--no); fill: rgba(20, 22, 28, 0.06); }
.ask__thanks.is-no .ask__tick { stroke: var(--no); }

.votes { display: flex; gap: 6px; flex: none; }
.vote {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(20, 22, 28, 0.1);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 1) inset, 0 1px 2px rgba(20, 22, 28, 0.06), 0 3px 8px -4px rgba(20, 22, 28, 0.12);
  font-size: 12.5px; font-weight: 580;
  font-stretch: 100%;
  isolation: isolate;
  overflow: visible;
  transition: border-color 0.25s, box-shadow 0.25s, color 0.25s, font-stretch 0.35s cubic-bezier(.3, 1.6, .5, 1);
  -webkit-tap-highlight-color: transparent;
}
.vote__fill {
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--accento-chiaro), var(--accento));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 14px -6px rgba(42, 85, 216, 0.7);
  clip-path: circle(0% at 30% 50%);
  z-index: -1;
}
.vote--no .vote__fill { background: linear-gradient(180deg, #3a3e4b, var(--no)); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 14px -6px rgba(20, 22, 28, 0.6); }
.vote__icon { width: 17px; height: 17px; flex: none; overflow: visible; }
.vote__thumb { transform-box: fill-box; transform-origin: 30% 80%; }
.vote__thumb--down { transform: rotate(180deg); transform-origin: 50% 50%; }
.vote__hand, .vote__cuff { fill: transparent; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; transition: fill 0.3s; }
.vote__burst {
  position: absolute; left: -8px; top: 50%;
  width: 46px; height: 46px; margin-top: -23px;
  fill: none; stroke: var(--accento); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
  opacity: 0;
}
.vote__count { color: var(--grigio); font-weight: 560; transition: color 0.25s; }
.vote.is-on { padding-right: 13px; color: #fff; border-color: transparent; font-stretch: 112%; }
.vote.is-on .vote__count { color: rgba(255, 255, 255, 0.78); }
.vote.is-on .vote__hand, .vote.is-on .vote__cuff { fill: rgba(255, 255, 255, 0.22); }
@media (hover: hover) {
  .vote:not(.is-on):hover { border-color: rgba(42, 85, 216, 0.35); box-shadow: 0 1px 0 #fff inset, 0 2px 4px rgba(20, 22, 28, 0.06), 0 6px 14px -6px rgba(42, 85, 216, 0.35); }
  .vote--no:not(.is-on):hover { border-color: rgba(20, 22, 28, 0.3); box-shadow: 0 1px 0 #fff inset, 0 2px 4px rgba(20, 22, 28, 0.06), 0 6px 14px -6px rgba(20, 22, 28, 0.3); }
}
.vote.is-hover:not(.is-on) { border-color: rgba(42, 85, 216, 0.35); }
.vote--no.is-hover:not(.is-on) { border-color: rgba(20, 22, 28, 0.3); }
.vote:focus:not(:focus-visible) { outline: none; }
.vote:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }

.review__sum {
  margin: clamp(8px, 1.6vh, 10px) 0 0;
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--tenue); font-weight: 500;
}
.review__sum .roll { color: var(--grigio); font-weight: 620; }

/* odometer counters */
.roll {
  display: inline-flex;
  height: var(--cifra);
  line-height: var(--cifra);
  overflow: hidden;
  -webkit-mask: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.roll__col { display: block; width: 0.62em; text-align: center; overflow: hidden; height: var(--cifra); }
.roll__strip { display: flex; flex-direction: column; }
.roll__strip span { display: block; height: var(--cifra); }

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

@media (max-width: 380px) {
  .review__car { font-size: 10.5px; padding: 3px 7px 3px 6px; }
  .vote { padding: 0 9px 0 8px; gap: 5px; }
  .ask__line { font-size: 12px; }
}
