/* ============================================================
   The Gate Doctor - Instant Estimate Tool
   ============================================================ */

.est-body { background: var(--muted-bg); }

/* ---------- Header ---------- */
.est-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
}
.est-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 76px;
}
.est-header .brand__logo { height: 56px; width: auto; }
.est-header__contact { display: flex; align-items: center; gap: 22px; }
.est-header__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; color: var(--gray-700);
}
.est-header__link:hover { color: var(--red); }
.est-header__link strong { font-family: var(--font-head); color: var(--ink); }
.est-header__link .ic { color: var(--red); }

/* ---------- Layout ---------- */
.est { padding: 40px 0 72px; }
.est__container { max-width: 820px; }

.est__intro { text-align: center; margin-bottom: 26px; }
.est__title { font-size: clamp(28px, 4.4vw, 40px); font-weight: 800; margin: 10px 0 12px; }
.est__subtitle { color: var(--gray-500); font-size: 17px; max-width: 620px; margin: 0 auto; }

/* ---------- Card ---------- */
.est__card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 14px 14px 36px; overflow: hidden;
}
.est__progress {
  height: 8px; border-radius: 999px; background: var(--gray-100);
  overflow: hidden; margin: 8px 8px 0;
}
.est__progress-bar {
  display: block; height: 100%; width: 12.5%; border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}
.est__meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 4px;
}
.est__back {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none;
  cursor: pointer; color: var(--gray-500); font-family: var(--font-head); font-weight: 700;
  font-size: 14px; padding: 6px 4px; transition: color .15s ease;
}
.est__back:hover { color: var(--red); }
.est__back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.est__back[hidden] { visibility: hidden; }
.est__step-count { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--gray-500); letter-spacing: .02em; }

.est__progress[hidden], .est__meta[hidden] { display: none; }

.est__step { padding: 12px 28px 0; }

/* ---------- Welcome / landing ---------- */
.est-welcome { text-align: center; padding: 26px 12px 18px; }
.est-welcome__title { font-size: clamp(27px, 4.2vw, 40px); font-weight: 800; margin: 10px 0 14px; }
.est-welcome__text { color: var(--gray-500); font-size: 17px; max-width: 560px; margin: 0 auto 26px; }
.est-welcome__list {
  list-style: none; margin: 0 auto 30px; padding: 0;
  display: inline-flex; flex-direction: column; gap: 13px; text-align: left;
}
.est-welcome__list li {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-weight: 600; font-size: 15.5px; color: var(--ink);
}
.est-welcome__list svg {
  width: 24px; height: 24px; flex: none; padding: 5px; border-radius: 50%;
  background: var(--red-soft); fill: none; stroke: var(--red);
  stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.est-welcome .btn,
.est-welcome__cta button { min-width: 260px; }
.est-welcome__cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0 18px;
  min-height: 56px;
}
.est-welcome__note { color: var(--gray-500); font-size: 14px; margin: 0; }
.est-welcome__note a { color: var(--red); font-weight: 600; }

/* fade/slide transition */
.est__step.is-leaving { opacity: 0; transform: translateY(8px); }
.est__step { transition: opacity .25s ease, transform .25s ease; }

.est-q { font-size: clamp(21px, 3vw, 27px); font-weight: 800; margin-bottom: 6px; }
.est-help { color: var(--gray-500); font-size: 15px; margin: 0 0 22px; max-width: 560px; }
.est-q + .est-options, .est-q + .est-form { margin-top: 22px; }

/* ---------- Option buttons ---------- */
.est-options { display: grid; gap: 12px; }
.est-options--two { grid-template-columns: repeat(2, 1fr); }

.est-option {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 18px 20px; cursor: pointer; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease, background .15s ease;
}
.est-option:hover { border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-2px); }
.est-option.is-selected { border-color: var(--red); background: var(--red-soft); }
.est-option__icon {
  flex: none; width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-soft); color: var(--red);
}
.est-option__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.est-option__text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.est-option__title { font-family: var(--font-head); font-weight: 700; font-size: 16.5px; color: var(--ink); }
.est-option__desc { font-size: 13.5px; color: var(--gray-500); }
.est-option__arrow {
  flex: none; color: var(--gray-300); font-size: 20px; font-weight: 700;
  transition: color .15s ease, transform .15s ease;
}
.est-option:hover .est-option__arrow { color: var(--red); transform: translateX(3px); }

/* ---------- Forms ---------- */
.est-form { display: grid; gap: 18px; }
.est-field { display: flex; flex-direction: column; gap: 7px; }
.est-field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.est-label { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--ink); }
.est-input {
  width: 100%; font-family: inherit; font-size: 15.5px; color: var(--ink);
  padding: 14px 16px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.est-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.est-input::placeholder { color: var(--gray-300); }

.est-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.est-radio {
  position: relative; flex: 1 1 auto; min-width: 90px;
}
.est-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.est-radio span {
  display: block; text-align: center; padding: 12px 14px; cursor: pointer;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--gray-700);
  transition: all .15s ease;
}
.est-radio input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red); }

.est-check {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; color: var(--gray-700); line-height: 1.5; cursor: pointer;
  background: var(--gray-100); border-radius: var(--radius-sm); padding: 14px 16px;
}
.est-check input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--red); cursor: pointer; }

.est-error { color: var(--red); font-size: 13.5px; font-weight: 600; margin: 4px 0 0; min-height: 18px; }

.est-actions { margin-top: 26px; display: flex; }
.est-actions .btn { width: 100%; }

/* ---------- Disqualify ---------- */
.est-final { text-align: center; padding: 10px 6px 4px; }
.est-final__icon {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.est-final__icon svg { width: 32px; height: 32px; }
.est-dq .est-final__icon { background: #fef3e7; color: #b45309; }
.est-dq .est-final__icon svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.est-final__title { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin-bottom: 12px; }
.est-final__text { color: var(--gray-500); font-size: 15.5px; max-width: 540px; margin: 0 auto 26px; }
.est-final__actions { display: flex; flex-direction: column; gap: 12px; max-width: 380px; margin: 0 auto; }

/* ---------- Results ---------- */
.est-result__icon { background: #eaf6ef; color: #15803d; }
.est-result__icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.est-result__panel {
  background: linear-gradient(135deg, var(--charcoal), var(--black));
  color: #fff; border-radius: var(--radius-lg); padding: 30px 28px; margin: 4px 0 22px;
  text-align: left;
}
.est-result__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.est-result__row:last-child { border-bottom: 0; }
.est-result__row dt { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); font-family: var(--font-head); font-weight: 700; }
.est-result__row dd { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 16px; text-align: right; }
.est-result__range { color: #fff; }
.est-result__range strong { font-size: 26px; color: var(--red); display: block; }
.est-result__note {
  background: var(--red-soft); color: var(--red-dark); border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 14px; font-weight: 600; margin: 0 auto 20px; max-width: 600px; text-align: left;
}
.est-result__disclaimer { font-size: 12.5px; color: var(--gray-500); max-width: 600px; margin: 18px auto 24px; line-height: 1.55; }
.est-result__actions { display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin: 0 auto 28px; }
.est-result__trust {
  list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--gray-200);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
}
.est-result__trust li { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--gray-700); }
.est-result__trust svg { width: 16px; height: 16px; fill: none; stroke: #15803d; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Trust strip below card ---------- */
.est__trust {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
}
.est__trust li { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--gray-700); }
.est__trust svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--red); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .est-header__contact .est-header__link span { display: none; }
  .est-header__contact { gap: 10px; }
  .est-header__contact .est-header__link {
    width: 42px; height: 42px; justify-content: center; border-radius: 50%;
    background: var(--red-soft);
  }
  .est__step { padding: 12px 18px 0; }
  .est-options--two { grid-template-columns: 1fr; }
  .est-field--row { grid-template-columns: 1fr; }
  .est-option { padding: 16px; gap: 13px; }
  .est-option__icon { width: 42px; height: 42px; }
}
