/* Health Exchange Group quote funnel. Loaded only by /auto-insurance/ pages. */

.funnel-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.funnel-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; }
.funnel-head .secure-note { display: inline-flex; align-items: center; gap: .45rem; font-size: var(--text-xs); color: var(--muted); font-weight: 500; }
.funnel-head .secure-note svg { width: 15px; height: 15px; color: var(--green); }

.funnel-hero { background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%); padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 4rem); }
.funnel-hero .intro { text-align: center; max-width: 640px; margin: 0 auto 1.75rem; }
.funnel-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem); margin-bottom: .4rem; }
.funnel-hero .intro p { color: var(--ink-soft); margin: 0; }

/* Wizard card */
.qg { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 30px 60px -40px rgba(23, 46, 114, .45); overflow: hidden; max-width: 720px; margin: 0 auto; }
.qg__head { background: var(--royal-deep); color: #e8ecf7; padding: 1rem 1.5rem 1.15rem; }
.qg__head-row { display: flex; justify-content: space-between; align-items: center; font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: #c3cbe2; }
.qg__head-row strong { color: #fff; }
.qg__title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: #fff; display: flex; align-items: center; gap: .5rem; margin: .4rem 0 .8rem; }
.qg__title svg { width: 17px; height: 17px; color: var(--green-light); flex: none; }
.qg__progress { height: 6px; background: rgba(255,255,255,.16); border-radius: 999px; overflow: hidden; }
.qg__progress > span { display: block; height: 100%; width: 7%; background: var(--green-grad); border-radius: 999px; transition: width .35s ease; }

.qg__body { padding: 1.75rem 1.5rem 1.75rem; }
.qg__step { display: none; }
.qg__step.is-active { display: block; animation: qgIn .25s ease; }
@keyframes qgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qg__step.is-active { animation: none; } }

.qg__back { display: inline-flex; align-items: center; gap: .35rem; background: none; border: 0; padding: .2rem 0; margin-bottom: .9rem; color: var(--muted); font: inherit; font-size: var(--text-sm); font-weight: 500; cursor: pointer; }
.qg__back:hover { color: var(--royal); }
.qg__back svg { width: 15px; height: 15px; }
.qg__question { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.45rem, 1.2rem + .9vw, 1.85rem); line-height: 1.2; margin: 0 0 .35rem; color: var(--ink); }
.qg__subtext { color: var(--muted); font-size: var(--text-sm); margin: 0 0 1.2rem; }

.qg__input { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 0 1rem; font: inherit; font-size: 1.05rem; color: var(--ink); margin-bottom: .9rem; appearance: none; }
select.qg__input { background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5rem; }
.qg__input:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px rgba(36,67,166,.15); }
.qg__input.is-invalid { border-color: #b4372f; box-shadow: 0 0 0 3px rgba(180,55,47,.12); }
.qg__error { display: none; color: #b4372f; font-size: var(--text-xs); font-weight: 600; margin: -.4rem 0 .8rem; }
.qg__error.is-visible { display: block; }
.qg label { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }

.qg__cta { width: 100%; min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; background: var(--royal); color: #fff; border: 0; border-radius: var(--radius); font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.qg__cta:hover { background: var(--royal-deep); }
.qg__cta:disabled { opacity: .75; cursor: progress; }
.qg__cta svg { width: 18px; height: 18px; }

/* Option grids */
.qg__btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; max-height: 360px; overflow-y: auto; padding: 2px; }
.qg__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; padding: 2px; }
.qg__cards--makes { grid-template-columns: repeat(4, 1fr); }
.qg__btn-opt, .qg__card { min-height: 50px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: var(--text-sm); font-weight: 500; color: var(--ink); cursor: pointer; padding: .55rem .6rem; transition: border-color .15s, background .15s; text-align: center; }
.qg__card { min-height: 58px; font-size: .98rem; }
.qg__btn-opt:hover, .qg__card:hover { border-color: var(--royal); background: #fff; }
.qg__btn-opt.is-selected, .qg__card.is-selected { background: var(--royal); color: #fff; border-color: var(--royal); }

.qg__binary { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .4rem; }
.qg__binary button { min-height: 58px; border-radius: var(--radius); font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.qg__binary-primary { background: var(--royal); color: #fff; border: 1px solid var(--royal); }
.qg__binary-primary:hover { background: var(--royal-deep); }
.qg__binary-secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.qg__binary-secondary:hover { border-color: var(--royal); }

.qg__otherwrap { display: none; gap: .6rem; margin-top: .9rem; }
.qg__otherwrap.is-visible { display: flex; }
.qg__otherwrap .qg__input { margin: 0; }
.qg__otherwrap .qg__cta { width: auto; padding: 0 1.4rem; white-space: nowrap; }

.qg__namegrid, .qg__contact { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.qg__date { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 0 .7rem; }

.qg__loading { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: var(--text-sm); margin-bottom: .8rem; }
.qg__spinner { width: 16px; height: 16px; border: 2px solid rgba(36,67,166,.25); border-top-color: var(--royal); border-radius: 50%; display: inline-block; animation: qgSpin .7s linear infinite; margin-right: .4rem; }
.qg__cta .qg__spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes qgSpin { to { transform: rotate(360deg); } }

.qg__helper { margin-top: 1rem; }
.qg__helper-toggle { background: none; border: 0; padding: 0; font: inherit; font-size: var(--text-xs); font-weight: 600; color: var(--royal); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.qg__helper-text { display: none; margin-top: .6rem; background: var(--cream); border-left: 3px solid var(--green); padding: .75rem .9rem; font-size: var(--text-xs); color: var(--ink-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.qg__helper.is-open .qg__helper-text { display: block; }

.qg__consent { font-size: .72rem; line-height: 1.55; color: var(--muted); margin: 1rem 0 0; }
.qg__consent a { color: var(--royal); }
.tcpa-dynamic { font-weight: 600; color: var(--ink-soft); }
.qg__secure { display: flex; align-items: center; justify-content: center; gap: .45rem; font-size: var(--text-xs); color: var(--muted); margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.qg__secure svg { width: 14px; height: 14px; color: var(--green); }

.funnel-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 720px; margin: 2rem auto 0; }
.funnel-points div { font-size: var(--text-sm); color: var(--ink-soft); }
.funnel-points strong { display: block; color: var(--ink); font-size: var(--text-sm); margin-bottom: .2rem; }

/* Thank-you page */
.ty-hero { background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%); padding: clamp(2rem, 5vw, 3.25rem) 0 1.75rem; border-bottom: 1px solid var(--line); }
.ty-hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.ty-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem); margin-bottom: .4rem; }
.ty-hero p { color: var(--ink-soft); margin: 0; }
.ty-call { background: var(--royal-deep); color: #e6ebf7; border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; }
.ty-call p { color: #c9d1e8; font-size: var(--text-sm); margin: 0 0 .8rem; }
.ty-call .btn { width: 100%; background: #fff; color: var(--royal-deep) !important; border-color: #fff; font-size: 1.05rem; min-height: 52px; }
.ty-call .btn:hover { background: var(--cream); }
.ty-listings { padding: 2rem 0 3rem; background: var(--paper); }
.ty-listings h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); margin-bottom: .25rem; }
.ty-listings .sub { color: var(--muted); font-size: var(--text-sm); margin-bottom: 1.25rem; }
#qsWidgetContainer { min-height: 240px; }
.ty-disclosure { font-size: var(--text-xs); color: var(--muted); max-width: 85ch; margin-top: 1.5rem; }

@media (max-width: 760px) {
  .ty-hero .wrap { grid-template-columns: 1fr; }
  .funnel-points { grid-template-columns: 1fr; gap: .9rem; }
}
@media (max-width: 560px) {
  .qg__body { padding: 1.35rem 1.1rem 1.4rem; }
  .qg__btns { grid-template-columns: repeat(3, 1fr); }
  .qg__cards, .qg__cards--makes { grid-template-columns: repeat(2, 1fr); }
  .qg__contact { grid-template-columns: 1fr; }
  .qg__otherwrap.is-visible { flex-direction: column; }
  .qg__otherwrap .qg__cta { width: 100%; }
  .funnel-head .secure-note span { display: none; }
}

/* Medicare results: loader + listing cards */
.scan { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; align-items: center; justify-content: center; padding: 1.5rem; transition: opacity .35s ease, visibility .35s; }
.scan.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.scan__box { max-width: 420px; width: 100%; text-align: center; }
.scan__mark { width: 64px; height: 64px; margin: 0 auto 1.25rem; border-radius: 50%; border: 3px solid var(--royal-tint); border-top-color: var(--royal); animation: qgSpin .9s linear infinite; }
.scan h2 { font-size: 1.7rem; margin-bottom: .35rem; }
.scan p { color: var(--muted); font-size: var(--text-sm); }
.scan ol { list-style: none; padding: 0; margin: 1.5rem 0 0; text-align: left; display: grid; gap: .6rem; }
.scan li { border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem .85rem 2.6rem; font-size: var(--text-sm); color: var(--muted); position: relative; background: #fff; opacity: .55; transition: all .3s ease; }
.scan li::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 2px solid var(--line); }
.scan li.now { opacity: 1; color: var(--ink); border-color: var(--royal); }
.scan li.now::before { border-color: var(--royal); border-top-color: transparent; animation: qgSpin .7s linear infinite; }
.scan li.done { opacity: 1; color: var(--ink-soft); border-color: rgba(44,138,99,.45); }
.scan li.done::before { background: var(--green); border-color: var(--green); }
body.is-scanning { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .scan__mark, .scan li.now::before { animation: none; } }

.results { padding: clamp(2rem, 5vw, 3.25rem) 0 3.5rem; background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 260px); }
.results__head { text-align: center; max-width: 680px; margin: 0 auto 1.75rem; }
.results__head h1 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.5rem); margin-bottom: .3rem; }
.results__head p { color: var(--ink-soft); margin: 0; }
.results__ma, .results__list { max-width: 880px; margin: 0 auto; }
.results__list { display: grid; gap: 1rem; margin-top: 1rem; }
.rcard { display: grid; grid-template-columns: 150px 1fr auto; gap: 1.25rem; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--royal); border-radius: var(--radius-lg); padding: 1.25rem 1.4rem; text-decoration: none; color: var(--ink); transition: box-shadow .2s, border-color .2s, transform .2s; }
.rcard:hover { box-shadow: 0 18px 36px -26px rgba(23,46,114,.55); border-left-color: var(--green); transform: translateY(-1px); color: var(--ink); }
.rcard__logo { display: flex; align-items: center; justify-content: center; height: 72px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: .5rem; }
.rcard__logo img { max-height: 56px; max-width: 100%; object-fit: contain; }
.rcard__title { display: block; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; }
.rcard__host { display: block; font-size: var(--text-xs); color: var(--royal); margin-top: .2rem; }
.rcard__list { margin: .55rem 0 0; padding-left: 1.05rem; font-size: var(--text-sm); color: var(--ink-soft); }
.rcard__list li { margin-bottom: .15rem; }
.rcard__cta { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.4rem; background: var(--royal); color: #fff; border-radius: var(--radius); font-weight: 600; white-space: nowrap; }
.rcard:hover .rcard__cta { background: var(--royal-deep); }
.results__again { text-align: center; margin-top: 2rem; }
@media (max-width: 700px) {
  .rcard { grid-template-columns: 1fr; text-align: center; gap: .9rem; }
  .rcard__logo { width: 160px; margin: 0 auto; }
  .rcard__list { text-align: left; }
  .rcard__cta { width: 100%; }
}
