/* ==========================================================================
   YAYA /ai — questionnaire + calendly overlay
   ========================================================================== */

.ov {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: none;
  flex-direction: column;
}
.ov.is-open { display: flex; }
.ov[hidden] { display: none; }

/* ---- overlay chrome ----------------------------------------------------- */
.ov__bar {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem max(var(--gut), env(safe-area-inset-right)) .8rem max(var(--gut), env(safe-area-inset-left));
  border-bottom: 1px solid rgba(0,0,0,.1);
  background: var(--paper);
}
.ov__bar .logo { width: 88px; color: var(--navy); }
.ov__x {
  appearance: none; border: 2px solid rgba(0,0,0,.16); background: transparent;
  width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  font-size: 1.35rem; line-height: 1; font-family: inherit; color: var(--ink);
  display: grid; place-items: center;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.ov__x:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.ov__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ov__inner {
  width: min(100% - (var(--gut) * 2), 780px);
  margin-inline: auto;
  padding-block: clamp(1.6rem, 5vw, 3.4rem) 2rem;
}

/* ---- progress ----------------------------------------------------------- */
.qz__prog { flex: none; height: 6px; background: rgba(42,67,140,.14); }
.qz__prog i { display: block; height: 100%; background: var(--navy); width: 0; transition: width .35s var(--ease); }
.qz__count {
  font-weight: 900; font-size: .95rem; letter-spacing: .06em;
  color: var(--navy); font-variant-numeric: tabular-nums;
  /* "1 / 12" is two European numbers around a neutral, which bidi resolves
     right-to-left inside the RTL page and renders as "12 / 1" */
  unicode-bidi: isolate;
}
.qz__eyebrow {
  font-weight: 900; font-size: .82rem; letter-spacing: .16em;
  color: var(--navy); text-transform: uppercase; display: block;
}

/* ---- steps -------------------------------------------------------------- */
.qz__step { display: none; }
.qz__step.is-on { display: block; animation: qzIn .3s var(--ease); }
@keyframes qzIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.qz__q { font-size: clamp(1.75rem, 4.6vw, 2.9rem); font-weight: 900; line-height: 1.08; margin-top: .9rem; }
.qz__help { font-weight: 300; margin-top: .85rem; line-height: 1.55; color: var(--ink-70); max-width: 58ch; }
.qz__hint { font-size: var(--t-small); font-weight: 700; color: var(--navy); margin-top: .7rem; }

/* ---- option cards ------------------------------------------------------- */
.qz__opts { display: grid; gap: .65rem; margin-top: 1.8rem; }
.qz__opt {
  display: flex; align-items: flex-start; gap: .9rem;
  padding: 1.05rem 1.15rem;
  /* 3:1 is the non-text contrast floor, and this border is the whole control */
  border: 2px solid rgba(0,0,0,.42);
  border-radius: var(--r-md);
  cursor: pointer;
  background: var(--paper);
  transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .15s var(--ease);
  text-align: start;
  min-height: 56px;
}
.qz__opt:hover { border-color: var(--navy); transform: translateY(-1px); }
.qz__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.qz__box {
  flex: none; width: 26px; height: 26px; margin-top: 1px;
  border: 2px solid rgba(0,0,0,.5);
  display: grid; place-items: center;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.qz__opt--single .qz__box { border-radius: 999px; }
.qz__opt--multi  .qz__box { border-radius: 7px; }
.qz__box::after {
  content: ''; width: 12px; height: 12px; border-radius: inherit;
  background: var(--paper); scale: 0; transition: scale .15s var(--ease);
}
.qz__opt--multi .qz__box::after {
  width: 13px; height: 9px; background: none; border-radius: 0;
  border-inline-start: 3px solid var(--paper); border-bottom: 3px solid var(--paper);
  rotate: -45deg; margin-top: -3px;
}
/* the muted note colour is 3.58:1 once the card turns aqua, so it darkens
   with the selected state rather than staying put */
.qz__opt.is-sel { border-color: var(--navy); background: var(--aqua); }
.qz__opt.is-sel .qz__note { color: rgba(0, 0, 0, .66); }
.qz__opt.is-sel .qz__box { background: var(--navy); border-color: var(--navy); }
.qz__opt.is-sel .qz__box::after { scale: 1; }
.qz__opt:focus-within { outline: 3px solid var(--navy); outline-offset: 3px; }

.qz__lab { font-weight: 700; line-height: 1.35; font-size: clamp(1.05rem, 1.5vw, 1.18rem); }
.qz__note { font-weight: 300; font-size: var(--t-small); color: var(--ink-55); margin-top: .2rem; line-height: 1.45; display: block; }

/* ---- open text ---------------------------------------------------------- */
.qz__ta, .qz__in {
  width: 100%;
  font-family: inherit; font-size: var(--t-body); font-weight: 300; line-height: 1.6;
  color: var(--ink);
  padding: 1rem 1.1rem;
  border: 2px solid rgba(0,0,0,.42);
  border-radius: var(--r-md);
  background: var(--paper);
  margin-top: 1.6rem;
  transition: border-color .15s var(--ease);
}
.qz__in { margin-top: .35rem; }
/* Chrome forces LTR editing on tel and email inputs, which left their values
   flush against the wrong edge while every other field sat flush right */
.qz__in[type="tel"], .qz__in[type="email"] { direction: ltr; text-align: right; }
.qz__in[type="tel"]::placeholder, .qz__in[type="email"]::placeholder { text-align: right; }
.qz__ta { min-height: 168px; resize: vertical; }
.qz__ta:focus, .qz__in:focus { border-color: var(--navy); }
.qz__ta::placeholder, .qz__in::placeholder { color: rgba(0, 0, 0, .55); }
.qz__len { font-size: var(--t-small); color: var(--ink-55); margin-top: .5rem; text-align: start; }

/* ---- scale -------------------------------------------------------------- */
.qz__scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: 1.8rem; }
.qz__sc {
  appearance: none; border: 2px solid rgba(0,0,0,.16); background: var(--paper);
  border-radius: var(--r-md); padding: 1.1rem .4rem; cursor: pointer;
  font-family: inherit; font-weight: 900; font-size: 1.3rem; color: var(--ink);
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
  min-height: 60px;
}
.qz__sc:hover { border-color: var(--navy); }
.qz__sc.is-sel { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.qz__scends { display: flex; justify-content: space-between; font-size: var(--t-small); color: var(--ink-55); margin-top: .55rem; }

/* ---- contact step ------------------------------------------------------- */
.qz__fields { display: grid; gap: 1.05rem; margin-top: 1.8rem; }
@media (min-width: 620px) { .qz__fields { grid-template-columns: 1fr 1fr; } .qz__f--wide { grid-column: 1 / -1; } }
.qz__f label { font-weight: 700; font-size: .95rem; display: block; }
.qz__err { color: #C0264B; font-weight: 700; font-size: var(--t-small); margin-top: .4rem; display: none; }
.qz__f.has-err .qz__in { border-color: #C0264B; }
.qz__f.has-err .qz__err { display: block; }
.qz__consent { font-size: var(--t-small); color: var(--ink-55); margin-top: 1.1rem; line-height: 1.55; }

/* ---- nav ---------------------------------------------------------------- */
.qz__nav {
  display: flex; gap: .7rem; align-items: center;
  margin-top: 2.2rem; padding-bottom: 1rem;
}
.qz__nav .btn--primary { min-width: 168px; }
.qz__back {
  appearance: none; background: none; border: none; cursor: pointer;
  font-family: inherit; font-weight: 700; color: var(--ink-55); font-size: .98rem;
  padding: .8rem .4rem; min-height: 44px;
}
.qz__back:hover { color: var(--ink); }
.btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }

/* ---- intro + success ---------------------------------------------------- */
.qz__introList { display: grid; gap: .75rem; margin-top: 1.6rem; }
.qz__introList li { display: flex; gap: .7rem; align-items: flex-start; font-weight: 300; line-height: 1.55; }
.qz__introList b { color: var(--navy); font-weight: 900; flex: none; }

.qz__done { text-align: center; padding-block: 1rem 0; }
.qz__done .h1 { margin-top: 1rem; }
.qz__cal {
  margin-top: 2rem; border: 2px solid rgba(0,0,0,.12); border-radius: var(--r-lg);
  overflow: hidden; background: var(--paper); min-height: 640px;
}
.qz__cal iframe { display: block; width: 100%; height: 700px; border: 0; }
.qz__fallback { font-size: var(--t-small); color: var(--ink-55); padding: .9rem 1rem 1.1rem; text-align: center; }
.qz__fallback a { color: var(--navy); font-weight: 700; }
@media (max-width: 640px) { .qz__cal iframe { height: 900px; } }

.qz__spin {
  width: 34px; height: 34px; border-radius: 999px;
  border: 3px solid rgba(42,67,140,.2); border-top-color: var(--navy);
  animation: spin .8s linear infinite; margin-inline: auto;
}
@keyframes spin { to { rotate: 360deg; } }

/* ---- calendly-only overlay ---------------------------------------------- */
.cal__wrap { width: min(100% - (var(--gut) * 2), 980px); margin-inline: auto; padding-block: 1.5rem 2rem; }
.cal__wrap iframe { display: block; width: 100%; height: min(78vh, 820px); min-height: 620px; border: 0; border-radius: var(--r-lg); }
.cal__wrap .qz__fallback { padding-top: 1rem; }

/* ---- conditional follow-up under an open question ----------------------- */
.qz__fu { margin-top: 1.4rem; border-inline-start: 3px solid var(--lime); padding-inline-start: 1.1rem; }
.qz__fu[hidden] { display: none; }
.qz__fuq { font-weight: 700; line-height: 1.4; }
.qz__fu .qz__ta { margin-top: .7rem; min-height: 104px; }
/* the heading takes focus on each step so the question is announced first;
   it is not an interactive control, so it gets no focus ring */
.qz__q:focus { outline: none; }
.qz__q:focus-visible { outline: 3px solid var(--navy); outline-offset: 6px; }

/* an optional one-liner under a choice question, for the context no option
   list can hold */
.qz__extra { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px dashed rgba(0,0,0,.16); }
.qz__extra label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .1rem; }
