/* Comparisons.org - Credit Cards quiz v5 = v4 in a deep-blue color direction (only colors changed).
   Cool light background, navy text, deep blue accents, serif headings, larger body text.
   Variable names kept from v4 (--gold* now hold the blue accent) so the rest of the file is identical. */

:root {
    --bg: #f2f5f9;          /* cool light page background */
    --white: #fff;
    --navy: #13233f;        /* headings, primary text */
    --ink: #1f2a3a;
    --muted: #4a5568;
    --soft: #6b7280;
    --gold: #1d4e89;        /* accent (deep blue): eyebrow, icons, progress */
    --gold-light: #4a78b0;
    --gold-soft: #e7eef7;   /* icon backgrounds, selected state */
    --line: #dce3ec;
    --green: #047857;       /* Comparisons CTA */
    --green-dark: #065f46;
    --shadow-option: 0 4px 14px rgba(19, 35, 63, .13), 0 1px 3px rgba(19, 35, 63, .10);
    --shadow-option-hover: 0 8px 22px rgba(19, 35, 63, .18), 0 2px 5px rgba(19, 35, 63, .12);
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }

.container { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.siteHeader { padding: 14px 0; }
.headerRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1040px; }
.logo { width: 150px; height: auto; flex: 0 1 150px; min-width: 0; }
.headerRight { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.disclosureLink { font-size: 11px; line-height: 16px; color: var(--soft); text-decoration: underline; text-underline-offset: 2px; }
.disclosureLink.isHidden { visibility: hidden; }
.secureBadge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--navy); }
.secureBadge svg { width: 13px; height: 13px; fill: var(--gold); }

/* ---------- Quiz card ---------- */
/* Dark navy band behind the top of the quiz (same as v4; header stays light - the logo isn't made for dark backgrounds).
   The white quiz card sits on the band and runs past it. */
.main { position: relative; isolation: isolate; padding-top: 12px; }
.main::before {
    content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 190px;
    background: linear-gradient(160deg, #1a2d4f 0%, #13233f 55%, #0e1a30 100%);
    border-bottom: 2px solid var(--gold-light);
}
body.isMatching .main { min-height: 100svh; }   /* result screen: footer below the fold */

.quizCard {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 26px 18px 28px;
    box-shadow: 0 14px 44px rgba(19, 35, 63, .16);
}

/* Progress (steps 2-3): Back row, then "Step X of 3" + %, then the bar */
.progressWrap { margin-bottom: 22px; }
.backBtn {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: 0; padding: 4px 6px 4px 0; margin-bottom: 12px;
    font-size: 15px; font-weight: 600; color: var(--navy); cursor: pointer;
}
.backBtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.backBtn:hover { color: var(--gold); }
.progressMeta { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.progressBar { height: 6px; border-radius: 99px; background: var(--gold-soft); overflow: hidden; }
.progressBar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: inherit; transition: width .4s ease; }

.pickRow { display: flex; justify-content: center; margin-bottom: 14px; }
.pickPill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px 5px 6px; }
.pickPill b { color: var(--navy); }
.pickIcon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); flex: none; }
.pickIcon svg { width: 15px; height: 15px; fill: var(--gold); }

/* Step transition */
.slide { transition: opacity .22s ease, transform .22s ease; }
.slide.isLeaving, .slide.isEntering { opacity: 0; transform: translateY(8px); }

/* Intro (step 1) */
.intro { text-align: center; margin-bottom: 26px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.introTitle {
    margin: 0 auto 16px; max-width: 620px;
    font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.18; color: var(--navy);
    text-wrap: balance;
}
.trustTags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.trustTags li { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--navy); }
.trustTags svg { width: 16px; height: 16px; fill: var(--gold); }

/* Question */
.qTitle {
    margin: 0 0 18px; text-align: center;
    font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.25; color: var(--navy);
    text-wrap: balance;
}
.intro + .qTitle { font-size: 21px; padding-top: 22px; border-top: 1px solid var(--line); }
.helperNote { display: flex; gap: 8px; align-items: flex-start; max-width: 560px; margin: -6px auto 20px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.helperNote svg { width: 17px; height: 17px; fill: var(--gold); flex: none; margin-top: 2px; }

/* Options - white buttons with a clear shadow (Alex) */
.optionGrid, .optionList { display: grid; gap: 12px; }
.optionList { max-width: 560px; margin: 0 auto; }

.option {
    display: flex; align-items: center; gap: 14px; width: 100%;
    min-height: 64px; padding: 14px 16px; text-align: left;
    background: var(--white); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-option); cursor: pointer;
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.option:hover { box-shadow: var(--shadow-option-hover); border-color: var(--gold-light); transform: translateY(-1px); }
.option:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.option.selected { border-color: var(--gold); background: #f8fbff; }

.optIcon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--gold-soft); border: 1px solid #cfdcec; flex: none; }
.optIcon svg { width: 21px; height: 21px; fill: var(--gold); }
.optText { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.optName { font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.optDesc { font-size: 14px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.optEnd { flex: none; width: 24px; height: 24px; display: grid; place-items: center; }
.optEnd svg { width: 22px; height: 22px; fill: var(--soft); grid-area: 1 / 1; }
.icoCheck { opacity: 0; }
.option.selected .icoChevron { opacity: 0; }
.option.selected .icoCheck { opacity: 1; fill: var(--gold); }
.hasSelection .option:not(.selected) { opacity: .55; }

/* ---------- Matching (loading) ---------- */
.matchCard {
    position: relative; overflow: hidden;
    width: 250px; max-width: 80%; aspect-ratio: 1.586; margin: 4px auto 26px;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 16px 18px; border-radius: 14px; color: #fff;
    background: linear-gradient(135deg, #2f5a91 0%, #1b3a66 45%, #10264a 70%, #2b5288 100%);
    box-shadow: 0 16px 34px rgba(19, 35, 63, .22);
    animation: cardFloat 2.6s ease-in-out infinite;
}
.matchCard::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 48%, transparent 64%);
    transform: translateX(-100%); animation: cardShine 2.2s ease-in-out infinite;
}
.mcTop { display: flex; justify-content: space-between; align-items: center; }
.mcChip { width: 36px; height: 27px; border-radius: 5px; background: linear-gradient(135deg, #f7e7b9, #d1ae66); border: 1px solid rgba(19, 35, 63, .18); }
.mcIcon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.mcIcon svg { width: 16px; height: 16px; fill: #fff; }
.mcName { font-family: var(--serif); font-weight: 700; font-size: 19px; }
.mcNumber { font-size: 12px; letter-spacing: .12em; opacity: .7; }
@keyframes cardFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes cardShine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

.matchTitle { margin: 0 0 18px; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 25px; line-height: 1.25; color: var(--navy); text-wrap: balance; }
.checkList { list-style: none; margin: 0 auto; padding: 0; max-width: 360px; display: grid; gap: 12px; }
.checkList li { display: flex; align-items: center; gap: 10px; font-size: 16px; color: #9aa1ab; transition: color .3s ease; }
.checkIcon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #d3dbe6; flex: none; transition: background .3s ease, border-color .3s ease; }
.checkIcon svg { width: 14px; height: 14px; fill: #fff; opacity: 0; transition: opacity .3s ease; }
.checkList li.done { color: var(--navy); font-weight: 600; }
.checkList li.done .checkIcon { background: var(--gold); border-color: var(--gold); }
.checkList li.done .checkIcon svg { opacity: 1; }

/* ---------- Below the quiz (step 1 only) ---------- */
.belowQuiz { padding-top: 48px; }
.sectionTitle { margin: 0 0 22px; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.25; color: var(--navy); }

.howSteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.howSteps li { text-align: center; }
.howNum { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.howSteps h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--navy); text-wrap: balance; }
.howSteps p { margin: 0 auto; max-width: 300px; font-size: 15px; color: var(--muted); }

/* Partner logos: transparent PNGs directly on the page background (no box, no white background) */
.partners { margin-top: 48px; text-align: center; }
.partnersLabel { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.partnerLogos { display: flex; justify-content: center; align-items: center; gap: 28px; }
.partnerLogos img { width: 130px; }

.faq { margin-top: 52px; max-width: 640px; margin-left: auto; margin-right: auto; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq summary {
    list-style: none; cursor: pointer; position: relative;
    padding: 16px 48px 16px 18px; font-size: 17px; font-weight: 600; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px;
    border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
    transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0; padding: 0 18px 18px; font-size: 16px; color: var(--muted); }

.closing { margin-top: 52px; text-align: center; }
/* Crop the bottom (legs) - faces and table stay in frame */
.closingPhoto {
    width: 100%; max-width: 640px; aspect-ratio: 16 / 9; margin: 0 auto 26px;
    object-fit: cover; object-position: 50% 15%;
    border-radius: 16px; box-shadow: 0 10px 30px rgba(19, 35, 63, .12);
}
.closingTitle { margin: 0 0 18px; font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--navy); text-wrap: balance; }

/* ---------- CTA ---------- */
.ctaBtn {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 58px; padding: 14px 24px;
    background: var(--green); color: #fff; border-radius: 12px;
    font-size: 18px; font-weight: 700; text-decoration: none;
    box-shadow: 0 8px 20px rgba(4, 120, 87, .25);
    transition: background .18s ease;
}
.ctaBtn:hover { background: var(--green-dark); }
.ctaBtn--inline { display: inline-flex; width: auto; min-width: 280px; }
.ctaText { position: relative; z-index: 1; }
.ctaFill { position: absolute; inset: 0; width: 0; background: rgba(255, 255, 255, .18); }
.ctaFill.isRunning { animation: ctaFill 3s linear forwards; }
@keyframes ctaFill { to { width: 100%; } }

/* ---------- Modals ---------- */
.modalOverlay {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(19, 35, 63, .55);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.modalOverlay.visible { opacity: 1; visibility: visible; }
.modalBox {
    position: relative; width: 100%; max-width: 440px; max-height: calc(100svh - 32px); overflow-y: auto;
    background: var(--white); border-radius: 18px; padding: 28px 20px 22px; text-align: center;
    box-shadow: 0 24px 60px rgba(19, 35, 63, .3);
}
.modalBadge { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--gold-soft); border: 1px solid #cfdcec; }
.modalBadge svg { width: 28px; height: 28px; fill: var(--gold); }
.modalTitle { margin: 0 0 16px; font-family: var(--serif); font-weight: 700; font-size: 25px; line-height: 1.25; color: var(--navy); text-wrap: balance; }
.modalSummary { margin-bottom: 14px; }
.goalChip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 99px; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.chipRow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.summaryChip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: var(--bg); border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--navy); }
.summaryChip svg { width: 14px; height: 14px; fill: var(--gold); }
.modalBody { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.modalBody strong { color: var(--navy); }
.modalLogo { display: flex; justify-content: center; margin-bottom: 16px; }
.modalLogo img { width: 130px; }
.modalLogoText { display: block; width: 100%; padding: 10px 16px; background: var(--bg); border-radius: 12px; font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--navy); }
.privacyNote { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: 13px; color: var(--soft); }
.privacyNote svg { width: 13px; height: 13px; fill: var(--gold); }

.discBox { text-align: left; }
.discBox .modalTitle { font-size: 22px; padding-right: 28px; }
.discClose { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--soft); cursor: pointer; }

/* ---------- Footer ---------- */
.footer { margin-top: 150px; padding: 32px 0 36px; background: #e8edf4; border-top: 1px solid var(--line); text-align: center; }
.footer .logo { margin: 0 auto 16px; }
.footerLinks { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footerLinks a { font-size: 14px; color: var(--navy); }
.footerText { margin: 0; font-size: 12px; line-height: 1.6; color: var(--soft); }

/* ---------- Breakpoints ---------- */
@media (max-width: 639px) {
    /* Mobile: compact so most answers are above the fold */
    .siteHeader { padding: 10px 0; }
    .quizCard { padding: 20px 14px 22px; }
    .intro { margin-bottom: 16px; }
    .eyebrow { margin-bottom: 6px; font-size: 12px; }
    .introTitle { font-size: 27px; margin-bottom: 10px; }
    .intro + .qTitle { font-size: 19px; padding-top: 14px; margin-bottom: 14px; }
    .optionGrid, .optionList { gap: 10px; }
    .option { min-height: 60px; padding: 10px 12px; gap: 12px; }
    .optIcon { width: 38px; height: 38px; }
    .optIcon svg { width: 19px; height: 19px; }
    .optDesc { font-size: 13.5px; }

    /* Step 1 on mobile: 2 columns so all 6 goals are above the fold (like the live page) */
    .intro + .qTitle { font-size: 18px; text-wrap: nowrap; }
    .optionGrid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .option--goal { display: block; min-height: 0; padding: 11px 10px 12px 12px; }
    .option--goal .optIcon { float: right; width: 28px; height: 28px; margin: 0 0 4px 6px; }
    .option--goal .optIcon svg { width: 15px; height: 15px; }
    .option--goal .optText { display: block; }
    .option--goal .optName { display: block; font-size: 15px; line-height: 1.25; }
    .option--goal .optDesc { display: block; font-size: 12.5px; line-height: 1.35; margin-top: 4px; }
    .option--goal .optEnd { display: none; }
}

@media (max-width: 359px) {
    .introTitle { font-size: 25px; }
    .trustTags { gap: 6px 12px; }
    .trustTags li { font-size: 13px; }
    .quizCard { padding: 18px 10px 20px; }
    .option { padding: 10px 10px; gap: 10px; }
    .optIcon { width: 34px; height: 34px; }
    .optIcon svg { width: 17px; height: 17px; }
    .optName { font-size: 16px; }
    .optDesc { font-size: 13px; }
    .optEnd { width: 18px; }
    .logo { width: 128px; }
    .intro + .qTitle { font-size: 14.5px; }
    .option--goal { padding: 10px 8px 11px 10px; }
    .option--goal .optName { font-size: 14px; }
    .option--goal .optDesc { font-size: 12px; }
}

@media (min-width: 640px) {
    .quizCard { padding: 36px 36px 40px; }
    .introTitle { font-size: 38px; }
    .qTitle { font-size: 28px; }
    .intro + .qTitle { font-size: 23px; }
    .optionGrid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .howSteps { grid-template-columns: repeat(3, 1fr); }
    .modalBox { padding: 34px 32px 26px; }
}

@media (min-width: 640px) {
    .main { padding-top: 32px; }
    .main::before { height: 260px; }
}

@media (min-width: 1024px) {
    .siteHeader { padding: 18px 0; }
    .logo { width: 170px; flex-basis: 170px; }
    .quizCard { padding: 44px 52px 48px; }
    .introTitle { font-size: 42px; }
}
