:root {
  --amar-purple: #621587;
  --amar-orange: #f36606;
  --amar-ink: #23092f;
  --amar-text: #4e4f4f;
  --amar-muted: #74787a;
  --amar-line: #e7e1eb;
  --amar-soft: #fbfcfc;
  --amar-wash: #f6f0f8;
  --amar-white: #ffffff;
  --amar-shadow: 0 24px 70px rgba(35, 9, 47, 0.14);
}

* {
  box-sizing: border-box;
}

body.amar-quiz-page {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--amar-text);
  background:
    linear-gradient(112deg, rgba(243, 102, 6, 0.1) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(98, 21, 135, 0.055) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #ffffff 0%, #fbfcfc 48%, #f8f4fa 100%);
  font-family: "Nunito", Arial, sans-serif;
}

.quiz-header,
.quiz-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 18px;
  padding: 0;
}

.quiz-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  display: grid;
  align-items: center;
}

.quiz-hero {
  display: grid;
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
  gap: 0;
  align-items: center;
}

.quiz-copy {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 56px 0 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quiz-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -42px auto auto -42px;
  width: 132px;
  height: 132px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(243, 102, 6, 0.14), rgba(98, 21, 135, 0.08));
  transform: rotate(-10deg);
}

.quiz-copy::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 42px;
  bottom: -22px;
  width: 156px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amar-purple), var(--amar-orange));
  opacity: 0.22;
}

.quiz-copy h1 {
  margin: 0 0 18px;
  color: var(--amar-ink);
  font-family: "Dosis", "Nunito", Arial, sans-serif;
  font-size: clamp(56px, 6.4vw, 88px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.quiz-copy h1 span {
  color: var(--amar-orange);
}

.quiz-copy p {
  width: min(100%, 560px);
  margin: 0 0 28px;
  color: var(--amar-text);
  font-size: 18px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.quiz-start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin-top: 8px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  color: var(--amar-white);
  background: linear-gradient(135deg, #ff760d 0%, var(--amar-orange) 58%, #d64e00 100%);
  box-shadow:
    0 18px 34px rgba(243, 102, 6, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-family: inherit;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.quiz-start-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 42px rgba(243, 102, 6, 0.31),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.quiz-card {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(98, 21, 135, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--amar-shadow);
}

.quiz-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--amar-purple), var(--amar-orange));
}

.quiz-progress {
  margin-bottom: 26px;
}

.quiz-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  color: var(--amar-purple);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.quiz-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--amar-line);
}

.quiz-progress-fill {
  width: 11.11%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amar-purple), var(--amar-orange));
  transition: width 220ms ease;
}

.quiz-question {
  margin: 0 0 22px;
  color: var(--amar-ink);
  font-family: "Dosis", "Nunito", Arial, sans-serif;
  font-size: clamp(27px, 3.4vw, 39px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.quiz-options {
  display: grid;
  gap: 12px;
}

.quiz-option {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid var(--amar-line);
  border-radius: 8px;
  color: var(--amar-ink);
  background: var(--amar-white);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.quiz-option:hover,
.quiz-option[aria-pressed="true"] {
  border-color: rgba(243, 102, 6, 0.68);
  background: #fff9f4;
  box-shadow: 0 12px 28px rgba(98, 21, 135, 0.12);
  transform: translateY(-1px);
}

.quiz-option span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--amar-white);
  background: var(--amar-purple);
  font-size: 13px;
  font-weight: 900;
}

.quiz-option strong {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.quiz-question-actions {
  justify-content: flex-start;
}

.quiz-button {
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: var(--amar-white);
  background: var(--amar-orange);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    box-shadow 160ms ease;
}

.quiz-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(243, 102, 6, 0.24);
}

.quiz-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.quiz-button.secondary {
  color: var(--amar-purple);
  background: transparent;
}

.insight-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.insight-stage {
  position: relative;
  overflow: hidden;
  min-height: min(760px, calc(100dvh - 36px));
  padding: 30px;
  border-radius: 8px;
  color: var(--amar-white);
  background:
    radial-gradient(circle at 22% 16%, rgba(243, 102, 6, 0.46), transparent 28%),
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(145deg, #23092f 0%, #43115c 54%, #621587 100%);
  box-shadow: 0 30px 86px rgba(35, 9, 47, 0.28);
}

.insight-stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--amar-purple), var(--amar-orange));
}

.insight-stage::after {
  content: "";
  position: absolute;
  right: -92px;
  bottom: -92px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.insight-progress {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-scene {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 520px;
}

.insight-number {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-family: "Dosis", "Nunito", Arial, sans-serif;
  font-size: 44px;
  font-weight: 800;
}

.insight-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff1e8;
  background: rgba(243, 102, 6, 0.22);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-content h2 {
  max-width: 12ch;
  margin: 18px 0;
  color: var(--amar-white);
  font-family: "Dosis", "Nunito", Arial, sans-serif;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.96;
  letter-spacing: 0;
}

.insight-answer {
  margin: 0 0 20px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.insight-answer span {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-answer strong {
  display: block;
  color: var(--amar-white);
  font-size: 16px;
  line-height: 1.35;
}

.insight-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.68;
}

.insight-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.insight-back {
  color: rgba(255, 255, 255, 0.76) !important;
}

.insight-next {
  min-width: 220px;
  background: linear-gradient(135deg, #ff760d 0%, var(--amar-orange) 62%, #d64e00 100%);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.lead-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.lead-panel h2 {
  margin: 0 0 10px;
  color: var(--amar-ink);
  font-family: "Dosis", "Nunito", Arial, sans-serif;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1;
}

.lead-panel p {
  margin: 0 0 26px;
  color: var(--amar-text);
  font-size: 17px;
  line-height: 1.55;
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--amar-ink);
  font-size: 14px;
  font-weight: 900;
}

.field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--amar-line);
  border-radius: 8px;
  padding: 0 15px;
  color: var(--amar-ink);
  background: var(--amar-white);
  font: inherit;
  outline: none;
  font-size: 16px;
}

.field input:focus {
  border-color: var(--amar-purple);
  box-shadow: 0 0 0 4px rgba(98, 21, 135, 0.1);
}

.field input[aria-invalid="true"] {
  border-color: #c93232;
}

.field-error {
  min-height: 18px;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
}

.lead-submit {
  width: 100%;
  margin-top: 10px;
}

.form-status {
  min-height: 24px;
  margin-top: 18px;
  color: var(--amar-muted);
  font-weight: 800;
}

.form-status[data-type="success"] {
  color: #16723a;
}

.form-status[data-type="error"] {
  color: #b42318;
}

.quiz-footer {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 0 0 28px;
  color: var(--amar-muted);
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

.is-quiz-active .quiz-shell {
  align-items: start;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 18px 0 28px;
}

.is-quiz-active .quiz-hero {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

@media (max-width: 920px) {
  .quiz-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
  }

  .quiz-copy {
    width: min(100%, 620px);
  }
}

@media (max-width: 640px) {
  .quiz-header,
  .quiz-footer,
  .quiz-shell {
    width: calc(100% - 24px);
  }

  .quiz-header {
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0;
  }

  .quiz-shell {
    min-height: 100dvh;
    padding: 0;
    align-items: stretch;
  }

  .quiz-hero {
    gap: 18px;
    align-items: start;
  }

  .quiz-copy {
    min-height: 100dvh;
    padding: 38px 0 96px;
    justify-content: center;
  }

  .quiz-copy::before {
    inset: -18px auto auto -18px;
    width: 82px;
    height: 82px;
    border-radius: 18px;
  }

  .quiz-copy::after {
    right: 0;
    bottom: -12px;
    width: 104px;
    height: 6px;
  }

  .quiz-copy h1 {
    max-width: 11ch;
    margin-bottom: 12px;
    font-size: clamp(42px, 13vw, 54px);
    line-height: 0.94;
  }

  .quiz-copy p {
    max-width: 36ch;
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.45;
  }

  .quiz-start-button {
    width: 100%;
    min-height: 56px;
    margin-top: 10px;
    font-size: 16px;
  }

  .is-quiz-active .quiz-shell {
    min-height: 100dvh;
    padding: 10px 0 18px;
    align-items: start;
  }

  .is-quiz-active .quiz-hero {
    gap: 0;
  }

  .quiz-card {
    width: 100%;
    padding: 24px 14px 18px;
    border-radius: 8px;
    box-shadow: 0 14px 38px rgba(35, 9, 47, 0.13);
  }

  .quiz-progress {
    margin-bottom: 18px;
  }

  .quiz-progress-row {
    gap: 10px;
    margin-bottom: 10px;
    font-size: 11px;
  }

  .quiz-question {
    margin-bottom: 16px;
    font-size: clamp(24px, 7.4vw, 30px);
    line-height: 1.12;
    word-break: normal;
  }

  .quiz-options {
    gap: 10px;
  }

  .quiz-option {
    grid-template-columns: 34px 1fr;
    gap: 11px;
    min-height: 60px;
    padding: 12px;
  }

  .quiz-option span {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .quiz-option strong {
    font-size: 14px;
    line-height: 1.3;
  }

  .quiz-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 18px;
  }

  .quiz-button {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    font-size: 14px;
  }

  .quiz-question-actions {
    flex-direction: column;
  }

  .insight-stage {
    min-height: calc(100dvh - 28px);
    padding: 24px 14px 18px;
    border-radius: 8px;
  }

  .insight-progress {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
  }

  .insight-scene {
    grid-template-columns: 1fr;
    gap: 18px;
    align-content: center;
    min-height: calc(100dvh - 190px);
    padding: 24px 0;
  }

  .insight-number {
    width: 74px;
    height: 74px;
    font-size: 30px;
  }

  .insight-content h2 {
    max-width: 11ch;
    margin: 14px 0;
    font-size: clamp(36px, 11vw, 46px);
  }

  .insight-answer {
    margin-bottom: 15px;
    padding: 13px;
  }

  .insight-answer strong {
    font-size: 14px;
  }

  .insight-content p {
    font-size: 16px;
    line-height: 1.55;
  }

  .insight-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .insight-next {
    min-width: 0;
  }

  .lead-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lead-panel h2 {
    font-size: clamp(31px, 9vw, 40px);
  }

  .lead-panel p {
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.45;
  }

  .field {
    gap: 5px;
  }

  .field label {
    font-size: 13px;
  }

  .field input {
    min-height: 50px;
  }

  .field-error {
    min-height: 16px;
  }

  .form-status {
    font-size: 14px;
    line-height: 1.35;
  }

  .quiz-footer {
    bottom: 18px;
    padding-bottom: 0;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .quiz-header,
  .quiz-footer,
  .quiz-shell {
    width: calc(100% - 20px);
  }

  .quiz-copy h1 {
    font-size: 38px;
  }

  .quiz-copy p {
    font-size: 14px;
  }

  .quiz-card {
    padding-inline: 12px;
  }

  .quiz-progress-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .quiz-question {
    font-size: 23px;
  }
}
