/*
 lvi/quiz
 One white card (always a light surface, whatever band it sits in): progress
 row, a question step with option rows, Back / Next. Full mode wraps it in a
 cream band with an eyebrow, the page H1 and a footnote, 640px wide, and adds
 the lead form step. Steps are server-rendered; script.js toggles `hidden`.
========================================================================== */
:root .lvi-quiz {
  font-family: var(--wp--preset--font-family--primary);
  /*
   Card
  ---------------------------------------------------------------- */
}
:root .lvi-quiz__card {
  --lvi-heading: var(--wp--preset--color--deep-teal);
  --lvi-text: var(--wp--preset--color--slate);
  --lvi-text-strong: var(--wp--preset--color--ink);
  --lvi-intro: var(--wp--preset--color--slate);
  --lvi-eyebrow: var(--wp--preset--color--teal);
  --lvi-accent: var(--wp--preset--color--teal);
  --lvi-link: var(--wp--preset--color--teal);
  --lvi-link-hover: var(--wp--preset--color--teal-hover);
  --lvi-fine: var(--wp--preset--color--muted);
  --lvi-label: var(--wp--preset--color--muted);
  --lvi-rule: rgba(0, 51, 54, 0.12);
  --lvi-rule-soft: rgba(0, 51, 54, 0.08);
  --lvi-surface: var(--wp--preset--color--white);
  --lvi-surface-alt: var(--wp--preset--color--cream-2);
  --lvi-rule-hover: var(--wp--preset--color--teal);
  --lvi-scroll-thumb: var(--wp--preset--color--deep-teal);
  --lvi-scroll-track: rgba(0, 51, 54, 0.12);
  --lvi-chip-bg: var(--wp--preset--color--mint);
  --lvi-chip-fg: var(--wp--preset--color--teal);
  --lvi-badge-bg: var(--wp--preset--color--lime);
  --lvi-badge-fg: var(--wp--preset--color--deep-teal);
  --lvi-btn-bg: var(--wp--preset--color--deep-teal);
  --lvi-btn-fg: var(--wp--preset--color--cream);
  --lvi-btn-hover: var(--wp--preset--color--lime);
  --lvi-btn-hover-fg: var(--wp--preset--color--deep-teal);
  --lvi-outline-fg: var(--wp--preset--color--deep-teal);
  --lvi-outline-border: rgba(0, 51, 54, 0.25);
  --lvi-outline-hover-bg: var(--wp--preset--color--deep-teal);
  --lvi-outline-hover-fg: var(--wp--preset--color--cream);
  --lvi-outline-border-hover: var(--wp--preset--color--deep-teal);
  color: var(--lvi-text);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 36px;
  background: var(--wp--preset--color--white);
  border: 1px solid var(--lvi-rule-soft);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 51, 54, 0.06);
}
@media screen and (max-width: 575px) {
  :root .lvi-quiz__card {
    padding: 24px 20px;
  }
}
:root .lvi-quiz__step {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
:root .lvi-quiz__step[hidden] {
  display: none;
}
:root .lvi-quiz {
  /*
   Progress
  ---------------------------------------------------------------- */
}
:root .lvi-quiz__progress {
  margin-bottom: 26px;
}
:root .lvi-quiz__progress-label {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--lvi-label);
}
:root .lvi-quiz__bar {
  height: 6px;
  border-radius: var(--wp--custom--border--radius-button);
  background: var(--wp--preset--color--mint-2);
  overflow: hidden;
}
:root .lvi-quiz__bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--wp--preset--color--lime);
  transition: width 0.35s ease;
}
:root .lvi-quiz {
  /*
   Question
  ---------------------------------------------------------------- */
}
:root .lvi-quiz__question {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--lvi-heading);
}
:root .lvi-quiz__question:focus, :root .lvi-quiz__question:focus-visible {
  outline: none;
}
:root .lvi-quiz__hint {
  margin: 8px 0 0;
  font-family: var(--wp--preset--font-family--secondary);
  font-size: 16px;
  line-height: 1.55;
  color: var(--lvi-label);
}
:root .lvi-quiz__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
:root .lvi-quiz__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border: 1.5px solid rgba(0, 51, 54, 0.14);
  border-radius: var(--wp--custom--border--radius-field);
  background: var(--wp--preset--color--white);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--lvi-text-strong);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
:root .lvi-quiz__option:hover {
  border-color: rgba(0, 51, 54, 0.3);
}
:root .lvi-quiz__option:has(.lvi-quiz__input:checked) {
  border-color: var(--lvi-accent);
  background: #F2FBF3;
  font-weight: 600;
  color: var(--lvi-heading);
}
:root .lvi-quiz__option:has(.lvi-quiz__input:checked) .lvi-quiz__dot {
  border: 6px solid var(--wp--preset--color--lime);
  background: var(--lvi-heading);
}
:root .lvi-quiz__option:has(.lvi-quiz__input:focus-visible) {
  outline: 2px solid var(--wp--custom--color--focus);
  outline-offset: 2px;
}
:root .lvi-quiz__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
:root .lvi-quiz__dot {
  flex: none;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(0, 51, 54, 0.25);
  background: transparent;
  transition: border 0.15s ease, background-color 0.15s ease;
}
:root .lvi-quiz {
  /*
   Back / Next
  ---------------------------------------------------------------- */
}
:root .lvi-quiz__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 24px;
}
:root .lvi-quiz__nav[hidden] {
  display: none;
}
:root .lvi-quiz__next {
  margin-left: auto;
  font-size: 16px;
  padding: 13px 26px;
}
:root .lvi-quiz__next[hidden] {
  display: none;
}
:root .lvi-quiz__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-family: var(--wp--preset--font-family--primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--lvi-link);
  background: none;
}
:root .lvi-quiz__back svg {
  flex: none;
  width: 16px;
  height: 16px;
}
:root .lvi-quiz__back:hover, :root .lvi-quiz__back:focus-visible {
  color: var(--lvi-link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
:root .lvi-quiz__back[hidden] {
  display: none;
}
:root .lvi-quiz {
  /*
   Lead form step
  ---------------------------------------------------------------- */
}
:root .lvi-quiz__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
@media screen and (max-width: 575px) {
  :root .lvi-quiz__fields {
    grid-template-columns: 1fr;
  }
}
:root .lvi-quiz__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: 1/-1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lvi-text);
}
:root .lvi-quiz__field--half {
  grid-column: auto;
}
@media screen and (max-width: 575px) {
  :root .lvi-quiz__field--half {
    grid-column: 1/-1;
  }
}
:root .lvi-quiz__field input {
  width: 100%;
  min-height: 0;
  padding: 12px 16px;
  font-family: var(--wp--preset--font-family--primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--lvi-text-strong);
  background: var(--wp--preset--color--white);
  border: 1px solid var(--lvi-outline-border);
  border-radius: var(--wp--custom--border--radius-field);
  transition: border-color 0.15s ease;
}
:root .lvi-quiz__field input:focus-visible {
  outline: none;
  border-color: var(--lvi-accent);
  box-shadow: 0 0 0 1px var(--lvi-accent);
}
:root .lvi-quiz__field input[aria-invalid=true] {
  border-color: #C0392B;
}
:root .lvi-quiz__req {
  color: #C0392B;
}
:root .lvi-quiz__error {
  font-size: 13px;
  font-weight: 500;
  color: #C0392B;
}
:root .lvi-quiz__error[hidden] {
  display: none;
}
:root .lvi-quiz__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--lvi-text);
  cursor: pointer;
}
:root .lvi-quiz__check input {
  flex: none;
  appearance: none;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  margin: -1px 0 0;
  border: 1px solid var(--lvi-outline-border);
  border-radius: 6px;
  background: var(--wp--preset--color--white);
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
:root .lvi-quiz__check input:hover {
  border-color: var(--lvi-outline-border-hover);
  box-shadow: none;
}
:root .lvi-quiz__check input:focus-visible {
  outline: 2px solid var(--wp--custom--color--focus);
  outline-offset: 2px;
}
:root .lvi-quiz__check input:checked {
  border-color: var(--lvi-heading);
  background-color: var(--lvi-heading);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239EF05E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
}
:root .lvi-quiz__consent {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--lvi-label);
}
:root .lvi-quiz__submit {
  margin-top: 20px;
  padding: 15px 28px;
  font-size: 16px;
}
:root .lvi-quiz__submit.is-sending {
  opacity: 1;
  background-color: var(--wp--preset--color--lime-hover);
}
:root .lvi-quiz__submit.is-sending .lvi-quiz__submit-arrow {
  display: none;
}
:root .lvi-quiz__submit.is-sending .lvi-quiz__spinner {
  display: inline-block;
}
:root .lvi-quiz__submit-arrow {
  display: inline-flex;
}
:root .lvi-quiz__submit-arrow svg {
  width: 17px;
  height: 17px;
}
:root .lvi-quiz__spinner {
  display: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 51, 54, 0.2);
  border-top-color: var(--lvi-heading);
  animation: lvi-quiz-spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  :root .lvi-quiz__spinner {
    animation-duration: 2s;
  }
}
:root .lvi-quiz {
  /*
   Full mode: cream band, 640px column, page H1, footnote
  ---------------------------------------------------------------- */
}
:root .lvi-quiz--full {
  background: var(--wp--preset--color--cream-2);
  padding: 56px var(--wp--custom--spacing--outer-x) 72px;
}
:root .lvi-quiz--full .lvi-quiz__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}
:root .lvi-quiz--full .lvi-quiz__header {
  text-align: center;
}
:root .lvi-quiz--full .lvi-quiz__eyebrow {
  margin: 0 0 12px;
}
:root .lvi-quiz--full .lvi-quiz__title {
  margin: 0;
  font-size: clamp(30px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
@media screen and (min-width: 576px) {
  :root .lvi-quiz--full .lvi-quiz__card {
    min-height: 480px;
  }
}
:root .lvi-quiz--full .lvi-quiz__question {
  font-size: 26px;
  line-height: 1.2;
}
:root .lvi-quiz--full .lvi-quiz__option {
  padding: 16px 20px;
  font-size: 17px;
}
:root .lvi-quiz--full .lvi-quiz__footnote {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--lvi-label);
}
:root .lvi-quiz {
  /*
   Editor-only notes
  ---------------------------------------------------------------- */
}
:root .lvi-quiz__note {
  margin: 12px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--lvi-label);
}
:root .lvi-quiz--full .lvi-quiz__note {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

@keyframes lvi-quiz-spin {
  to {
    transform: rotate(360deg);
  }
}
/*
 Teaser patterns on tablets: core Columns stay side by side down to 782px, where a
 50 / 50 split with the 72px gutter squeezes the card. The card's column gets the room.
========================================================================== */
@media (782px <= width <= 1099px) {
  :root .wp-block-columns:has(> .wp-block-column > .wp-block-lvi-quiz) {
    gap: 32px;
  }
  :root .wp-block-columns:has(> .wp-block-column > .wp-block-lvi-quiz) > .wp-block-column:has(> .wp-block-lvi-quiz) {
    flex-basis: 56% !important;
  }
  :root .wp-block-columns:has(> .wp-block-column > .wp-block-lvi-quiz) > .wp-block-column:not(:has(> .wp-block-lvi-quiz)) {
    flex-basis: 44% !important;
  }
}
