/* Quiz modal imported from 38_landing_archive.zip */
body.quiz-open {
  overflow: hidden;
}

body.quiz-open #MainContent {
  filter: blur(9px);
  transform: scale(0.995);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.quiz-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.quiz-gate.is-active {
  display: flex;
}

.quiz-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 17, 30, 0.56);
  backdrop-filter: blur(3px);
}

.quiz-shell {
  position: relative;
  width: min(450px, 100%);
  max-height: 92vh;
  border-radius: 22px;
  border: 1px solid #dbe5ef;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 22%);
  box-shadow: 0 24px 64px rgba(11, 31, 56, 0.34);
  overflow: hidden;
}

.quiz-screen {
  display: none;
  padding: 24px 20px 22px;
  max-height: 92vh;
  overflow: auto;
}

.quiz-screen.is-active {
  display: block;
  animation: quiz-fade-up 0.3s ease;
}

.quiz-kicker {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3c75ad;
}

.quiz-title {
  margin-top: 6px;
  color: #17395d;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(2.32rem, 5.6vw, 3.01rem);
  line-height: 1.2;
}

.quiz-copy {
  margin-top: 10px;
  color: #2e455f;
  font-size: 1.54rem;
  line-height: 1.45;
}

.quiz-progress {
  margin-top: 16px;
  height: 10px;
  background: #e4edf7;
  border-radius: 999px;
  overflow: hidden;
}

.quiz-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b6ea9, #5fa7ec);
  transition: width 0.14s linear;
}

.quiz-primary-btn,
.quiz-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.66rem;
  font-weight: 700;
  border-radius: 12px;
}

.quiz-primary-btn {
  color: #ffffff;
  background: linear-gradient(180deg, #377dbd, #28679f);
  box-shadow: 0 10px 24px rgba(30, 87, 136, 0.33);
}

.quiz-primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.quiz-primary-btn--accent {
  color: #3f3100;
  background: linear-gradient(180deg, #ffe27a, #f4c531);
  box-shadow: 0 12px 26px rgba(141, 107, 19, 0.35);
}

.quiz-primary-btn--accent:hover {
  filter: brightness(1.03);
}

.quiz-secondary-btn {
  color: #285c8f;
  background: #eff5fc;
  border: 1px solid #cdddf0;
  box-shadow: none;
}

.quiz-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.quiz-step-count,
.quiz-step-select {
  margin: 0;
  font-size: 1.31rem;
  font-weight: 700;
}

.quiz-step-count {
  color: #2e6aa5;
}

.quiz-step-select {
  color: #667b93;
}

.quiz-question {
  margin: 2px 0 0;
  color: #18385a;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(1.76rem, 4.6vw, 2.21rem);
  line-height: 1.25;
}

.quiz-options {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.quiz-option {
  width: 100%;
  border: 1px solid #cdddef;
  background: #ffffff;
  color: #173f67;
  text-align: left;
  border-radius: 12px;
  padding: 12px 13px;
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.3;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.quiz-option:hover {
  border-color: #8fb5dd;
}

.quiz-option.is-selected {
  border-color: #2c72ad;
  background: #f0f7ff;
  box-shadow: 0 0 0 2px rgba(45, 118, 180, 0.15);
  transform: translateY(-1px);
}

.quiz-options--multi .quiz-option {
  padding-left: 44px;
  position: relative;
}

.quiz-options--multi .quiz-option::before,
.quiz-options--multi .quiz-option::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.quiz-options--multi .quiz-option::before {
  left: 14px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #9db8d6;
  background: #ffffff;
}

.quiz-options--multi .quiz-option::after {
  left: 20px;
  width: 7px;
  height: 11px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: translateY(-58%) rotate(40deg);
}

.quiz-options--multi .quiz-option.is-selected::before {
  border-color: #2b6ea9;
  background: #2b6ea9;
}

.quiz-options--multi .quiz-option.is-selected::after {
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.quiz-next-btn {
  margin-top: 14px;
}

.quiz-benefits {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quiz-benefits li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 1.54rem;
  color: #1d436c;
  border: 1px solid #d6e5f4;
  background: #f7fbff;
  border-radius: 11px;
  padding: 9px 12px;
  font-weight: 600;
}

.quiz-benefits li::before {
  content: "\2714  ";
  color: #1e6cae;
}

.quiz-benefits li.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.quiz-screen--warning .quiz-title {
  color: #6a2f1a;
}

.quiz-screen--warning .quiz-copy {
  color: #58433a;
}

.quiz-screen--result .quiz-title {
  line-height: 1.12;
}

.quiz-screen--result .quiz-benefits {
  margin-top: 12px;
  gap: 6px;
}

.quiz-screen--result .quiz-benefits li {
  padding: 8px 11px;
  line-height: 1.24;
}

.quiz-screen--result .quiz-primary-btn {
  margin-top: 12px;
}

.is-hidden {
  display: none;
}

@keyframes quiz-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* quiz-mobile-sync-42438 */
@media (max-width: 640px) {
  .quiz-gate {
    padding:
      max(8px, env(safe-area-inset-top))
      8px
      max(8px, env(safe-area-inset-bottom));
  }

  .quiz-shell {
    width: min(420px, 100%);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 18px;
  }

  .quiz-screen {
    padding: 18px 15px 16px;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    max-height: calc(100svh - 16px);
  }

  .quiz-kicker {
    font-size: 1.44rem;
    letter-spacing: 0.06em;
  }

  .quiz-title {
    margin-top: 4px;
    font-size: clamp(2.37rem, 6.4vw, 3.07rem);
    line-height: 1.14;
  }

  .quiz-copy {
    margin-top: 8px;
    font-size: 1.73rem;
    line-height: 1.36;
  }

  .quiz-progress {
    margin-top: 12px;
    height: 8px;
  }

  .quiz-primary-btn,
  .quiz-secondary-btn {
    min-height: 46px;
    margin-top: 12px;
    font-size: 1.86rem;
    border-radius: 10px;
  }

  .quiz-step-row,
  .quiz-steps.is-compact .quiz-step-row {
    gap: 6px;
    margin-bottom: 6px;
  }

  .quiz-step-count,
  .quiz-step-select {
    font-size: 1.55rem;
  }

  .quiz-question,
  .quiz-steps.is-compact .quiz-question {
    margin-top: 0;
    font-size: clamp(2.11rem, 5.7vw, 2.5rem);
    line-height: 1.18;
  }

  .quiz-options,
  .quiz-steps.is-compact .quiz-options {
    margin-top: 9px;
    gap: 6px;
  }

  .quiz-option {
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 1.89rem;
    line-height: 1.2;
  }

  .quiz-options--dense .quiz-option {
    padding: 8px 10px;
    font-size: 1.73rem;
    line-height: 1.16;
  }

  .quiz-options--multi .quiz-option {
    padding-left: 38px;
  }

  .quiz-options--dense.quiz-options--multi .quiz-option {
    padding-left: 36px;
  }

  .quiz-options--multi .quiz-option::before {
    left: 12px;
    width: 15px;
    height: 15px;
    border-radius: 4px;
  }

  .quiz-options--multi .quiz-option::after {
    left: 17px;
    width: 5px;
    height: 9px;
  }

  .quiz-next-btn {
    margin-top: 12px;
  }

  .quiz-benefits {
    margin-top: 12px;
    gap: 6px;
  }

  .quiz-benefits li {
    font-size: 1.73rem;
    padding: 8px 10px;
  }

  .quiz-screen--result {
    padding: 14px 12px 12px;
  }

  .quiz-screen--result .quiz-kicker {
    font-size: 1.25rem;
    letter-spacing: 0.05em;
  }

  .quiz-screen--result .quiz-title {
    margin-top: 3px;
    font-size: clamp(1.89rem, 5.1vw, 2.37rem);
    line-height: 1.07;
  }

  .quiz-screen--result .quiz-benefits {
    margin-top: 9px;
    gap: 5px;
  }

  .quiz-screen--result .quiz-benefits li {
    font-size: 1.47rem;
    padding: 7px 9px;
    line-height: 1.18;
  }

  .quiz-screen--result .quiz-primary-btn {
    min-height: 42px;
    margin-top: 10px;
    font-size: 1.57rem;
  }
}

@media (max-width: 380px), (max-width: 640px) and (max-height: 740px) {
  .quiz-gate {
    padding:
      max(6px, env(safe-area-inset-top))
      6px
      max(6px, env(safe-area-inset-bottom));
  }

  .quiz-shell {
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    max-height: calc(100svh - 12px);
    border-radius: 16px;
  }

  .quiz-screen {
    padding: 15px 12px 12px;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    max-height: calc(100svh - 12px);
  }

  .quiz-kicker {
    font-size: 1.28rem;
  }

  .quiz-title {
    font-size: clamp(2.11rem, 6vw, 2.53rem);
  }

  .quiz-copy {
    margin-top: 6px;
    font-size: 1.57rem;
    line-height: 1.3;
  }

  .quiz-step-row,
  .quiz-steps.is-compact .quiz-step-row {
    margin-bottom: 4px;
  }

  .quiz-step-count,
  .quiz-step-select {
    font-size: 1.38rem;
  }

  .quiz-step-select {
    display: none;
  }

  .quiz-question,
  .quiz-steps.is-compact .quiz-question {
    font-size: 1.89rem;
  }

  .quiz-options,
  .quiz-steps.is-compact .quiz-options {
    margin-top: 8px;
    gap: 4px;
  }

  .quiz-option {
    padding: 7px 9px;
    font-size: 1.65rem;
    line-height: 1.16;
  }

  .quiz-options--dense .quiz-option {
    padding: 6px 8px;
    font-size: 1.57rem;
    line-height: 1.12;
  }

  .quiz-options--multi .quiz-option {
    padding-left: 34px;
  }

  .quiz-options--dense.quiz-options--multi .quiz-option {
    padding-left: 32px;
  }

  .quiz-options--multi .quiz-option::before {
    left: 10px;
    width: 14px;
    height: 14px;
  }

  .quiz-options--multi .quiz-option::after {
    left: 15px;
    width: 4px;
    height: 8px;
  }

  .quiz-primary-btn,
  .quiz-secondary-btn {
    min-height: 40px;
    margin-top: 8px;
    font-size: 1.6rem;
  }

  .quiz-benefits li {
    font-size: 1.57rem;
  }

  .quiz-screen--result {
    padding: 12px 10px 10px;
  }

  .quiz-screen--result .quiz-kicker {
    font-size: 1.15rem;
  }

  .quiz-screen--result .quiz-title {
    margin-top: 2px;
    font-size: clamp(1.63rem, 4.8vw, 1.98rem);
    line-height: 1.04;
  }

  .quiz-screen--result .quiz-benefits {
    margin-top: 7px;
    gap: 4px;
  }

  .quiz-screen--result .quiz-benefits li {
    font-size: 1.34rem;
    padding: 6px 8px;
    border-radius: 9px;
  }

  .quiz-screen--result .quiz-primary-btn {
    min-height: 38px;
    margin-top: 8px;
    font-size: 1.47rem;
  }
}
