/* ============================================================
   Health & Wellness Program Builder — quiz + result tool
   Continues the sage/teal accent introduced on fitness.html
   ============================================================ */

.wellness-tool {
  --wt-sage: #7fae8f;
  --wt-sage-bright: #9bcaab;
  --wt-sage-tint: rgba(127, 174, 143, 0.1);
  --wt-danger: #d9756a;
}

.wt-hero {
  padding: clamp(3rem, 8vh, 5rem) 0 clamp(2rem, 5vh, 3rem);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}
.wt-hero__inner { max-width: 46rem; }

.wt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wt-sage-bright);
  margin-bottom: 1rem;
}

.wt-hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 1.1rem;
  color: var(--color-text);
}
.wt-hero h1 em { font-style: italic; color: var(--wt-sage-bright); }

.wt-hero__lede {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 40rem;
  margin: 0 0 1.5rem;
}

.wt-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.wt-hero__chips span {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* ---------- Quiz shell ---------- */
.wt-quiz-wrap { padding: 0 0 clamp(3.5rem, 8vh, 5.5rem); }

.wt-quiz {
  max-width: 40rem;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.wt-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--color-surface-offset);
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.wt-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--wt-sage), var(--wt-sage-bright));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.wt-progress__label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: 0 0 1.6rem;
}

.wt-question {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.wt-question legend {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 1.1rem;
  padding: 0;
  line-height: 1.4;
}
.wt-question .wt-optional {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text-faint);
}

@keyframes wt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.wt-question--shake { animation: wt-shake 0.35s ease; }

.wt-options {
  display: grid;
  gap: 0.65rem;
}
.wt-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.wt-option:hover { border-color: var(--wt-sage); }
.wt-option input {
  margin-top: 0.15rem;
  accent-color: var(--wt-sage-bright);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.wt-option:has(input:checked) {
  border-color: var(--wt-sage-bright);
  background: var(--wt-sage-tint);
  color: var(--color-text);
}
.wt-option span { flex: 1; }

.wt-quiz__nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.8rem;
}
.wt-quiz__nav .btn--primary { margin-left: auto; }

/* ---------- Result ---------- */
.wt-result {
  max-width: 46rem;
  margin: 0 auto;
}

.wt-result__top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.3rem;
}
.wt-result__badge {
  flex: 1;
  min-width: 180px;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: var(--wt-sage-tint);
  border: 1px solid rgba(127, 174, 143, 0.3);
}
.wt-result__badge-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wt-sage-bright);
  margin-bottom: 0.3rem;
}
.wt-result__badge-value {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text);
}

.wt-result__summary {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin: 0 0 1.8rem;
}

.wt-plan {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.wt-plan__card {
  padding: 1.2rem 1.3rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.wt-plan__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--wt-sage-tint);
  color: var(--wt-sage-bright);
  margin-bottom: 0.7rem;
}
.wt-plan__card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.4rem;
}
.wt-plan__card p {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Lead capture ---------- */
.wt-capture {
  padding: 1.8rem;
  border-radius: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.wt-capture h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}
.wt-capture p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 1.3rem;
  line-height: 1.6;
}

.wt-field { margin-bottom: 1rem; }
.wt-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}
.wt-optional { font-weight: 400; color: var(--color-text-faint); }
.wt-field input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: 0.92rem;
  font-family: inherit;
}
.wt-field input:focus {
  outline: none;
  border-color: var(--wt-sage-bright);
  box-shadow: 0 0 0 3px var(--wt-sage-tint);
}
.wt-error {
  display: block;
  min-height: 1.1em;
  font-size: 0.78rem;
  color: var(--wt-danger);
  margin-top: 0.35rem;
}

/* ---------- Returning visitor banner ---------- */
.wt-returning {
  max-width: 40rem;
  margin: 0 auto 1.5rem;
  padding: 1.1rem 1.4rem;
  border-radius: 14px;
  background: var(--wt-sage-tint);
  border: 1px solid rgba(127, 174, 143, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wt-returning[hidden] { display: none; }
.wt-returning p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text);
}
.wt-returning p strong { color: var(--wt-sage-bright); }
.wt-returning__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ---------- Progress tracker ---------- */
.wt-tracker {
  padding: 1.6rem 1.8rem;
  border-radius: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}
.wt-tracker__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.3rem;
}
.wt-tracker__head h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.35rem;
}
.wt-tracker__head p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
  max-width: 30rem;
  line-height: 1.55;
}
.wt-tracker__streak {
  flex-shrink: 0;
  text-align: center;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  background: var(--wt-sage-tint);
  border: 1px solid rgba(127, 174, 143, 0.3);
  min-width: 88px;
}
.wt-tracker__streak-num {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  color: var(--wt-sage-bright);
}
.wt-tracker__streak-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-top: 0.3rem;
}

.wt-tracker__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.3rem;
}
.wt-day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.3rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  cursor: pointer;
  font-family: inherit;
  color: var(--color-text-muted);
}
.wt-day-pill__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wt-day-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}
.wt-day-pill--done .wt-day-pill__dot { background: var(--wt-sage-bright); }
.wt-day-pill--partial .wt-day-pill__dot { background: var(--wt-sage); opacity: 0.6; }
.wt-day-pill--today { border-color: var(--wt-sage-bright); }
.wt-day-pill--selected { background: var(--wt-sage-tint); border-color: var(--wt-sage-bright); color: var(--color-text); }
.wt-day-pill--future { opacity: 0.4; cursor: not-allowed; }

.wt-tracker__day {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
}
.wt-tracker__day-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: 0 0 0.75rem;
}
.wt-tracker__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.wt-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.wt-check__box {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  border: 1.5px solid var(--color-text-faint);
  flex-shrink: 0;
  position: relative;
}
.wt-check--active {
  border-color: var(--wt-sage-bright);
  background: var(--wt-sage-tint);
  color: var(--color-text);
}
.wt-check--active .wt-check__box {
  border-color: var(--wt-sage-bright);
  background: var(--wt-sage-bright);
}
.wt-check--active .wt-check__box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--color-surface);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.wt-tracker__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wt-tracker__foot p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-faint);
}
.wt-tracker__clear {
  background: none;
  border: none;
  color: var(--color-text-faint);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.2rem;
}
.wt-tracker__clear:hover { color: var(--wt-danger); }

/* ---------- Success ---------- */
.wt-success {
  text-align: center;
  padding: 2.2rem 1.5rem;
  border-radius: 18px;
  background: var(--wt-sage-tint);
  border: 1px solid rgba(127, 174, 143, 0.3);
}
.wt-success__ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--wt-sage);
  color: var(--color-text-inverse);
  margin-bottom: 1rem;
}
.wt-success h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}
.wt-success p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin: 0 0 1.4rem;
}
.wt-success__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.wt-restart {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1.4rem auto 0;
  background: none;
  border: none;
  color: var(--color-text-faint);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.4rem;
}
.wt-restart:hover { color: var(--wt-sage-bright); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .wt-plan { grid-template-columns: 1fr; }
  .wt-result__badge { min-width: 140px; }
  .wt-quiz { padding: 1.4rem; border-radius: 16px; }
  .wt-quiz__nav { flex-direction: column-reverse; }
  .wt-quiz__nav .btn--primary,
  .wt-quiz__nav .btn--ghost { width: 100%; justify-content: center; margin-left: 0; }
  .wt-tracker { padding: 1.3rem 1.1rem; }
  .wt-tracker__head { flex-direction: column; }
  .wt-tracker__streak { align-self: flex-start; }
  .wt-tracker__week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.3rem; }
  .wt-day-pill { padding: 0.45rem 0.15rem; }
  .wt-day-pill__label { font-size: 0.58rem; }
  .wt-tracker__checks { flex-direction: column; align-items: stretch; }
  .wt-check { justify-content: flex-start; }
  .wt-tracker__foot { flex-direction: column; align-items: flex-start; }
  .wt-returning { flex-direction: column; align-items: flex-start; }
  .wt-returning__actions { width: 100%; }
  .wt-returning__actions .btn { flex: 1; justify-content: center; }
}
