/* PolicyMatcher quiz funnels (Life / Final Expense) — shared styles */
:root {
    --pm-blue: #0066cc;
    --pm-blue-dark: #0052a3;
    --pm-navy: #0b2545;
    --pm-ink: #0f172a;
    --pm-muted: #5b6475;
    --pm-line: #e2e8f0;
    --pm-soft: #f3f8ff;
    --pm-green: #16a34a;
    --pm-radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--pm-ink);
    background: #fff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--pm-blue); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Header */
.f-header { background: #fff; border-bottom: 1px solid var(--pm-line); position: sticky; top: 0; z-index: 50; }
.f-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.f-logo img { height: 44px; width: auto; }
.f-header-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pm-muted); font-weight: 500; }
.f-header-note svg { width: 18px; height: 18px; color: var(--pm-green); flex: none; }

/* Hero */
.f-hero { position: relative; overflow: hidden; padding: 48px 0 64px; min-height: 620px; }
.f-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.f-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.80) 55%, rgba(255,255,255,.95) 100%); }
.f-hero .wrap { position: relative; z-index: 1; text-align: center; }
.f-badge { display: inline-flex; align-items: center; gap: 8px; background: #e6f0fb; color: var(--pm-blue-dark); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; margin-bottom: 18px; }
.f-badge svg { width: 15px; height: 15px; }
.f-title { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; max-width: 860px; margin: 0 auto 14px; color: var(--pm-ink); }
.f-title .hl { color: var(--pm-blue); }
.f-sub { font-size: clamp(16px, 1.8vw, 18px); color: var(--pm-muted); max-width: 640px; margin: 0 auto 30px; }

/* Quiz card */
.quiz-card { position: relative; background: #fff; border: 1px solid var(--pm-line); border-radius: 18px; box-shadow: 0 20px 50px -20px rgba(11,37,69,.28); max-width: 600px; margin: 0 auto; padding: 26px 28px 24px; text-align: left; }
.q-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.q-back { border: 0; background: none; color: var(--pm-muted); font: inherit; font-size: 14px; cursor: pointer; padding: 4px 6px 4px 0; display: inline-flex; align-items: center; gap: 4px; visibility: hidden; }
.q-back.show { visibility: visible; }
.q-back:hover { color: var(--pm-blue); }
.q-progress { flex: 1; height: 8px; border-radius: 99px; background: #edf2f7; overflow: hidden; }
.q-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2b8af0, var(--pm-blue)); border-radius: 99px; transition: width .35s ease; }
.q-count { font-size: 12px; font-weight: 600; color: var(--pm-muted); min-width: 44px; text-align: right; }

.q-step { display: none; animation: qIn .28s ease; }
.q-step.active { display: block; }
@keyframes qIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.q-title { font-size: 21px; font-weight: 700; line-height: 1.3; text-align: center; margin-bottom: 6px; }
.q-help { font-size: 14px; color: var(--pm-muted); text-align: center; margin-bottom: 18px; }

.q-options { display: grid; gap: 10px; }
.q-options.cols-2 { grid-template-columns: 1fr 1fr; }
.q-opt { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 12px 16px; border: 2px solid var(--pm-line); border-radius: 12px; background: #fff; font: inherit; font-size: 16px; font-weight: 600; color: var(--pm-ink); cursor: pointer; transition: border-color .15s, background .15s, transform .1s; text-align: center; }
.q-opt:hover { border-color: var(--pm-blue); background: var(--pm-soft); }
.q-opt:active { transform: scale(.99); }
.q-opt.selected { border-color: var(--pm-blue); background: #e6f0fb; color: var(--pm-blue-dark); }
.q-opt .chk { display: none; position: absolute; right: 14px; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #cbd5e1; }
.q-multi .q-opt { justify-content: flex-start; padding-right: 44px; text-align: left; }
.q-multi .q-opt .chk { display: block; }
.q-multi .q-opt.selected .chk { background: var(--pm-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--pm-blue); }

.q-fields { display: grid; gap: 12px; }
.q-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.q-row.r3 { grid-template-columns: 1.2fr 1fr 1fr; }
.q-field label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.q-input, .q-select { width: 100%; height: 52px; padding: 0 14px; border: 2px solid var(--pm-line); border-radius: 12px; font: inherit; font-size: 16px; color: var(--pm-ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.q-select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6475' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 12px center/18px no-repeat; padding-right: 36px; }
.q-input:focus, .q-select:focus { border-color: var(--pm-blue); box-shadow: 0 0 0 4px rgba(0,102,204,.12); }
.q-input.err, .q-select.err { border-color: #dc2626; }
.q-err { display: none; color: #dc2626; font-size: 13px; margin-top: 6px; }
.q-err.show { display: block; }
.q-zipcity { font-size: 13px; color: var(--pm-green); font-weight: 600; margin-top: 6px; min-height: 18px; }

.q-next { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; margin-top: 16px; border: 0; border-radius: 12px; background: linear-gradient(180deg, #1a7be0, var(--pm-blue-dark)); color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 22px -10px rgba(0,82,163,.7); transition: filter .15s, transform .1s; }
.q-next:hover { filter: brightness(1.06); }
.q-next:active { transform: translateY(1px); }
.q-next[disabled] { opacity: .65; cursor: wait; }
.q-next svg { width: 18px; height: 18px; }

.q-secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--pm-muted); margin-top: 12px; }
.q-secure svg { width: 14px; height: 14px; color: var(--pm-green); }
.tcpa { font-size: 11px; line-height: 1.55; color: #64748b; margin-top: 14px; }
.tcpa a { color: var(--pm-blue); }

/* Thank you */
.q-done { text-align: center; padding: 10px 0 6px; }
.q-done-icon { width: 68px; height: 68px; border-radius: 50%; background: #dcfce7; color: var(--pm-green); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.q-done-icon svg { width: 34px; height: 34px; }
.q-done h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.q-done p { color: var(--pm-muted); font-size: 15px; max-width: 440px; margin: 0 auto 10px; }
.q-done ul { list-style: none; text-align: left; max-width: 380px; margin: 16px auto 0; display: grid; gap: 10px; }
.q-done li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.q-done li b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--pm-blue); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* Hero trust ticks */
.f-ticks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 22px; font-size: 14px; font-weight: 600; color: #334155; }
.f-ticks span { display: inline-flex; align-items: center; gap: 6px; }
.f-ticks svg { width: 16px; height: 16px; color: var(--pm-green); }

/* Stats strip */
.f-strip { background: var(--pm-navy); color: #fff; }
.f-strip .wrap { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px 0; padding-top: 22px; padding-bottom: 22px; }
.f-stat { display: flex; align-items: center; gap: 12px; padding: 0 30px; }
.f-stat + .f-stat { border-left: 1px solid rgba(255,255,255,.15); }
.f-stat svg { width: 26px; height: 26px; color: #60a5fa; flex: none; }
.f-stat small { display: block; font-size: 12px; color: #a9b8cf; }
.f-stat strong { display: block; font-size: 18px; font-weight: 700; }

/* Sections */
.f-section { padding: 72px 0; }
.f-section.alt { background: #f7fafd; }
.f-h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.01em; text-align: center; margin-bottom: 10px; }
.f-lead { text-align: center; color: var(--pm-muted); max-width: 640px; margin: 0 auto 40px; font-size: 16px; }
.f-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.f-card { background: #fff; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 26px; }
.f-card .ic { width: 48px; height: 48px; border-radius: 12px; background: #e6f0fb; color: var(--pm-blue); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.f-card .ic svg { width: 24px; height: 24px; }
.f-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.f-card p { color: var(--pm-muted); font-size: 15px; }
.f-steps { counter-reset: s; }
.f-steps .f-card h3::before { counter-increment: s; content: counter(s); display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--pm-blue); color: #fff; font-size: 14px; align-items: center; justify-content: center; margin-right: 10px; vertical-align: 2px; }

.f-faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.f-faq details { background: #fff; border: 1px solid var(--pm-line); border-radius: 12px; padding: 0 20px; }
.f-faq summary { cursor: pointer; list-style: none; font-weight: 700; padding: 18px 28px 18px 0; position: relative; }
.f-faq summary::-webkit-details-marker { display: none; }
.f-faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 22px; color: var(--pm-blue); font-weight: 500; }
.f-faq details[open] summary::after { content: "–"; }
.f-faq details p { color: var(--pm-muted); padding-bottom: 18px; font-size: 15px; }

.f-cta { text-align: center; }
.f-cta .q-next { display: inline-flex; width: auto; padding: 0 34px; }

/* Footer */
.f-footer { background: #0b1d33; color: #b6c3d6; font-size: 13px; padding: 40px 0 34px; }
.f-footer img { height: 40px; width: auto; margin-bottom: 18px; }
.f-footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; }
.f-footer-links a { color: #fff; text-decoration: none; font-weight: 600; }
.f-footer-links a:hover { text-decoration: underline; }
.f-footer p { margin-bottom: 10px; line-height: 1.6; }

@media (max-width: 860px) {
    .f-grid3 { grid-template-columns: 1fr; }
    .f-stat { padding: 0 16px; }
    .f-stat + .f-stat { border-left: 0; }
}
@media (max-width: 600px) {
    .f-header .wrap { height: 58px; }
    .f-logo img { height: 36px; }
    .f-header-note span { display: none; }
    .f-hero { padding: 26px 0 40px; min-height: 0; }
    .f-sub { margin-bottom: 20px; }
    .quiz-card { padding: 20px 16px 18px; border-radius: 16px; }
    .q-title { font-size: 19px; }
    .q-options.cols-2 { grid-template-columns: 1fr; }
    .q-row.r3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .q-row.r3 .q-select { padding: 0 26px 0 10px; background-position: right 6px center; }
    .f-section { padding: 52px 0; }
    .f-strip .wrap { flex-direction: column; align-items: flex-start; padding-left: 30px; }
}

/* ---- Desktop (v3): original centered layout, wider + compact card; JS pins card height so the hero never resizes ---- */
.q-row.d2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .q-row.d2 { grid-template-columns: 1fr; } .f-hero .f-ticks { display: none; } }
@media (min-width: 980px) {
    .f-hero { min-height: 0; padding: 30px 0 40px; }
    .f-badge { margin-bottom: 14px; }
    .f-title { font-size: clamp(34px, 3vw, 44px); max-width: 1120px; margin-bottom: 10px; }
    .f-sub { max-width: 860px; margin-bottom: 24px; }
    .quiz-card { max-width: 720px; padding: 22px 30px 20px; }
    .q-top { margin-bottom: 14px; }
    .q-options { grid-template-columns: 1fr 1fr; }
    .q-help { margin-bottom: 16px; }
    .q-next { margin-top: 14px; }
    .tcpa { font-size: 10.5px; line-height: 1.5; margin-top: 10px; }
    .f-ticks { margin-top: 18px; }
}

/* ---- v4: frosted-glass quiz card; hero top-aligned so a shorter card never shifts the page ---- */
.f-hero-bg::after { background: linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(255,255,255,.62) 45%, rgba(255,255,255,.70) 100%); }
.quiz-card {
    background: rgba(255,255,255,.58);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255,255,255,.75);
    box-shadow: 0 24px 60px -24px rgba(11,37,69,.35), inset 0 1px 0 rgba(255,255,255,.9);
}
.q-opt {
    background: rgba(255,255,255,.62);
    border-color: rgba(203,213,225,.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px -4px rgba(11,37,69,.15);
}
.q-opt:hover { background: rgba(255,255,255,.9); border-color: var(--pm-blue); }
.q-opt.selected { background: rgba(230,240,251,.92); }
.q-input, .q-select { background-color: rgba(255,255,255,.75); }
.q-progress { background: rgba(203,213,225,.55); }
.q-help, .tcpa, .q-secure { color: #475569; }
@media (min-width: 980px) { .f-hero { display: block; } }

/* ---- v5: stats bar always visible on desktop (sits at the fold, sticky when the hero is taller than the screen) ---- */
@media (min-width: 980px) {
    .f-strip { position: sticky; bottom: 0; z-index: 40; box-shadow: 0 -10px 30px -12px rgba(11,37,69,.35); }
    .f-strip .wrap { padding-top: 16px; padding-bottom: 16px; }
    .f-hero { display: flex; flex-direction: column; justify-content: center; }
}
@media (min-width: 980px) {
    .f-hero { justify-content: flex-start; padding-top: 22px; }
    .f-hero.fits { justify-content: center; padding-top: 30px; }
}
@media (min-width: 980px) and (max-height: 820px) {
    .f-strip .wrap { padding-top: 10px; padding-bottom: 10px; }
    .f-stat strong { font-size: 16px; }
    .f-badge { margin-bottom: 10px; }
}

/* ---- v6: stronger frosted glass ---- */
.quiz-card {
    background: rgba(255,255,255,.42);
    -webkit-backdrop-filter: blur(44px) saturate(180%);
    backdrop-filter: blur(44px) saturate(180%);
    border: 1px solid rgba(255,255,255,.85);
}
.q-opt {
    background: rgba(255,255,255,.55);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

/* ---- v7: gradient borders on answer buttons; animated multicolor border on hover ---- */
@property --pm-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.q-opt { border: 0; isolation: isolate; }
.q-opt::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; z-index: -1;
    background: linear-gradient(135deg, rgba(255,255,255,.95) 0%, rgba(147,197,253,.9) 35%, rgba(255,255,255,.7) 60%, rgba(96,165,250,.85) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.q-opt:hover { box-shadow: 0 8px 22px -10px rgba(99,102,241,.45); }
.q-opt:hover::before {
    padding: 2.5px;
    background: conic-gradient(from var(--pm-angle), #0066cc, #22d3ee, #34d399, #a78bfa, #ec4899, #f59e0b, #0066cc);
    animation: pmSpin 2.4s linear infinite;
}
.q-opt.selected::before {
    padding: 2.5px;
    background: conic-gradient(from var(--pm-angle), #0066cc, #38bdf8, #6366f1, #0066cc);
    animation: pmSpin 3s linear infinite;
}
@keyframes pmSpin { to { --pm-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .q-opt::before { animation: none !important; } }

/* ---- v8: cleaner resting state — even brand gradient hairline, crisp white glass ---- */
.q-opt { background: rgba(255,255,255,.78); box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 14px -8px rgba(30,64,175,.25); }
.q-opt::before { padding: 1.5px; background: linear-gradient(120deg, rgba(0,102,204,.55) 0%, rgba(99,102,241,.40) 50%, rgba(14,165,233,.55) 100%); }
.q-opt:hover { background: rgba(255,255,255,.95); }
.q-opt.selected { background: rgba(239,246,255,.95); }
