:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255,255,255,.62);
  --cyan: #38D9FF;
  --yellow: #FFE04D;
  --pink: #FF3D8A;
  --card: #111;
  --card-hover: #181818;
  --line: rgba(255,255,255,.12);
  --radius: 18px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  padding-bottom: 92px; /* место под шкалу */
}

.app { max-width: 640px; margin: 0 auto; padding: 28px 20px 40px; }
.screen { animation: fade .35s ease both; }
.screen[hidden] { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -.01em;
}
.hl { padding: 0 .12em; border-radius: .18em; }
.hl--cyan { background: var(--cyan); color: #000; }
.hl--yellow { background: var(--yellow); color: #000; }
.hl--pink { background: var(--pink); color: #000; }
.lead { color: var(--muted); margin: 0 0 22px; font-size: 17px; }

.types { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-weight: 600; }
.types li { display: flex; align-items: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot--yellow { background: var(--yellow); }
.dot--cyan { background: var(--cyan); }
.dot--pink { background: var(--pink); }
.dot--white { background: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 16px 22px;
  border-radius: 999px;
  border: 0;
  font: inherit; font-weight: 800; font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--yellow); color: #000; }
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--line); margin-top: 14px; }
.btn--ghost:hover { border-color: rgba(255,255,255,.4); }

/* вопрос */
.question {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(20px, 5.4vw, 26px);
  line-height: 1.32;
  margin: 0 0 22px;
  white-space: pre-line;
}
.options { display: grid; gap: 14px; }
.option {
  display: grid;
  grid-template-columns: 1fr;
  text-align: left;
  background: var(--card);
  color: var(--fg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.option:hover { background: var(--card-hover); border-color: rgba(255,255,255,.35); }
.option:active { transform: scale(.99); }
.option:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.option__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0a0a0a; }
.option__img[hidden] { display: none; }
.option__body { display: flex; gap: 14px; padding: 16px 18px; align-items: flex-start; }
.option__letter {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 15px;
  color: #000;
}
.option--a .option__letter { background: var(--cyan); }
.option--b .option__letter { background: var(--pink); }
.option__text { font-size: 16.5px; line-height: 1.45; white-space: pre-line; }
.option.is-picked { border-color: var(--yellow); background: #1a1706; }

/* результат */
.result-title { margin-bottom: 20px; }
.result-text p { margin: 0 0 14px; }
.result-text strong { color: var(--yellow); }
.cta {
  margin: 28px 0 0;
  padding: 22px 20px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(56,217,255,.14), rgba(255,61,138,.14));
  border: 1.5px solid var(--line);
}
.cta__lead { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; }
.cta__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.cta__sub { margin: 2px 0 18px; color: var(--cyan); font-weight: 600; }
.cta__note { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }

.result-img { display: block; width: 100%; height: auto; border-radius: var(--radius); margin: 0 0 20px; }
.cta__img { display: block; width: 100%; height: auto; border-radius: 12px; margin: 0 0 18px; }

/* график 2×2 */
.chart { margin: 0 0 24px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .ax { fill: rgba(255,255,255,.55); font-family: var(--font); font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chart .ql { fill: rgba(255,255,255,.5); font-family: var(--display); font-size: 19px; font-weight: 600; }
.chart .ql.is-me { fill: #000; }
.chart .quad { fill: #121212; stroke: var(--line); stroke-width: 1; }
.chart .quad.is-me { fill: var(--yellow); }
.chart .me { fill: #000; stroke: #fff; stroke-width: 3; }
.chart .me-ring { fill: none; stroke: #fff; stroke-width: 1.5; opacity: .5; }

/* шкала прохождения */
.progress {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #000 60%, rgba(0,0,0,0));
}
.progress[hidden] { display: none; }
.progress__bar { max-width: 600px; margin: 0 auto; height: 6px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.progress__fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--yellow), var(--pink)); transition: width .35s ease; }
.progress__label { max-width: 600px; margin: 8px auto 0; font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }

@media (min-width: 700px) {
  .option { grid-template-columns: 180px 1fr; }
  .option__img { aspect-ratio: auto; height: 100%; min-height: 120px; }
  .option__img[hidden] + .option__body { grid-column: 1 / -1; }
}
