.quiz main {
  --bs-white: #ffffff;
  --bs-dark: #100424;

  --bs-primary: #7A34F2;
  --bs-heading-color: #1A073C;
  --bs-body-color: var(--bs-dark);

  --bs-plum-050: #F8F5FE;
  --bs-plum-100: #F2EBFE;
  --bs-plum-200: #E4D6FC;
  --bs-plum-400: #CAAEFA;
  --bs-plum-500: #BC99F9;
  --bs-plum-600: #AF85F7;

  --bs-gray-300: #DDDAE2;
  --bs-gray-600: #8C829D;

  --bs-font-family-primary: 'Atkinson Hyperlegible Next', sans-serif;
}

.quiz main .content {
  padding: 0;
  position: relative;
  max-width: 100vw;
  overflow: hidden;
}

.q-quiz-container {
  margin: 0 auto;
  padding: 80px 15px;
  max-width: 670px;
  min-height: 420px;
  font-family: var(--bs-font-family-primary);
}

.quiz main .content:before {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(212.96% 118.29% at 50% 0%,
      #F3F2FF 25%,
      #303FF6 72.3%,
      #7C4CF6 100%);

  opacity: 0.1;
  z-index: -1;
}

.quiz main .content:after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url(../img/grid.svg);
  opacity: 0.52;
  background-repeat: no-repeat;
  z-index: -1;
  background-size: 658px 443px;
  background-position: left bottom;
}

.quiz main .content .btn-q {
  gap: 20px;
  letter-spacing: 0.02em;
}

.quiz main .content .btn-q:not(:focus) {
  box-shadow: none;
}

/* Override Bootstrap form control colors for quiz */
/* .q-quiz-container .form-check-input:checked {
  background-color: #7a34f2;
  border-color: #7a34f2;
}

.q-quiz-container .form-check-input:focus {
  border-color: #b48af7;
  box-shadow: 0 0 0 .25rem rgba(122, 52, 242, .25);
}

.q-quiz-container .form-check-input[type=checkbox]:indeterminate {
  background-color: #7a34f2;
  border-color: #7a34f2;
} */

.q-screen {
  display: none;
  animation: qFadeIn 0.3s ease;
}

.q-screen.active {
  display: block;
}

.q-flat-question {
  margin-bottom: 40px;
}

@keyframes qFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.q-start-screen {
  text-align: center;
  color: var(--bs-heading-color);
}

.q-quiz-title {
  font-size: 48px;
  line-height: 1;
  font-weight: 800;
  margin-bottom: 24px;
}

.q-quiz-description {
  max-width: 440px;
  font-size: 16px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.q-progress-wrapper {
  margin-bottom: 65px;
}

.q-progress {
  position: relative;
  height: 6px;
  background: var(--bs-gray-300);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.q-progress-bar {
  height: 100%;
  background: #7a34f2;
  border-radius: 3px;
  width: 0;
  transition: width 0.3s ease;
}

.q-progress-text {
  display: block;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: #7a34f2;
}

.q-question-screen,
.q-group-screen {
  padding: 20px 0;
}

.q-question-text,
.q-group-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.q-question-description {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  margin-bottom: 24px;
}

.q-group-questions-wrapper {
  margin-bottom: 20px;
}

.q-group-question {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.q-group-question-text {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #1d2327;
}

.q-group-question-description {
  color: #575757;
  font-size: 14px;
  margin-bottom: 15px;
}

.q-info-box {
  margin-top: 15px;
  padding: 12px 16px;
  background: #e7f3ff;
  border-left: 4px solid var(--bs-primary);
  border-radius: 4px;
  color: #1d2327;
  font-size: 14px;
  line-height: 1.6;
}

.q-answers {
  list-style: none;
  padding: 0;
  margin: 0;
}

.q-answer-option:not(:last-child) {
  margin-bottom: 8px;
}

.q-answer-label {
  display: flex;
  align-items: flex-end;
  padding: 18px 24px 16px;
  background: var(--bs-plum-050);
  border: 1px solid var(--bs-plum-200);
  color: var(--bs-body-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  line-height: 1.2;
}

.q-answer-label:hover {
  border-color: var(--bs-primary);
  background: var(--bs-plum-100);
}

.q-answer-label input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0 0.625rem 0 0;
}

.q-answer-label input[type="radio"] {
  appearance: none;
  background-color: var(--bs-white);
  border: 1px solid var(--bs-dark);
  border-radius: 50%;
  transform: translateY(-0.075em);
  display: grid;
  place-content: center;
}

.q-answer-label input[type="radio"]::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--bs-white);
}

.q-answer-label input[type="radio"]:checked {
  background-color: var(--bs-dark);
}

.q-answer-label input[type="radio"]:checked::before {
  transform: scale(1);
}

.q-answer-label:has(input:focus) {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.q-answer-label.selected {
  border-color: var(--bs-plum-400);
  background: var(--bs-plum-100);
}

.q-navigation {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Checkbox */
.q-quiz-container input:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  box-shadow: none;
}

.q-quiz-container .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--bs-dark);
  margin: 0 0.625rem 0 0;
  border-radius: 2px;
}

.q-quiz-container .form-check-input:checked {
  accent-color: var(--bs-primary);
  background-color: #7a34f2;
  border-color: #7a34f2;
}

/* .q-nav-btn {
  padding: 12px 20px 12px 32px;
  font-size: 18px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 40px;
  color: #1d2327;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.q-nav-btn:hover {
  background: #eee;
}

.q-nav-btn.q-next-btn {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: var(--bs-white);
}

.q-nav-btn.q-next-btn:not(:disabled):hover {
  opacity: 0.9;
} */

.q-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.q-lead-screen {
  padding: 40px;
  border: 1px solid var(--bs-plum-500);
  background-color: var(--bs-white);
  border-radius: 8px;
}

.q-lead-screen .q-lead-screen-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.q-lead-screen .q-lead-screen-description {
  color: var(--bs-gray-600);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.q-lead-form {
  margin: 0 auto;
  text-align: left;
}

/* Bootstrap form support */
.q-lead-form .form-label {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 700;
  padding-top: 0;
}

.q-lead-form .form-label .required {
  margin-left: -5px;
}

.q-lead-form .input {
  margin: 0;
}

.q-lead-form .form-control[aria-invalid="true"] {
  border-color: #d63638;
  border-width: 2px;
  background-color: #fff8f8;
}

.q-lead-form .form-control[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 .25rem rgba(214, 54, 56, .25);
}

.q-lead-form .digital-field .form-legend {
  font-size: 1rem;
  line-height: 1.6;
  padding: 0;
  margin-bottom: 20px;
}

.q-field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #d63638;
  font-size: 14px;
  margin-top: 8px;
  font-weight: 500;
  line-height: 1.4;
}

.q-field-error::before {
  content: "⚠";
  flex-shrink: 0;
  font-size: 16px;
}

fieldset[aria-describedby] {
  border: 2px solid #d63638;
  padding: 15px;
  border-radius: 6px;
  background-color: #fff8f8;
}

fieldset[aria-describedby] .q-field-error {
  margin-top: 12px;
}

.q-checkbox-group {
  margin-top: 10px;
}

.q-checkbox-group .form-check {
  display: flex;
  align-items: center;
  padding-left: 0;
  margin-bottom: 6px;
}

.q-checkbox-group .form-check .form-check-label {
  margin-bottom: 0;
  padding-top: 0;
}

.q-feedback-screen {
  text-align: center;
  padding: 40px 20px;
  background: #f0f6fc;
  border-radius: 8px;
  margin: 20px 0;
}

.q-feedback-content {
  font-size: 16px;
  line-height: 1.7;
  color: #1d2327;
  margin-bottom: 25px;
}

.q-result-screen {
  text-align: center;
}

.q-result-content h2 {
  font-size: 28px;
  margin: 0 0 20px;
  color: #00a32a;
}

.q-result-image {
  margin: 0 0 25px;
}

.q-result-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.q-score-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 48px;
  line-height: 1;
  color: var(--bs-gray-600);
}

.q-score-value {
  font-weight: 800;
  color: var(--bs-primary);
}

.q-score-percentage {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  color: var(--bs-primary);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.q-result-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--bs-heading-color);
  margin-bottom: 40px;
}

.q-result-content p {
  font-size: 16px;
  line-height: 1.7;
  color: #1d2327;
}

.q-result-content .q-restart-btn {
  padding: 8px 32px;
}

.q-result-content .q-restart-btn::after {
  content: none;
}

.q-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  min-height: 100%;
}

.q-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f4f5;
  border-top: 5px solid var(--bs-primary);
  border-radius: 50%;
  animation: qSpin 0.8s linear infinite;
}

@keyframes qSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .q-spinner {
    animation: none;
    border-top-color: var(--bs-primary);
    opacity: 0.6;
  }
}

.q-loading-text {
  margin-top: 15px;
  color: #575757;
  font-size: 14px;
}

.q-error {
  color: #d63638;
  text-align: center;
  padding: 20px;
  background: #fcf0f1;
  border-radius: 6px;
}

@media (max-width: 480px) {

  .quiz main .content:after {
    left: -20%;
    bottom: -20%;
    background-size: 400px 400px;
  }

  .q-question-text {
    font-size: 18px;
  }

  .q-answer-label {
    padding: 12px 15px;
    font-size: 14px;
  }

  .q-navigation {
    flex-direction: column;
    gap: 10px;
  }

  .q-nav-btn {
    width: 100%;
    text-align: center;
  }
}

/* Recommendations Section */
.q-result-recommendations {
  background: #f8f9fa;
  border-left: 4px solid var(--bs-primary);
  padding: 25px;
  margin: 30px 0;
  border-radius: 4px;
}

.q-result-recommendations h3 {
  color: var(--bs-primary);
  font-size: 20px;
  margin: 0 0 15px 0;
}

.q-recommendations-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.q-recommendations-list li {
  padding: 12px 0 12px 30px;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  line-height: 1.6;
}

.q-recommendations-list li:last-child {
  border-bottom: none;
}

.q-recommendations-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--bs-primary);
  font-weight: bold;
  font-size: 18px;
}

/* Low score recommendations (0-1 points) show dash instead of checkmark */
.q-recommendations-list li.q-recommendation-low::before {
  content: "−";
  color: #d63638;
}

/* Result page styles */
.q-result-page {
  --bs-primary: #7a34f2;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Override Bootstrap form control colors for result page */
/* .q-result-page .form-check-input:checked {
  background-color: #7a34f2;
  border-color: #7a34f2;
}

.q-result-page .form-check-input:focus {
  border-color: #b48af7;
  box-shadow: 0 0 0 .25rem rgba(122, 52, 242, .25);
}

.q-result-page .form-check-input[type=checkbox]:indeterminate {
  background-color: #7a34f2;
  border-color: #7a34f2;
} */

.q-result-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.q-result-header h1 {
  margin: 0 0 10px 0;
  font-size: 32px;
  color: #333;
}

.q-result-date {
  color: #575757;
  font-size: 14px;
}

.q-result-info {
  margin-bottom: 30px;
}

.q-result-info h2 {
  font-size: 24px;
  color: #333;
  margin: 0 0 15px 0;
}

.q-result-block-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--bs-heading-color);
  margin: 20px 0 15px;
  line-height: 1.3;
}

.q-result-content {
  line-height: 1.8;
  color: #575757;
}

.q-result-image {
  margin: 20px 0;
  text-align: center;
}

.q-result-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.q-answers-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.q-answers-list li {
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.q-answers-list li:last-child {
  border-bottom: none;
}

.q-answer-score {
  color: var(--bs-primary);
  font-weight: 600;
  font-size: 14px;
}

.q-result-footer {
  margin-top: 40px;
  text-align: center;
}

/* Hubspot Form */

#q-hubspot-form-container label:not(.hs-form-checkbox-display) {
  line-height: 1.6;
  font-weight: 700;
  margin-bottom: 5px;
}

#q-hubspot-form-container input[type="text"],
#q-hubspot-form-container input[type="email"],
#q-hubspot-form-container input[type="tel"] {
  height: 52px;
  min-height: 52px;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--bs-dark);
  font-weight: 700;
  line-height: 25px;
  width: 100%;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
}

#q-hubspot-form-container input[type="text"]:focus,
#q-hubspot-form-container input[type="email"]:focus,
#q-hubspot-form-container input[type="tel"]:focus {
  outline: 3px solid #3aaad5 !important;
  border-color: var(--bs-white) !important;
  background-color: var(--bs-white) !important;
  padding: 15px;
}

#q-hubspot-form-container input[type="text"]:hover,
#q-hubspot-form-container input[type="email"]:hover,
#q-hubspot-form-container input[type="tel"]:hover {
  border: 2px solid var(--bs-plum-600);
  background-color: #f8f5fe;
  padding: 15px;
}

#q-hubspot-form-container .hs-error-msg {
  color: #eb0a0a;
  font-size: 14px;
  line-height: 1.1;
  display: block;
  top: auto;
  margin-top: 4px;
  position: relative;
}

#q-hubspot-form-container .form-columns-1 input[type="checkbox"] {
  width: 1.25rem !important;
  height: 1.25rem;
  border: 1px solid var(--bs-dark);
  margin: 0 0.625rem 0 0;
  border-radius: 2px;
}

#q-hubspot-form-container .inputs-list {
  list-style-type: none;
  padding-left: 2px;
}

#q-hubspot-form-container .inputs-list .hs-form-booleancheckbox {
  margin-top: 20px;
}

#q-hubspot-form-container .inputs-list .hs-form-checkbox {
  padding: 5px 0;
  margin-bottom: 8px;
}

#q-hubspot-form-container .inputs-list label {
  display: flex;
  align-items: center;
  line-height: 1.2;
}

#q-hubspot-form-container .hs-form-field {
  max-width: 100%;
}

#q-hubspot-form-container .hs_q_geographic_areas {
  line-height: 1.6;
  margin-top: 38px;
}

#q-hubspot-form-container .hs_q_geographic_areas .hs-form-required {
  margin-left: 5px;
}

#q-hubspot-form-container .hs_q_geographic_areas div:first-child {
  margin-bottom: 20px;
}

#q-hubspot-form-container .hs-submit {
  text-align: center;
  margin-top: 48px;
}

#q-hubspot-form-container .hs-submit input[type="submit"] {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font-weight: 600;
}