/* quiz.css — the «Хто ким керує» self-check (/uk/test) in the palette of the book films:
 * cream paper, brown ink, mono caps for labels. */

:root {
  --qz-paper: #fff8f6;
  --qz-panel: #fcebe4;
  --qz-line: #e3cfc7;
  --qz-ink: #231917;
  --qz-muted: #7a6660;
  --qz-brown: #8f4b38;
  --qz-brown-deep: #6f3626;
  --qz-yellow: #f5e0a7;
  --qz-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

.qz-body {
  margin: 0;
  background: var(--qz-paper);
  color: var(--qz-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
.qz-body a { color: var(--qz-brown); }
.qz-body a:hover { color: var(--qz-brown-deep); }

.qz-page { max-width: 600px; margin: 0 auto; padding: 0 16px 48px; }

.qz-top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 0 12px;
  font-family: var(--qz-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
.qz-top a { color: var(--qz-ink); text-decoration: none; }
.qz-top a:hover { color: var(--qz-brown); }

.qz-label {
  font-family: var(--qz-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--qz-brown); margin: 0 0 8px;
}
.qz-chip {
  display: inline-block; font-family: var(--qz-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: var(--qz-brown); border-radius: 999px; padding: 4px 12px; margin: 0 0 12px;
}

.qz-art {
  display: block; width: 100%; height: auto; aspect-ratio: 1040 / 513;
  border: 1.5px solid var(--qz-line); border-radius: 14px; background: var(--qz-paper);
}

.qz-title { font-size: 34px; line-height: 1.12; letter-spacing: -0.015em; margin: 20px 0 12px; text-wrap: balance; }
.qz-lead { font-size: 18px; margin: 0 0 12px; }
.qz-note { color: var(--qz-muted); font-size: 15px; margin: 0 0 20px; }

.qz-button {
  display: inline-block; cursor: pointer; font: inherit; font-weight: 700; text-decoration: none;
  color: #fff !important; background: var(--qz-brown); border: 0; border-radius: 12px; padding: 14px 28px;
  box-shadow: 0 3px 0 var(--qz-brown-deep); transition: transform 0.08s, box-shadow 0.08s;
}
.qz-button:hover { background: #9a5341; }
.qz-button:active { transform: translateY(3px); box-shadow: 0 0 0 var(--qz-brown-deep); }
.qz-button-wide { display: block; width: 100%; text-align: center; font-size: 18px; }
.qz-link { font-weight: 700; }

/* ---- progress: ten pegs along a string */
.qz-progress { display: flex; gap: 5px; margin: 0 0 14px; }
.qz-progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--qz-line); transition: background 0.25s; }
.qz-progress span.done { background: var(--qz-brown); }
.qz-progress span.now { background: var(--qz-yellow); outline: 1.5px solid var(--qz-brown); }

.qz-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 12px 0 6px; }
.qz-meta .qz-label { margin: 0; }
.qz-back { background: none; border: 0; padding: 4px 0; cursor: pointer; font-family: var(--qz-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--qz-muted); }
.qz-back:hover { color: var(--qz-ink); }
.qz-back[hidden] { display: none; }

.qz-scene { color: var(--qz-muted); font-size: 15.5px; line-height: 1.45; margin: 0 0 8px; }
.qz-question { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 14px; text-wrap: balance; }

.qz-answers { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.qz-answer {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 16px; line-height: 1.4; color: var(--qz-ink);
  background: #fff; border: 1.5px solid var(--qz-line); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 2px 0 var(--qz-line); transition: transform 0.08s, border-color 0.12s, background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.qz-answer:hover { border-color: var(--qz-brown); }
.qz-answer:active { transform: translateY(2px); box-shadow: none; }
.qz-answer b {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--qz-mono); font-size: 12px; font-weight: 700; color: var(--qz-brown);
  background: var(--qz-panel); margin-top: 1px;
}
.qz-answer.picked { background: var(--qz-brown); border-color: var(--qz-brown); color: #fff; box-shadow: 0 2px 0 var(--qz-brown-deep); }
.qz-answer.picked b { background: var(--qz-yellow); color: var(--qz-ink); }

.qz-card { animation: qz-in 0.28s ease-out both; }
.qz-card.leaving { animation: qz-out 0.18s ease-in both; }
@keyframes qz-in { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes qz-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-22px); } }
.qz-card.back { animation-name: qz-in-back; }
@keyframes qz-in-back { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qz-card, .qz-card.leaving { animation: none; } }

/* ---- result */
.qz-chip-top { display: table; margin: 18px 0 8px; }
.qz-role { font-size: 46px; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 6px; color: var(--qz-brown-deep); }
.qz-tagline { font-size: 21px; font-weight: 700; margin: 0 0 14px; }
.qz-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 0 0 6px; padding: 0; list-style: none; }
.qz-scale li {
  font-family: var(--qz-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; text-align: center;
  padding: 7px 2px; border-radius: 8px; background: var(--qz-panel); color: var(--qz-muted);
}
.qz-scale-ends { display: flex; justify-content: space-between; margin: 0 0 14px; font-family: var(--qz-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--qz-muted); }
.qz-score { margin: 0 0 20px; }
.qz-scale li.on { background: var(--qz-brown); color: #fff; font-weight: 700; }

.qz-section { margin: 30px 0 0; }
.qz-h2 { font-size: 22px; line-height: 1.2; margin: 0 0 10px; }
.qz-box { background: var(--qz-panel); border-radius: 14px; padding: 18px 18px 20px; }
.qz-box p:last-child { margin-bottom: 0; }
.qz-box-yellow { background: #fbf0cf; }
.qz-others { margin: 12px 0 0; font-size: 15px; color: var(--qz-muted); }

.qz-form { display: grid; gap: 12px; }
.qz-form label { display: grid; gap: 4px; font-weight: 700; font-size: 15px; }
.qz-form label.check { display: flex; gap: 8px; align-items: baseline; font-weight: 400; }
.qz-form input[type=email] { font: inherit; padding: 12px 14px; border: 1.5px solid var(--qz-line); border-radius: 10px; width: 100%; background: #fff; box-sizing: border-box; }
.qz-form input[type=email]:focus { outline: 2px solid var(--qz-brown); border-color: var(--qz-brown); }
.qz-form .hp { position: absolute; left: -9999px; }
.qz-error { background: #fdecea; color: #b3261e; padding: 10px 14px; border-radius: 10px; margin: 0; }
.qz-small { font-size: 13.5px; color: var(--qz-muted); margin: 0; }
.qz-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 14px 0 0; }

.qz-footer { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--qz-line); font-size: 14px; color: var(--qz-muted); }

@media (max-width: 430px) {
  .qz-body { font-size: 16px; }
  .qz-title { font-size: 28px; }
  .qz-question { font-size: 20px; }
  .qz-answer { font-size: 15.5px; padding: 11px 12px; }
  .qz-role { font-size: 40px; }
}
