/* Trailway Growth — qualification flow
   Palette discipline: moss is the action colour and it is spent ONCE per screen,
   on "Book the call". The Terrain Report box is bone + hairline on purpose — the
   palette is what keeps booking primary, not the copy. No glow, no gradients.
   Type discipline: Overpass Mono carries every label, count and marker name
   (the readouts). Inter carries every human sentence. */

.qualify-page {
  background: var(--tw-paper);
  color: var(--tw-dark);
  font-family: var(--font-sans);
  min-height: 100vh;
  margin: 0;
}

/* ---------------- progress ---------------- */
.qz-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--tw-line); z-index: 40;
}
.qz-progress-fill {
  display: block; height: 100%; width: 0;
  background: var(--tw-moss);
  transition: width .34s cubic-bezier(.22,.61,.36,1);
}

/* ---------------- top bar ---------------- */
.qz-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px clamp(16px, 4vw, 40px);
}
.qz-top-back {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--tr-label);
  text-transform: uppercase; text-decoration: none;
  color: var(--tw-dark-55);
}
.qz-top-back:hover { color: var(--tw-dark); }

/* ---------------- stage ---------------- */
.qz-stage { padding: clamp(16px, 4vw, 48px) clamp(16px, 4vw, 40px) 96px; }
.qz-shell { max-width: 640px; margin: 0 auto; transition: max-width .3s cubic-bezier(.22,.61,.36,1); }
/* The result carries the calendar and the full-width Terrain Report card, which
   is the homepage's tr-cta and needs the homepage's width or its mock wraps
   under the copy. Questions stay in the narrow reading column. */
.qz-on-result .qz-shell { max-width: 1024px; }
@media (prefers-reduced-motion: reduce) { .qz-shell { transition: none; } }
.qz-result { max-width: 100%; }

.qz-in  { animation: qzIn .28s cubic-bezier(.22,.61,.36,1) both; }
@keyframes qzIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .qz-in { animation: none; }
  .qz-progress-fill { transition: none; }
}

/* the eyebrow above the position name. Its rule used to live with the question
   screens, which moved to the homepage card — it is still used here. */
.qz-count {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--tw-dark-55);
  margin-bottom: 12px;
}

/* ---------------- result: position ---------------- */
.qz-pos-name {
  font-size: clamp(28px, 6vw, var(--fs-display));
  line-height: var(--lh-display); letter-spacing: var(--tr-display);
  font-weight: var(--fw-medium);
  margin: 0 0 28px;
}
.qz-constraint {
  font-size: var(--fs-lead); line-height: var(--lh-lead);
  margin: 28px 0 0; max-width: 60ch;
}
.qz-benchmark {
  font-family: var(--font-mono);
  font-size: var(--fs-mono); letter-spacing: var(--tr-mono);
  color: var(--tw-dark-55);
  margin: 12px 0 0;
}

/* ---------------- the trail ---------------- */
.qz-trail { position: relative; padding: 8px 0 4px; max-width: 640px; }
.qz-trail-line {
  position: absolute; left: 7px; right: 7px; top: 15px; height: 1px;
  background: var(--tw-dark-35);
}
.qz-trail-marks {
  position: relative; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.qz-mark { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.qz-mark-dot {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--tw-paper);
  border: 1px solid var(--tw-dark-35);
  box-sizing: border-box;
}
.qz-mark-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--tw-dark-45);
  line-height: 1.3;
}
.qz-mark.is-here .qz-mark-dot { background: var(--tw-moss); border-color: var(--tw-moss); }
.qz-mark.is-here .qz-mark-label { color: var(--tw-dark); }
.qz-mark-you {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--tw-moss);
}

/* ---------------- booking (primary) ---------------- */
.qz-book { margin-top: 40px; }
.qz-book-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--tw-dark-55);
}
.qz-book-sub {
  font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--tw-dark-70); margin: 8px 0 16px; max-width: 62ch;
}
.qz-cal {
  border: 1px solid var(--tw-line); border-radius: 4px;
  background: var(--tw-white); overflow: hidden;
}

/* ---------------- Terrain Report (alternate, never a gate) ----------------
   The card itself reuses the homepage's tr-* classes from styles.css so the two
   are identical by construction; only its placement is styled here. It stays a
   box BELOW the calendar — never a modal, never an interstitial. */
.qz-report { margin-top: 32px; max-width: 1024px; }

/* ---------------- disqualified ---------------- */
.qz-stop {
  margin-top: 36px;
  background: var(--tw-white);
  border: 1px solid var(--tw-line);
  border-left: 3px solid var(--tw-dark);
  border-radius: 4px;
  padding: clamp(20px, 4vw, 32px);
  max-width: 720px;
}
.qz-stop-head {
  font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--tr-h3);
  font-weight: var(--fw-medium);
}
.qz-stop-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--tw-dark-55);
  margin-top: 20px;
}
.qz-stop-body {
  font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--tw-dark-70); margin: 10px 0 0; max-width: 62ch;
}
.qz-stop-foot { color: var(--tw-dark-55); }

/* ---------------- save your read ---------------- */
.qz-save {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--tw-line);
  max-width: 720px;
}
.qz-save-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--tw-dark-55);
}
.qz-save-sub {
  font-size: var(--fs-small); line-height: var(--lh-small);
  color: var(--tw-dark-65); margin: 8px 0 12px;
}
.qz-save-row { display: flex; gap: 8px; flex-wrap: wrap; max-width: 420px; }
.qz-save-row.is-done { opacity: .55; pointer-events: none; }
.qz-save-input {
  flex: 1 1 200px; min-width: 0;
  font-family: var(--font-sans); font-size: var(--fs-body);
  color: var(--tw-dark);
  background: var(--tw-white);
  border: 1px solid var(--tw-line); border-radius: 4px;
  padding: 11px 13px;
}
.qz-save-input:focus-visible { outline: 2px solid var(--tw-moss); outline-offset: 1px; }
.qz-save-msg {
  font-family: var(--font-mono); font-size: var(--fs-mono);
  color: var(--tw-moss); margin-top: 10px;
}
.qz-save-msg.is-err { color: var(--tw-sales); }
.qz-hidden { display: none; }

/* ---------------- back ---------------- */
.qz-back {
  position: fixed; left: clamp(16px, 4vw, 40px); bottom: 20px;
  appearance: none; cursor: pointer; background: transparent; border: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--tr-label);
  text-transform: uppercase; color: var(--tw-dark-55);
}
.qz-back:hover { color: var(--tw-dark); }

/* ---------------- noscript ---------------- */
.qz-noscript h1 { font-size: var(--fs-h1); letter-spacing: var(--tr-h1); margin: 0 0 12px; }
.qz-noscript p { font-size: var(--fs-body); line-height: var(--lh-body); }

/* ---------------- mobile ---------------- */
@media (max-width: 560px) {
  .qz-trail-marks { grid-template-columns: repeat(2, 1fr); gap: 18px 8px; }
  .qz-trail-line { display: none; }
  .qz-cal { height: 640px; }
  .qz-back { position: static; margin: 24px clamp(16px, 4vw, 40px) 32px; display: block; }
}

/* The calendar's height is reserved up front so nothing shifts when Calendly
   swaps in. The skeleton is removed on the iframe's load event — it used to be
   left on screen permanently. */
.qz-cal { position: relative; }
.qz-cal-wait {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px;
}
.qz-cal-wait-t {
  font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: var(--tr-mono); color: var(--tw-dark-45);
}
/* a month grid's worth of blocks, breathing — says "a calendar is coming" */
.qz-cal-skel { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; width: min(320px, 80%); }
.qz-cal-skel span {
  display: block; height: 22px; border-radius: 3px;
  background: var(--tw-line);
  animation: qzPulse 1.4s ease-in-out infinite;
}
.qz-cal-skel span:nth-child(7n+2) { animation-delay: .12s; }
.qz-cal-skel span:nth-child(7n+4) { animation-delay: .24s; }
.qz-cal-skel span:nth-child(7n+6) { animation-delay: .36s; }
@keyframes qzPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qz-cal-skel span { animation: none; } }
