/* ============================================================
   quiz.css — consultation quiz modal, floating CTA, green CTA block
   Builds on colors_and_type.css + components.css tokens
   ============================================================ */

/* ============ OVERLAY + MODAL ============ */
.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 15, 10, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
  animation: quizFade var(--dur-base) var(--ease-out) both;
}
@keyframes quizFade { from { opacity: 0; } to { opacity: 1; } }

.quiz-modal {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - var(--s-9));
  overflow-y: auto;
  background: var(--bg-elevated);
  color: var(--fg);
  border: var(--border-hair);
  border-radius: var(--r-5);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 4vw, 48px);
  animation: quizPop var(--dur-base) var(--ease-bouncy) both;
}
@keyframes quizPop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

.quiz-close {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--r-pill);
  background: var(--bone-2);
  color: var(--ink-900);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out);
}
.quiz-close:hover { background: var(--line-2); }

.quiz-welcome {
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 0 var(--s-5) 0;
}

/* ============ PROGRESS ============ */
.quiz-progress { margin-bottom: var(--s-6); }
.quiz-progress__bar {
  height: 6px;
  background: var(--bone-2);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.quiz-progress__fill {
  height: 100%;
  background: var(--kiwi-400);
  border-radius: var(--r-pill);
  transition: width var(--dur-slow) var(--ease-out);
}
.quiz-progress__label {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}

.quiz-back {
  border: none;
  background: transparent;
  color: var(--fg-3);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--s-4);
  transition: color var(--dur-base) var(--ease-out);
}
.quiz-back:hover { color: var(--ink-900); }

/* ============ QUESTION + OPTIONS ============ */
.quiz-question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0 0 var(--s-6) 0;
  text-wrap: balance;
}

.quiz-options { display: flex; flex-direction: column; gap: var(--s-3); }
.quiz-option {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  background: var(--bg-elevated);
  border: 1.5px solid var(--line);
  border-radius: var(--r-3);
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.quiz-option:hover {
  border-color: var(--kiwi-500);
  background: var(--kiwi-50);
  transform: translateX(2px);
}
.quiz-option--active {
  border-color: var(--ink-900);
  background: var(--ink-900);
  color: var(--bone);
}

/* ============ RESULT + FORM ============ */
.quiz-result { display: flex; flex-direction: column; gap: var(--s-4); }
.quiz-result__badge {
  align-self: flex-start;
  background: var(--kiwi-400);
  color: var(--ink-900);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--r-pill);
}
.quiz-result__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0;
  text-wrap: balance;
}
.quiz-result__sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
}

.quiz-form { display: flex; flex-direction: column; gap: var(--s-4); }
.quiz-form .field { gap: var(--s-1); }

.quiz-phone { display: flex; gap: var(--s-2); }
.quiz-phone__code { width: auto; min-width: 116px; flex: 0 0 auto; }
.quiz-phone .input { flex: 1 1 auto; }

.quiz-field__err {
  font-size: 13px;
  color: var(--danger);
  font-weight: 500;
}

.quiz-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-2);
  cursor: pointer;
}
.quiz-consent input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--kiwi-600);
  flex: 0 0 auto;
}
.quiz-consent a { color: var(--kiwi-700); text-decoration: underline; }

/* ============ FLOATING CTA ============ */
.floating-cta {
  position: fixed;
  bottom: var(--s-5);
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: 0 var(--s-5);
  pointer-events: none;
}
.floating-cta__btn {
  pointer-events: auto;
  box-shadow: var(--shadow-lime), var(--shadow-md);
}
@media (max-width: 600px) {
  .floating-cta { bottom: 0; padding: var(--s-3); background: linear-gradient(to top, var(--bg) 60%, transparent); }
  .floating-cta__btn { width: 100%; justify-content: center; }
}

/* ============ HEADER CONSULT BAR (dark pill, matches .tab-pill style) ============ */
.consult-bar-wrap {
  border-top: var(--border-hair);
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-3) var(--gutter);
}
.consult-bar {
  display: flex;
  width: 100%;
  align-items: center;
  border: none;
  cursor: pointer;
  background: var(--kiwi-400);
  color: var(--ink-900);
  border-radius: var(--r-2);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  transition: background var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.consult-bar:hover { background: var(--kiwi-300); transform: translateY(-1px); }
.consult-bar__cta {
  color: var(--ink-900);
  font-weight: 800;
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .consult-bar-wrap { padding: var(--s-2) 14px; }
  .consult-bar { font-size: 12.5px; padding: 9px 16px; align-items: flex-start; }
}

/* ============ GREEN CTA BLOCK (replaces the "ЗАПИСАТИСЬ" button on page 4) ============ */
.cta-greenblock {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--kiwi-400);
  color: var(--ink-900);
  border: none;
  border-radius: var(--r-4);
  padding: clamp(20px, 3vw, 32px);
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.cta-greenblock:hover { transform: translateY(-2px); box-shadow: var(--shadow-lime); }
.cta-greenblock__lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-3) 0;
}
.cta-greenblock__lead strong { text-decoration: underline; text-underline-offset: 3px; }
.cta-greenblock__sub {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-800);
  margin: 0;
}

/* ============ EDITORIAL FULL-WIDTH (page 1 prose next to calculator) ============ */
/* Single full-width column (used on legal pages — sequential numbered clauses) */
.prose--full { max-width: none; }

.prose--wide { max-width: none; }
@media (min-width: 1024px) {
  .prose--wide { column-count: 2; column-gap: var(--s-10); column-fill: balance; }
  .prose--wide .prose__lead,
  .prose--wide .prose__pull { column-span: all; }
  .prose--wide > p { break-inside: avoid; }
}
