:root {
  --bg: #ffffff;
  --ink: #16151c;
  --soft: #74727f;
  --right: #17a56b;
  --wrong: #e2483d;
  --accent: #6a5cf6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 12px;
}

.quiz {
  width: min(360px, 100%);
  padding: 16px 14px 12px;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff, #fbfbfd);
  box-shadow:
    inset 0 0 0 1px rgba(22, 21, 28, 0.06),
    0 1px 2px rgba(22, 21, 28, 0.05),
    0 16px 32px -16px rgba(40, 30, 110, 0.22),
    0 40px 72px -40px rgba(40, 30, 110, 0.3);
}

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; }
/* where you are in the quiz: five short lines, not numbers */
.steps { display: flex; gap: 4px; }
.steps i { width: 22px; height: 4px; border-radius: 4px; background: rgba(22, 21, 28, 0.1); overflow: hidden; }
.steps i.is-done { background: var(--accent); }
.steps i::after { content: ""; display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--fill, var(--accent)); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; transition: transform 0.6s cubic-bezier(0.3, 1.3, 0.5, 1), background-color 0.3s ease; }
.streak { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px 0 7px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 12.5px; font-weight: 640; transition: background-color 0.4s ease, color 0.4s ease; }
.streak svg { width: 14px; height: 14px; fill: currentColor; }
.streak__n { height: 18px; overflow: hidden; line-height: 18px; font-weight: 740; }
.streak__n span { display: block; }
.streak.is-lost { background: rgba(22, 21, 28, 0.06); color: var(--soft); }

.ask { padding: 12px 4px 10px; font-size: 19px; line-height: 24px; font-weight: 680; font-stretch: 106%; letter-spacing: -0.015em; }

/* ---- the answers ---- */
.answers { display: grid; gap: 6px; }
.answer {
  position: relative;
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: 14px;
  background: rgba(22, 21, 28, 0.04);
  box-shadow: inset 0 0 0 1px rgba(22, 21, 28, 0.07);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}
.answer.is-hot { box-shadow: inset 0 0 0 1.5px var(--accent); }
@media (hover: hover) { .quiz:not(.is-over) .answer:hover { box-shadow: inset 0 0 0 1.5px var(--accent); } }
.answer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quiz.is-over .answer { cursor: default; }
/* how many people chose it */
.answer__bar { position: absolute; inset: 0; background: rgba(22, 21, 28, 0.07); transform: scaleX(0); transform-origin: 0 50%; z-index: -1; transition: background-color 0.3s ease; }
.answer__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.answer__mark { flex: none; width: 20px; height: 20px; }
.answer__mark svg { width: 20px; height: 20px; }
.answer__mark path { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.answer__pct { flex: none; min-width: 34px; font-size: 13px; font-weight: 640; text-align: right; color: var(--soft); opacity: 0; transition: color 0.3s ease; }
.answer.is-right { box-shadow: inset 0 0 0 1.5px var(--right); color: color-mix(in srgb, var(--right) 78%, #16151c); }
.answer.is-right .answer__bar { background: color-mix(in srgb, var(--right) 20%, transparent); }
.answer.is-right .answer__pct { color: inherit; }
.answer.is-wrong { box-shadow: inset 0 0 0 1.5px var(--wrong); color: color-mix(in srgb, var(--wrong) 80%, #16151c); }
.answer.is-wrong .answer__bar { background: color-mix(in srgb, var(--wrong) 16%, transparent); }
.answer.is-wrong .answer__pct { color: inherit; }
.quiz.is-over .answer:not(.is-right):not(.is-wrong) .answer__name { color: var(--soft); }

.why { height: 36px; margin-top: 10px; padding: 0 4px; overflow: hidden; font-size: 13px; line-height: 18px; color: var(--soft); }
.why span { display: block; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #14151a;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(20, 21, 26, 0.3));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (max-height: 420px) {
  .quiz { padding-top: 12px; padding-bottom: 8px; }
  .ask { padding-top: 8px; padding-bottom: 8px; font-size: 18px; }
  .answer { height: 41px; }
  .why { margin-top: 7px; }
}
@media (min-width: 900px) and (min-height: 680px) {
  .quiz { zoom: 1.3; }
}
