/**
 * Growth intake quiz — isolated, mobile-first interaction styles.
 */
.dl-quiz-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(0, 167, 225, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 167, 225, 0.035) 1px, transparent 1px),
    var(--cloud);
  background-size: 32px 32px;
  color: var(--charcoal);
}

.dl-quiz-wrap {
  width: min(100% - 32px, 860px);
  margin-inline: auto;
}

.dl-quiz-intro {
  padding: calc(var(--dl-header-h, 64px) + 48px) 0 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 25%, rgba(0, 167, 225, 0.24), transparent 34%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--cloud);
}
.dl-quiz-intro[hidden],
.dl-quiz-page.is-quiz-active .dl-quiz-intro {
  display: none !important;
}
.dl-quiz-page.is-quiz-active .dl-quiz-stage {
  padding-top: calc(var(--dl-header-h, 64px) + 28px);
}

.dl-quiz-intro .dl-kicker {
  margin: 0 0 14px;
  color: var(--cyan-soft);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.dl-quiz-intro h1 {
  max-width: 700px;
  margin: 0;
  color: var(--cloud);
  font: 800 clamp(2.15rem, 10vw, 4.9rem) / 1.03 var(--font-display);
  letter-spacing: -0.045em;
}

.dl-quiz-intro-body {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.75;
}

.dl-quiz-intro-actions {
  margin-top: 22px;
}

.dl-quiz-intro-actions .dl-btn-primary {
  box-shadow: 0 10px 28px rgba(255, 184, 0, 0.28);
}

.dl-field-label {
  display: block;
  margin: 0 0 10px;
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
}

.dl-quiz-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  margin: 28px 0 8px;
  padding-bottom: 24px;
  font-size: 0.85rem;
}

.dl-quiz-legal a {
  color: #64748b;
  text-decoration: none;
}

.dl-quiz-legal a:hover,
.dl-quiz-legal a:focus-visible {
  color: var(--navy);
}

/* Quiz surface: keep focus on the conversation (WA stays — exit hatch on all pages) */
body.dl-quiz-surface .primary-nav,
body.dl-quiz-surface .nav-toggle,
body.dl-quiz-surface .dl-sticky-cta,
body.dl-quiz-surface .exact-footer {
  display: none !important;
}

body.dl-quiz-surface {
  --dl-sticky-h: 0px;
}

/* Above quiz chrome; no sticky CTA bar on this surface */
body.dl-quiz-surface .dl-wa {
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
}

.dl-quiz-deliverables {
  max-width: 640px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.dl-quiz-deliverables li {
  position: relative;
  padding-inline-start: 1.4rem;
  color: #d7e4f0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.dl-quiz-deliverables li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--cyan);
}

.dl-field-block {
  display: block;
  margin: 8px 0 18px;
}

.dl-field-block input[type="text"],
.dl-field-block textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(7, 27, 51, 0.16);
  border-radius: 12px;
  background: #fff;
  color: var(--charcoal);
  font: inherit;
  direction: rtl;
  text-align: right;
}

.dl-field-block input[type="text"]:focus,
.dl-field-block textarea:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}

.dl-field-block textarea {
  min-height: 112px;
  resize: vertical;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dl-quiz-booking {
  margin-top: 24px;
  padding: 24px 18px;
  border: 1px solid rgba(7, 27, 51, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px -28px rgba(7, 27, 51, 0.45);
}

.dl-quiz-booking h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font: 800 clamp(1.5rem, 5vw, 2rem) / 1.2 var(--font-display);
}

.dl-quiz-booking > p {
  margin: 0 0 18px;
  color: #536174;
  line-height: 1.65;
}

.dl-quiz-booking-fallback {
  margin-bottom: 16px !important;
}

.dl-quiz-checkin {
  margin: 22px 0;
  padding-top: 18px;
  border-top: 1px solid rgba(7, 27, 51, 0.1);
}

.dl-quiz-checkin-pending-title {
  margin: 0 0 6px;
  color: var(--navy);
  font: 700 1.05rem/1.4 var(--font-display);
}

.dl-quiz-checkin-pending-micro {
  margin: 0;
  color: #6b7a8d;
  font-size: 0.92rem;
  line-height: 1.5;
}

.dl-quiz-checkin-ready h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font: 800 1.2rem/1.3 var(--font-display);
}

.dl-quiz-checkin-ready strong {
  display: block;
  margin: 14px 0 4px;
  color: var(--navy);
  font-size: 0.95rem;
}

.dl-quiz-checkin-ready p {
  margin: 0;
  color: #425466;
  line-height: 1.65;
}

.dl-quiz-checkin-disclaimer {
  margin-top: 16px !important;
  color: #6b7a8d !important;
  font-size: 0.88rem;
}

.dl-quiz-calendar {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(7, 27, 51, 0.1);
  background: #f7fafc;
  min-height: 640px;
}

.dl-quiz-booked {
  margin-top: 8px;
  padding: 28px 22px;
  border: 1px solid rgba(7, 27, 51, 0.12);
  border-radius: 14px;
  background: #f7fafc;
  text-align: center;
  direction: rtl;
}

.dl-quiz-booked-mark {
  margin: 0 auto 12px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #12b76a;
  color: #fff;
  font: 700 1.4rem/48px var(--font-display);
}

.dl-quiz-booked h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font: 800 1.35rem/1.3 var(--font-display);
}

.dl-quiz-booked p {
  margin: 0;
  color: #425466;
  line-height: 1.65;
}

.dl-quiz-booked-when {
  margin-top: 14px !important;
}

.dl-quiz-booked-when strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.dl-quiz-booked-next {
  margin-top: 16px !important;
  color: #536174 !important;
}

.dl-quiz-calendar iframe,
.dl-quiz-calendar .dl-cal-inline {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  overflow: auto;
}

.dl-quiz[hidden] {
  display: none !important;
}

.dl-quiz-stage {
  padding: 0 0 88px;
}

.dl-quiz {
  position: relative;
  margin-top: -34px;
  padding: 24px 18px;
  border: 1px solid rgba(7, 27, 51, 0.12);
  border-radius: 16px;
  background: var(--cloud);
  box-shadow: 0 18px 50px rgba(7, 27, 51, 0.1);
}

.dl-quiz-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.dl-quiz-progress {
  height: 5px;
  margin-bottom: 32px;
  overflow: hidden;
  border-radius: 5px;
  background: #dce6ee;
}

.dl-quiz-progress span {
  display: block;
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
  transition: width 320ms ease;
}

.dl-quiz fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.dl-quiz fieldset[hidden] {
  display: none !important;
}

.dl-quiz fieldset:not([hidden]) {
  animation: quiz-step-in 260ms ease both;
}

/* display:grid/flex on grids must not beat the HTML hidden attribute */
.dl-quiz .dl-choice-grid[hidden],
.dl-quiz [data-scope-options][hidden],
.dl-quiz [data-investment-options][hidden] {
  display: none !important;
}

.dl-quiz legend {
  width: 100%;
  margin: 0 0 10px;
  color: var(--navy);
  font: 700 clamp(1.45rem, 7vw, 2.25rem) / 1.2 var(--font-display);
}

.dl-quiz legend:focus {
  outline: none;
}

.dl-step-help {
  margin: 0 0 22px;
  color: #607083;
  line-height: 1.6;
}

.dl-choice-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.dl-choice {
  position: relative;
  display: block;
  margin: 0;
  min-width: 0;
}

.dl-choice input {
  position: absolute;
  inset: 50% 18px auto auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dl-choice span {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid #cbd7e2;
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
  unicode-bidi: isolate;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dl-choice span:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.dl-choice input:focus-visible + span {
  outline: 3px solid rgba(0, 167, 225, 0.24);
  outline-offset: 2px;
}

.dl-choice input:checked + span {
  border-color: var(--cyan);
  border-width: 2px;
  background: #dff6ff;
  box-shadow: inset 5px 0 0 var(--cyan), 0 0 0 3px rgba(0, 167, 225, 0.12);
  font-weight: 700;
}

.dl-choice-intent span {
  gap: 14px;
}

.dl-choice-intent small {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--cyan-soft);
  font-size: 0.7rem;
}

.dl-choice-intent input:checked + span small {
  background: var(--cyan);
  color: var(--navy);
}

.dl-step-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  margin-top: 26px;
}

.dl-step-actions .dl-btn {
  width: 100%;
  min-height: 50px;
}

.dl-quiz .dl-btn-primary {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--navy);
}

.dl-quiz .dl-btn-primary:hover {
  border-color: #e59e00;
  background: #e59e00;
  color: var(--navy);
}

.dl-quiz .dl-btn-ghost {
  border-color: #b9c7d3;
  background: transparent;
  color: var(--navy);
}

.dl-quiz-result {
  margin: 0 0 30px;
  padding: 22px 18px;
  border-inline-start: 5px solid var(--cyan);
  border-radius: 12px;
  background: var(--navy);
  color: var(--cloud);
}

.dl-quiz-result > span {
  color: var(--cyan-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.dl-quiz-result h2 {
  margin: 10px 0;
  color: var(--cloud);
  font: 700 clamp(1.55rem, 7vw, 2.4rem) / 1.15 var(--font-display);
}

.dl-quiz-result p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.65;
}

.dl-quiz-result ol {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-inline-start: 22px;
  color: var(--cloud);
}

.dl-contact-grid {
  display: grid;
  gap: 14px;
}

.dl-contact-grid label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-weight: 700;
}

.dl-contact-grid label small {
  color: #708094;
  font-weight: 500;
}

.dl-contact-grid input {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid #b9c7d3;
  border-radius: 9px;
  background: #fff;
  color: var(--charcoal);
  font: 400 16px var(--font-body);
}

.dl-contact-grid input:focus {
  border-color: var(--cyan);
  outline: 3px solid rgba(0, 167, 225, 0.18);
}

.dl-choice-grid-compact {
  grid-template-columns: repeat(3, 1fr);
}

.dl-choice-grid-compact span {
  justify-content: center;
  min-height: 48px;
  padding: 10px 6px;
}

.dl-quiz .dl-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 22px;
  color: #526175;
  font-size: 0.88rem;
  line-height: 1.5;
}

.dl-quiz .dl-check input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.dl-quiz .dl-check a {
  color: var(--navy);
}

.dl-form-status {
  margin: 12px 0 0;
  color: var(--cyan);
  font-weight: 600;
}

.dl-form-status.is-error {
  color: #b42318;
}

.dl-form-status.is-sending {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.dl-send-copy {
  display: inline-flex;
  align-items: baseline;
}

.dl-send-dots::after {
  content: '...';
  display: inline-block;
  letter-spacing: 0.05em;
  animation: dl-dot-pulse 1s ease-in-out infinite;
}

.dl-quiz.is-sending .dl-quiz-progress {
  position: relative;
  background: #d5e3ee;
}

.dl-quiz.is-sending .dl-quiz-progress span {
  width: 36% !important;
  animation: dl-progress-slide 1.15s ease-in-out infinite;
}

.dl-quiz.is-sending .dl-step-actions .dl-btn-ghost {
  opacity: 0.45;
}

@keyframes dl-dot-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@keyframes dl-progress-slide {
  0% { transform: translateX(160%); }
  100% { transform: translateX(-220%); }
}

@media (prefers-reduced-motion: reduce) {
  .dl-btn-spinner,
  .dl-send-spinner,
  .dl-send-dots::after,
  .dl-quiz.is-sending .dl-quiz-progress span {
    animation: none;
  }

  .dl-quiz.is-sending .dl-quiz-progress span {
    width: 100% !important;
    transform: none;
  }
}

@keyframes quiz-step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 640px) {
  .dl-quiz {
    padding: 34px;
  }

  .dl-quiz-booking {
    margin-top: 28px;
    padding: 32px;
  }

  .dl-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dl-choice-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dl-step-actions {
    flex-direction: row;
    justify-content: space-between;
  }

  .dl-step-actions .dl-btn {
    width: auto;
    min-width: 150px;
  }

  .dl-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .dl-quiz-intro {
    padding-top: calc(var(--dl-header-h, 72px) + 80px);
    padding-bottom: 100px;
  }

  .dl-quiz {
    margin-top: -48px;
    padding: 42px;
  }

  .dl-quiz-calendar,
  .dl-quiz-calendar iframe {
    min-height: 760px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dl-quiz fieldset:not([hidden]) {
    animation: none;
  }

  .dl-quiz-progress span,
  .dl-choice span {
    transition: none;
  }
}
