/*
 * Stylesheet for the server-rendered quote flow.
 *
 * Self-contained on purpose: these pages load no Bootstrap, no Vue and no
 * Inertia, so everything they need is here. Kept small enough to inline if it
 * ever needs to be.
 */

:root {
    --qf-navy: #09478a;
    --qf-teal: #10b098;
    --qf-teal-dark: #0d8f7c;
    --qf-ink: #243b53;
    --qf-muted: #6b7c8f;
    --qf-faint: #9fb0c2;
    --qf-line: #e4ecf4;
    --qf-bg: #f5f8fb;
    --qf-tint: #eaf7f5;
}

*, *::before, *::after { box-sizing: border-box; }

body.qf {
    margin: 0;
    background: var(--qf-bg);
    color: var(--qf-ink);
    font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Top bar */
.qf-topbar {
    background: #041f3d;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    text-align: center;
    padding: 9px 0;
}
.qf-topbar a { color: #6de0b5; font-weight: 600; text-decoration: none; }
.qf-topbar a:hover { text-decoration: underline; }

/* Header */
.qf-header { background: #fff; border-bottom: 1px solid var(--qf-line); box-shadow: 0 2px 10px rgba(9, 71, 138, 0.05); }
.qf-header__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; min-height: 108px; }
.qf-header__logo { flex: 0 0 auto; }
/* Same size the brand is given everywhere else on the site. */
.qf-header__logo img { display: block; height: 97px; width: auto; }
.qf-header__actions { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 20px; }
.qf-header__phone { color: var(--qf-navy); font-weight: 600; text-decoration: none; white-space: nowrap; }
.qf-header__phone:hover { color: var(--qf-teal-dark); }
.qf-header__signin {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 12px; border: 0; border-radius: 8px;
    background-color: #10b098;
    color: #fff; font-size: 14px; font-weight: 500; line-height: 20px;
    text-decoration: none; white-space: nowrap;
}
.qf-header__signin:hover { background-color: #09478a; color: #fff; }

/* Signed-in actions ------------------------------------------------------
   The site header runs these on Bootstrap dropdowns; here they are <details>
   so they open, close and take focus with no JavaScript. */
.qf-menu { position: relative; }
.qf-menu > summary { list-style: none; cursor: pointer; }
.qf-menu > summary::-webkit-details-marker { display: none; }

.qf-iconbtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 1px solid #d6e0f5; border-radius: 999px;
    color: #0d3b8c; background: #fff; transition: all 0.2s ease;
}
.qf-iconbtn:hover {
    background: #0d3b8c; border-color: #0d3b8c; color: #fff;
    box-shadow: 0 0 0 0.15rem rgba(13, 59, 140, 0.2);
}

.qf-account {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 8px 12px; border-radius: 8px;
    background: linear-gradient(to bottom, #00e2c7 0%, #115cad 100%);
    color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.qf-account::after {
    display: inline-block; margin-left: 0.255em; vertical-align: 0.255em; content: "";
    border-top: 0.3em solid; border-right: 0.3em solid transparent;
    border-bottom: 0; border-left: 0.3em solid transparent;
}
.qf-account:hover { filter: brightness(1.06); }
.qf-account__count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: #dc3545; color: #fff; font-size: 12px; font-weight: 700;
}

.qf-menu__panel {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;
    min-width: 240px; margin: 0; padding: 0; overflow: hidden; list-style: none;
    background: #09478a; border: 0; border-radius: 6px;
}
.qf-menu__panel--end { left: auto; right: 0; }
.qf-menu__panel a,
.qf-menu__panel button {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 8px 12px; border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: none; color: #fff; font: inherit; font-size: 12px; font-weight: 500;
    text-align: left; text-decoration: none; cursor: pointer;
}
.qf-menu__panel a:hover,
.qf-menu__panel button:hover {
    background-color: #063b75; color: #fff; border-bottom-color: rgba(255, 255, 255, 0.3);
}
.qf-menu__panel li:last-child a,
.qf-menu__panel li:last-child button { border-bottom: 0; }
.qf-menu__panel form { margin: 0; }
.qf-menu__identity {
    padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff; font-size: 12px; font-weight: 500; line-height: 1.4;
}
.qf-menu__identity strong { display: block; font-weight: 600; }
.qf-menu__identity span { color: rgba(255, 255, 255, 0.7); word-break: break-all; }

/* Navigation ------------------------------------------------------------
   Dropdowns are <details>/<summary>, so they open, close and take focus with
   no JavaScript. summary::marker is removed and the caret drawn by hand. */
.qf-nav { position: relative; flex: 1 1 auto; }
.qf-nav summary { list-style: none; cursor: pointer; }
.qf-nav summary::-webkit-details-marker { display: none; }

.qf-nav__list { display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0; }
.qf-nav__item { position: relative; }

.qf-nav__item > details > summary,
.qf-nav__link {
    display: inline-flex; align-items: center; gap: 0;
    padding: 8px 6px;
    color: #000; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.qf-nav__item > details > summary::after,
.qf-account::after { flex: 0 0 auto; }
.qf-nav__item > details > summary::after {
    display: inline-block; margin-left: 0.255em; vertical-align: 0.255em; content: "";
    border-top: 0.3em solid; border-right: 0.3em solid transparent;
    border-bottom: 0; border-left: 0.3em solid transparent;
}
.qf-nav__item > details > summary:hover,
.qf-nav__item > details[open] > summary,
.qf-nav__link:hover { color: #074180; }

.qf-nav__menu {
    position: absolute; top: 100%; left: 0; z-index: 40;
    min-width: 260px; max-height: 70vh; overflow-y: auto;
    margin: 0; padding: 0; list-style: none;
    background: #F1F6FB; border: 1px solid rgba(0, 0, 0, 0.1); border-right: 0; border-radius: 0;
}
.qf-nav__menu--wide { min-width: 340px; }
.qf-nav__menu a {
    display: block; padding: 8px 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: #000; font-size: 12px; font-weight: 500; text-decoration: none;
}
.qf-nav__menu li:last-child a { border-bottom: 0; }
.qf-nav__menu a:hover {
    background-color: #074180; color: #fff; border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* The burger only exists on small screens; above that the list is the nav.
   It is a checkbox + label rather than a <details>, because a closed <details>
   hides its content whatever CSS says about its <summary>. */
.qf-nav__toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.qf-nav__burger { display: none; }

@media (max-width: 991.98px) {
    .qf-header__inner { min-height: 84px; }
    .qf-header__logo img { height: 72px; }
    .qf-nav { flex: 0 0 auto; order: 3; width: 100%; }
    .qf-nav__burger {
        display: inline-flex; align-items: center; gap: 8px;
        padding: 9px 14px; margin-bottom: 10px; cursor: pointer;
        border: 1px solid var(--qf-line); border-radius: 8px;
        color: var(--qf-navy); font-size: 15px; font-weight: 600;
    }
    .qf-nav__toggle:focus-visible ~ .qf-nav__burger { outline: 2px solid var(--qf-teal); outline-offset: 2px; }
    .qf-nav__list { display: none; }
    .qf-nav__toggle:checked ~ .qf-nav__list {
        display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 10px;
    }
    .qf-nav__item > details > summary,
    .qf-nav__link { width: 100%; justify-content: space-between; padding: 12px 4px; }
    .qf-nav__menu {
        position: static; min-width: 0; max-height: none; margin: 0 0 6px;
        background: #F1F6FB; border-right: 1px solid rgba(0, 0, 0, 0.1);
    }
    .qf-nav__menu a { color: #000; }
    .qf-nav__menu a:hover { background-color: #074180; color: #fff; }
}

/* Footer ---------------------------------------------------------------- */
/* Values mirror .footer-top / .footer-bottom in the site stylesheet. */
.qf-footer { margin-top: 60px; background: var(--qf-bg); }
.qf-footer__top { padding: 40px 0 20px; background-color: #09478a; color: #fff; }
.qf-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 32px;
    padding-bottom: 40px;
}
.qf-footer__brand img { display: block; height: 97px; width: auto; margin-bottom: 10px; }
.qf-footer__brand p { margin: 0; color: #fff; font-size: 13px; line-height: 20px; max-width: 320px; }
.qf-footer__badge { display: inline-block; margin-top: 16px; }
.qf-footer__badge img { display: block; height: auto; max-width: 150px; margin: 0; }

.qf-footer__title {
    margin: 0 0 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: underline;
    text-transform: uppercase;
}
.qf-footer__col ul { list-style: none; margin: 0; padding: 0; }
.qf-footer__col li { padding-bottom: 10px; }
.qf-footer__col li:last-child { padding-bottom: 0; }
.qf-footer__col a {
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}
.qf-footer__col a::before { content: "\25B8"; margin-right: 6px; }
.qf-footer__col a:hover { color: #10b098; }

.qf-footer__contact li { padding-bottom: 10px; color: #fff; font-size: 13px; }
.qf-footer__contact li:last-child { padding-bottom: 0; }
.qf-footer__contact a { color: #fff; font-size: 13px; }
.qf-footer__contact a::before { content: none; }
.qf-footer__contact a:hover { color: #10b098; }
.qf-footer__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; margin-right: 2px;
    border-radius: 100%; background-color: #10b098; color: #fff;
}
.qf-footer__hours { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.7); font-size: 12px; }

.qf-footer__social { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 6px; }
.qf-footer__social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border: 1px solid #fff; border-radius: 4px;
    color: #fff; font-size: 12px;
}
.qf-footer__social a:hover { background-color: #10b098; color: #fff; }

.qf-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 15px 0;
    color: #000;
    font-size: 13px;
    text-align: center;
}
.qf-footer__bottom p { margin: 0; }
.qf-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.qf-footer__bottom li { position: relative; }
.qf-footer__bottom li:not(:last-child)::after {
    position: absolute; content: ""; width: 1px; height: 8px; right: -9px; top: 50%;
    transform: translateY(-50%); background-color: #000;
}
.qf-footer__bottom a { color: #000; font-size: 12px; font-weight: 600; text-decoration: none; }
.qf-footer__bottom a:hover { color: #10b098; }

@media (max-width: 991.98px) {
    .qf-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
    .qf-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 575.98px) {
    .qf-footer { margin-top: 40px; padding-top: 36px; }
    .qf-footer__grid { grid-template-columns: minmax(0, 1fr); }
    .qf-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Stepper --------------------------------------------------------------- */
.qf-stepband { background: #f7fafd; border-bottom: 1px solid #e8eef5; padding: 18px 0; }
.qf-steps__list { display: flex; align-items: center; justify-content: center; list-style: none; margin: 0; padding: 0; }
.qf-steps__item { display: flex; align-items: center; }
.qf-steps__dot {
    width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #dde5ee; border-radius: 50%; background: #fff;
    font-size: 17px; font-weight: 700; color: var(--qf-faint); text-decoration: none;
}
.qf-steps__dot.is-done { background: var(--qf-teal); border-color: var(--qf-teal); color: #fff; }
.qf-steps__dot.is-current {
    background: var(--qf-teal); border-color: var(--qf-teal); color: #fff;
    transform: scale(1.14); box-shadow: 0 0 0 6px rgba(16, 176, 152, 0.16);
}
.qf-steps__dot.is-locked { background: #f4f7fa; }
a.qf-steps__dot:hover { border-color: var(--qf-teal); }
.qf-steps__track { width: 84px; height: 3px; margin: 0 10px; border-radius: 99px; background: #dde5ee; }
.qf-steps__track.is-done { background: var(--qf-teal); }

/* Page head ------------------------------------------------------------- */
.qf-page { padding: 40px 16px 64px; }
.qf-head { margin-bottom: 26px; }
.qf-eyebrow {
    margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--qf-teal);
}
.qf-title { margin: 0; font-size: 42px; line-height: 1.12; font-weight: 700; color: var(--qf-navy); letter-spacing: -0.01em; }
.qf-sub { margin: 10px 0 0; font-size: 17px; color: var(--qf-muted); }

/* Inline SVG icons ------------------------------------------------------ */
.qf-icon { width: 1em; height: 1em; display: block; flex: 0 0 auto; }

/* Two-column layout ----------------------------------------------------- */
.qf-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.qf-layout__side { position: sticky; top: 20px; }

/* Card and fields ------------------------------------------------------- */
.qf-card { background: #fff; border: 1px solid var(--qf-line); border-radius: 14px; padding: 30px 32px 0; }
.qf-card__foot {
    display: flex; align-items: center; gap: 12px;
    margin: 26px -32px 0; padding: 18px 32px; border-top: 1px solid #eef3f8;
}
.qf-card__foot-icon {
    flex: 0 0 auto; width: 40px; height: 40px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 50%; background: var(--qf-tint); color: var(--qf-teal); font-size: 17px;
}
.qf-card__foot strong { display: block; font-size: 14px; color: var(--qf-ink); }
.qf-card__foot span span, .qf-card__foot > span:last-child { font-size: 13px; color: var(--qf-muted); }

/* Sidebar --------------------------------------------------------------- */
.qf-side { background: #fff; border: 1px solid var(--qf-line); border-radius: 14px; padding: 22px 24px; }
.qf-side__heading {
    display: flex; align-items: center; gap: 10px; margin: 0 0 4px;
    font-size: 20px; font-weight: 700; color: var(--qf-navy);
}
.qf-side__heading .qf-icon { font-size: 20px; color: var(--qf-teal); }

.qf-side__rows { list-style: none; margin: 14px 0 0; padding: 0; }
.qf-side__rows li { display: flex; gap: 14px; padding: 13px 0; }
.qf-side__rows li + li { border-top: 1px solid #eef3f8; }
.qf-side__icon {
    flex: 0 0 auto; width: 40px; height: 40px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 50%; background: var(--qf-tint); color: var(--qf-teal); font-size: 17px;
}
.qf-side__pair { min-width: 0; }
.qf-side__value { display: block; font-size: 16px; font-weight: 700; color: var(--qf-navy); word-break: break-word; }
.qf-side__value.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.03em; }
.qf-side__label { display: block; margin-top: 2px; font-size: 13px; color: var(--qf-muted); }
.qf-side__sub { display: block; margin-top: 2px; font-size: 12px; color: var(--qf-faint); }
.qf-side__empty { margin: 14px 0 0; font-size: 13px; color: var(--qf-muted); }

.qf-side__progress { margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef3f8; }
.qf-side__progress-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--qf-muted); }
.qf-side__pct { font-weight: 700; color: var(--qf-navy); }
.qf-side__bar { margin-top: 8px; height: 6px; border-radius: 99px; background: #e8eef5; overflow: hidden; }
.qf-side__bar span { display: block; height: 100%; border-radius: 99px; background: var(--qf-teal); }
.qf-side__saved { margin: 14px 0 0; font-size: 12px; color: #0d8f7c; }

.qf-side__help { display: flex; gap: 12px; margin-top: 18px; padding: 16px; background: var(--qf-tint); border-radius: 12px; }
.qf-side__help-icon { flex: 0 0 auto; color: var(--qf-teal); font-size: 24px; }
.qf-side__help-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--qf-navy); }
.qf-side__help-body { margin: 2px 0 8px; font-size: 13px; color: #55677a; }
.qf-side__alt { font-size: 14px; font-weight: 600; color: var(--qf-teal); text-decoration: none; }
.qf-side__alt:hover { color: var(--qf-navy); }

/* Sidebar, help variant (coverage step) */
.qf-side--help { background: #f7fbfd; text-align: center; padding: 30px 26px; }
.qf-side__art {
    width: 108px; height: 108px; margin: 0 auto 18px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 50%; background: #e3f2f7; color: var(--qf-navy); font-size: 44px;
}
.qf-side__title { margin: 0; font-size: 22px; font-weight: 700; color: var(--qf-navy); }
.qf-side__body { margin: 10px auto 0; max-width: 260px; font-size: 15px; color: #55677a; }
.qf-side__cta { width: 100%; margin-top: 20px; }
.qf-side__cta .qf-icon { font-size: 17px; }
.qf-side__or { position: relative; margin: 18px 0; font-size: 14px; color: var(--qf-faint); }
.qf-side__or::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--qf-line); }
.qf-side__or span { position: relative; padding: 0 12px; background: #f7fbfd; }

.qf-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 20px; }
.qf-field { grid-column: span 12; margin-bottom: 22px; }
.qf-field--half { grid-column: span 6; }
.qf-field--third { grid-column: span 4; }
.qf-field--quarter { grid-column: span 3; }

.qf-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--qf-ink); }
/* The required-field mark. Every screen of the flow shows it on the same
   terms, so what must be answered reads the same whether or not the visitor
   is signed in - the register page already marked its own fields this way. */
.qf-req { margin-left: 2px; color: #c0392b; font-weight: 600; }
/* "You already have an account" under the email box: a steer, not a refusal,
   so it is toned like a note rather than an error. */
.qf-hidden { display: none !important; }
.qf-account-notice {
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid #f0d8a8;
    border-radius: 8px;
    background: #fdf7e8;
    font-size: 13px;
    line-height: 1.5;
    color: #7a5a12;
}
.qf-account-notice__link { margin-left: 6px; font-weight: 600; color: var(--qf-navy); text-decoration: underline; }
/* The note above the confirmation buttons when the address already has an
   account, sized like the lede it sits under. */
.qf-done__note {
    margin: 22px auto 0;
    max-width: 600px;
    font-size: 15px;
    color: var(--qf-muted);
}
.qf-optional { color: var(--qf-faint); font-weight: 400; }

.qf-input {
    width: 100%; min-height: 48px; padding: 10px 14px;
    border: 1px solid #dbe4ee; border-radius: 8px; background: #fff;
    font-family: inherit; font-size: 15px; color: var(--qf-ink);
}
.qf-input::placeholder { color: var(--qf-faint); }
.qf-input:focus { outline: none; border-color: var(--qf-teal); box-shadow: 0 0 0 3px rgba(16, 176, 152, 0.18); }
.qf-input.is-invalid { border-color: #c0392b; }
/* Flashed on the fields a chosen suggestion just filled. */
@keyframes qf-autofill { from { background: #d8f3ec; } to { background: #fff; } }
.qf-input.is-autofilled { animation: qf-autofill 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .qf-input.is-autofilled { animation: none; } }
select.qf-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--qf-faint) 50%), linear-gradient(135deg, var(--qf-faint) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; }

.qf-phone { display: flex; gap: 10px; }
.qf-phone__prefix {
    display: inline-flex; align-items: center; padding: 0 16px; min-height: 48px;
    border: 1px solid #dbe4ee; border-radius: 8px; background: #fff; font-weight: 500;
}

/* Address type-ahead. Only ever shown when the enhancement script is
   running - the markup carries `hidden` until then. */
.qf-search { position: relative; }
/* The lookup reads as its own thing, not as one more field in the column. */
.qf-search--panel {
    padding: 18px 20px 14px;
    background: var(--qf-tint);
    border: 1px solid #dbe9f2;
    border-radius: 12px;
}
.qf-search--panel .qf-input { background: #fff; }
.qf-search--panel .qf-note { color: #5c7186; }
.qf-search__box { position: relative; }
.qf-search__icon {
    position: absolute; top: 50%; left: 14px; transform: translateY(-50%);
    color: var(--qf-faint); pointer-events: none;
}
.qf-search__icon .qf-icon { width: 18px; height: 18px; display: block; }
.qf-search__input { padding-left: 42px; padding-right: 42px; }

/* Progress while the lookup runs. Starts on the keystroke rather than when
   the request goes out, so the debounce pause is not dead air. */
.qf-search__spinner {
    position: absolute; top: 50%; right: 14px;
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid #cfe3ee; border-top-color: var(--qf-teal);
    animation: qf-spin 0.7s linear infinite;
}
@keyframes qf-spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to   { transform: translateY(-50%) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .qf-search__spinner { animation: qf-blink 1.1s ease-in-out infinite; transform: translateY(-50%); }
}
@keyframes qf-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.qf-search__status { color: var(--qf-navy); font-weight: 500; }
.qf-search__results {
    position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
    max-height: 280px; overflow-y: auto;
    margin: 0; padding: 6px; list-style: none;
    background: #fff; border: 1px solid #dbe4ee; border-radius: 10px;
    box-shadow: 0 16px 40px rgba(6, 42, 82, 0.16);
}
.qf-search__option {
    padding: 10px 12px; border-radius: 6px;
    font-size: 14px; color: var(--qf-ink); cursor: pointer;
}
.qf-search__option.is-active { background: var(--qf-tint); color: var(--qf-navy); }
.qf-search__note { color: #c0392b; }

.qf-note { margin: 6px 0 0; font-size: 12px; color: var(--qf-faint); }
.qf-error { margin: 6px 0 0; font-size: 13px; color: #c0392b; }
.qf-error--block { margin-bottom: 16px; }

.qf-check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; cursor: pointer; }
.qf-check input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--qf-teal); flex: 0 0 auto; }

/* Blocks within a card -------------------------------------------------- */
.qf-block { padding-bottom: 6px; margin-bottom: 24px; border-bottom: 1px solid #eef3f8; }
.qf-block--last { border-bottom: 0; margin-bottom: 0; }
.qf-block__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.qf-block__icon {
    flex: 0 0 auto; width: 46px; height: 46px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 12px; background: var(--qf-tint); font-size: 20px;
}
.qf-block__title { margin: 0; font-size: 20px; font-weight: 700; color: var(--qf-navy); }
.qf-block__sub { margin: 2px 0 0; font-size: 14px; color: var(--qf-muted); }

/* Risk questions -------------------------------------------------------- */
.qf-risks { list-style: none; margin: 0; padding: 0; }
.qf-risk {
    display: flex; align-items: center; gap: 20px; padding: 20px 22px; margin-bottom: 16px;
    background: #fbfdfe; border: 1px solid var(--qf-line); border-radius: 12px;
}
.qf-risk__icon {
    flex: 0 0 auto; width: 56px; height: 56px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 50%; background: #eef5fb; color: var(--qf-teal); font-size: 22px;
}
.qf-risk__body { flex: 1 1 auto; min-width: 0; }
.qf-risk__q { margin: 0; font-size: 18px; font-weight: 600; color: var(--qf-navy); }
.qf-risk__help { margin: 6px 0 0; font-size: 13px; color: var(--qf-muted); }
.qf-risk__choices { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }

.qf-choice { position: relative; }
.qf-choice input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.qf-choice span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 88px;
    padding: 13px 18px; border: 1px solid #dbe4ee; border-radius: 10px; background: #fff;
    font-size: 15px; font-weight: 600; color: var(--qf-ink);
}
.qf-choice input:hover + span { border-color: var(--qf-teal); }
.qf-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(16, 176, 152, 0.3); }
.qf-choice input:checked + span { background: var(--qf-teal); border-color: var(--qf-teal); color: #fff; }
.qf-choice--quiet span { min-width: 0; border: 0; background: none; color: var(--qf-faint); font-size: 13px; padding: 13px 6px; }
.qf-choice--quiet input:checked + span { background: none; color: var(--qf-teal); text-decoration: underline; }

/* Coverage -------------------------------------------------------------- */
.qf-date { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid #eef3f8; }
.qf-date__wrap { position: relative; }
.qf-date__wrap .qf-input { padding-right: 46px; }
/* Rendered but invisible: showPicker() refuses to open for an element that is
   not being rendered, so this cannot be display:none. */
.qf-date__native {
    position: absolute; right: 12px; bottom: 0;
    width: 1px; height: 1px; padding: 0; border: 0;
    opacity: 0; pointer-events: none;
}
.qf-date__btn {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    background: none; border: 0; border-radius: 8px;
    color: var(--qf-faint); cursor: pointer;
}
.qf-date__btn:hover { background: var(--qf-tint); color: var(--qf-navy); }
.qf-date__btn:focus-visible { outline: 2px solid var(--qf-teal); outline-offset: 1px; }
.qf-date__btn .qf-icon { width: 20px; height: 20px; }

.qf-banner { display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-bottom: 26px; background: var(--qf-tint); border-radius: 12px; }
.qf-banner__icon {
    flex: 0 0 auto; width: 44px; height: 44px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 50%; background: var(--qf-teal); color: #fff; font-size: 18px;
}
.qf-banner__title { margin: 0; font-size: 17px; font-weight: 700; color: var(--qf-navy); }
.qf-banner__sub { margin: 2px 0 0; font-size: 14px; color: #55677a; }
.qf-banner__link { color: var(--qf-teal-dark); font-weight: 600; text-decoration: underline; }
.qf-banner__link:hover { color: var(--qf-navy); }

/* The suggestion banner leads the step, so it carries the brand gradient
   rather than the flat tint the other notices use. */
.qf-banner--pick {
    background: linear-gradient(122deg, #073567 0%, #09478a 48%, #0d8f7c 100%);
    box-shadow: 0 14px 30px rgba(9, 71, 138, 0.22);
}
.qf-banner--pick .qf-banner__icon { background: rgba(255, 255, 255, 0.2); }
.qf-banner--pick .qf-banner__title { color: #fff; }
.qf-banner--pick .qf-banner__sub { color: rgba(255, 255, 255, 0.82); }

/* Groups ---------------------------------------------------------------- */
.qf-cover-group { margin-bottom: 28px; }
.qf-cover-group:last-child { margin-bottom: 0; }
.qf-cover-group__title {
    display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
    padding-bottom: 10px; border-bottom: 1px solid var(--qf-line);
    color: var(--qf-navy); font-size: 12.5px; font-weight: 700;
    letter-spacing: 0.07em; text-transform: uppercase;
}
.qf-cover-group__count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
    background: var(--qf-tint); color: var(--qf-teal-dark);
    font-size: 11.5px; letter-spacing: 0;
}
.qf-cover-group--recommended .qf-cover-group__title::before,
.qf-cover-group--optional .qf-cover-group__title::before,
.qf-cover-group--other .qf-cover-group__title::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--qf-teal);
}
.qf-cover-group--optional .qf-cover-group__title::before { background: #2f7dd1; }
.qf-cover-group--other .qf-cover-group__title::before { background: #c4d2e0; }

.qf-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.qf-cover {
    position: relative; display: flex; gap: 14px; padding: 20px; background: #fff;
    border: 1px solid var(--qf-line); border-radius: 14px; cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.qf-cover:hover {
    border-color: #b7e6dd;
    box-shadow: 0 10px 22px rgba(9, 71, 138, 0.08);
    transform: translateY(-2px);
}
.qf-cover input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qf-cover__box {
    flex: 0 0 auto; width: 24px; height: 24px; margin-top: 2px;
    border: 2px solid #cfdae6; border-radius: 6px; background: #fff;
}
.qf-cover input:checked ~ .qf-cover__box { background: var(--qf-teal); border-color: var(--qf-teal); }
.qf-cover input:checked ~ .qf-cover__box::after {
    content: ""; display: block; width: 6px; height: 11px; margin: 2px auto 0;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.qf-cover input:focus-visible ~ .qf-cover__box { box-shadow: 0 0 0 3px rgba(16, 176, 152, 0.3); }
.qf-cover.is-selected, .qf-cover:has(input:checked) {
    border-color: var(--qf-teal); background: #f3fbf9;
    box-shadow: 0 0 0 1px var(--qf-teal), 0 10px 24px rgba(16, 176, 152, 0.16);
}
/* The icon fills in with the card, so a chosen policy reads at a glance. */
.qf-cover__icon {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--qf-tint); color: var(--qf-teal);
    transition: background 0.18s ease, color 0.18s ease;
}
.qf-cover:has(input:checked) .qf-cover__icon,
.qf-cover.is-selected .qf-cover__icon { background: var(--qf-teal); color: #fff; }
.qf-cover__body { min-width: 0; }
.qf-cover__name { display: block; font-size: 16px; font-weight: 700; color: var(--qf-navy); }
.qf-cover__why { display: block; margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--qf-muted); }

.qf-tag {
    display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 99px;
    background: var(--qf-teal); color: #fff; font-size: 10px; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle;
}
.qf-tag--muted { background: #eef2f7; color: #55677a; }

@media (prefers-reduced-motion: reduce) {
    .qf-cover, .qf-cover__icon { transition: none; }
    .qf-cover:hover { transform: none; }
}

/* Review ---------------------------------------------------------------- */
.qf-review { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #eef3f8; }
.qf-review:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.qf-review__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.qf-review__title { margin: 0; font-size: 17px; font-weight: 700; color: var(--qf-navy); }
.qf-review__edit { font-size: 13px; font-weight: 600; color: var(--qf-teal); text-decoration: none; }
.qf-review__edit:hover { text-decoration: underline; }
.qf-review__rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0; }
.qf-review__rows dt { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--qf-faint); }
.qf-review__rows dd { margin: 2px 0 0; font-size: 15px; color: var(--qf-ink); word-break: break-word; }


/* Action bar ------------------------------------------------------------
   Pinned to the bottom of the viewport so the way forward is always in reach.
   The page gets bottom padding so the bar never covers the last field. */
.qf-actionbar {
    position: sticky; bottom: 0; z-index: 30;
    margin: 24px -16px 0; padding: 16px 0;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--qf-line);
    backdrop-filter: blur(6px);
}
.qf-actionbar__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* The declaration above the submit buttons. One plain sentence, and the whole
   panel lights up once it is ticked so the state is unmistakable. */
.qf-confirm { padding: 0 0 14px; }
.qf-confirm__box {
    display: flex; align-items: flex-start; gap: 14px;
    max-width: 780px; padding: 16px 20px;
    background: #fff; border: 1px solid #dbe4ee; border-radius: 12px;
    cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease;
}
.qf-confirm__box:hover { border-color: var(--qf-teal); }
.qf-confirm__box:has(input:checked) { background: var(--qf-tint); border-color: var(--qf-teal); }

/* The real checkbox stays in the accessibility tree and keeps its keyboard
   behaviour; the square beside it is what gets drawn. */
.qf-confirm__box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qf-confirm__tick {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; margin-top: 1px;
    border: 2px solid #c3d2e0; border-radius: 7px; background: #fff;
    color: transparent; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.qf-confirm__tick .qf-icon { width: 15px; height: 15px; stroke-width: 3; }
.qf-confirm__box:has(input:checked) .qf-confirm__tick {
    background: var(--qf-teal); border-color: var(--qf-teal); color: #fff;
}
.qf-confirm__box:has(input:focus-visible) .qf-confirm__tick {
    outline: 2px solid var(--qf-teal); outline-offset: 2px;
}

.qf-confirm__text { font-size: 14px; line-height: 1.6; color: #5c7186; }
.qf-confirm__text strong { display: block; margin-bottom: 2px; font-size: 16px; color: var(--qf-navy); }

.qf-confirm .qf-error { margin-left: 38px; }

@media (prefers-reduced-motion: reduce) {
    .qf-confirm__box, .qf-confirm__tick { transition: none; }
}

.qf-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.qf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 28px; border: 1px solid transparent; border-radius: 8px;
    font-family: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.qf-btn--primary { background: var(--qf-teal); border-color: var(--qf-teal); color: #fff; }
.qf-btn--primary:hover { background: var(--qf-teal-dark); border-color: var(--qf-teal-dark); color: #fff; }
.qf-btn--ghost { background: #fff; border-color: #cfdae6; color: var(--qf-navy); }
.qf-btn--ghost:hover { border-color: var(--qf-navy); }
/* Existing-business picker on the business step: "+ New business" swaps the
   dropdown out for the plain legal-name field, and back again. */
.qf-link { font-size: 13px; font-weight: 600; color: var(--qf-teal); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.qf-link:hover { text-decoration: underline; }
.qf-business-picker__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.qf-business-picker__head .qf-label { margin-bottom: 0; }
#business_name_wrap .qf-link { display: inline-block; margin-top: 8px; }

/* While a step is posting in the background. The arrow is swapped for a
   spinner so the button itself carries the progress, and both buttons go
   inert so a double click cannot submit twice. */
.qf-btn:disabled { opacity: 0.7; cursor: progress; }
form.is-submitting .qf-btn--primary > span { display: none; }
form.is-submitting .qf-btn--primary::after {
    content: ""; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff;
    animation: qf-spin-btn 0.7s linear infinite;
}
@keyframes qf-spin-btn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    form.is-submitting .qf-btn--primary::after { animation: qf-blink 1.1s ease-in-out infinite; }
}

/* Alerts ---------------------------------------------------------------- */
.qf-alert { padding: 16px 20px; margin-bottom: 22px; border-radius: 10px; border: 1px solid transparent; }
.qf-alert--error { background: #fdecec; border-color: #f7c8c8; color: #a12020; }
.qf-alert__title { margin: 0 0 6px; font-weight: 700; }
.qf-alert ul { margin: 0; padding-left: 20px; }

/* Confirmation ---------------------------------------------------------- */
.qf-done {
    max-width: 840px; margin: 0 auto; padding: 48px 56px 40px; text-align: center;
    background: #fff; border-radius: 18px; box-shadow: 0 10px 40px rgba(9, 71, 138, 0.07);
}
.qf-done__tick {
    width: 96px; height: 96px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--qf-teal); color: #fff; font-size: 44px;
    box-shadow: 0 0 0 12px var(--qf-tint);
}
.qf-done__title { margin: 30px 0 0; font-size: 40px; line-height: 1.15; font-weight: 700; color: var(--qf-navy); }
.qf-done__lede { margin: 14px auto 0; max-width: 600px; font-size: 17px; color: var(--qf-muted); }
.qf-done__facts {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px;
    margin: 34px 0 0; padding: 26px 30px; background: #f7fafd; border-radius: 12px; text-align: left;
}
.qf-done__facts dt { font-size: 14px; color: var(--qf-muted); }
.qf-done__facts dd { margin: 2px 0 0; font-size: 17px; font-weight: 700; color: var(--qf-navy); }
.qf-done__facts .is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; }

.qf-track { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 34px 0 0; padding: 0; }
.qf-track li { position: relative; padding-top: 34px; }
.qf-track__dot {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #dde5ee; border-radius: 50%; background: #fff; color: #fff; font-size: 11px;
}
.qf-track li.is-done .qf-track__dot { background: var(--qf-teal); border-color: var(--qf-teal); }
.qf-track li.is-current .qf-track__dot { border-color: var(--qf-teal); box-shadow: inset 0 0 0 4px var(--qf-teal); }
.qf-track strong { display: block; font-size: 16px; color: var(--qf-navy); }
.qf-track em { display: block; margin-top: 4px; font-size: 14px; font-style: normal; color: var(--qf-faint); }
.qf-track li.is-done em, .qf-track li.is-current em { color: var(--qf-teal); }

.qf-done__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 34px; padding-top: 30px; border-top: 1px solid #eef3f8; }
.qf-done__actions .qf-btn { min-width: 240px; }
.qf-done__home { display: inline-block; margin-top: 22px; font-weight: 600; color: #1a73e8; text-decoration: none; }
.qf-done__home:hover { text-decoration: underline; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 991.98px) {
    /* Summary drops under the form rather than squeezing it. */
    .qf-layout { grid-template-columns: minmax(0, 1fr); }
    .qf-layout__side { position: static; }
}

@media (max-width: 767.98px) {
    .qf-title { font-size: 28px; }
    .qf-sub { font-size: 15px; }
    .qf-card { padding: 22px 18px 0; }
    .qf-card__foot { margin: 22px -18px 0; padding: 16px 18px; }
    .qf-actionbar__row { flex-direction: column-reverse; align-items: stretch; }
    .qf-actionbar__row .qf-btn { width: 100%; }
    .qf-field--half, .qf-field--third, .qf-field--quarter { grid-column: span 12; }

    .qf-steps__dot { width: 38px; height: 38px; font-size: 15px; }
    .qf-steps__track { width: 24px; margin: 0 6px; }

    .qf-risk { flex-wrap: wrap; gap: 14px; padding: 16px; }
    .qf-risk__icon { width: 44px; height: 44px; font-size: 18px; }
    .qf-risk__body { flex: 1 1 calc(100% - 58px); }
    .qf-risk__choices { flex: 1 1 100%; }
    .qf-choice { flex: 1 1 0; }
    .qf-choice span { width: 100%; min-width: 0; }

    .qf-review__rows { grid-template-columns: minmax(0, 1fr); }

    .qf-actions { flex-direction: column-reverse; align-items: stretch; }
    .qf-actions .qf-btn { width: 100%; }

    .qf-done { padding: 32px 20px; border-radius: 12px; }
    .qf-done__title { font-size: 26px; }
    .qf-done__facts { grid-template-columns: minmax(0, 1fr); padding: 18px; }
    .qf-track { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .qf-track li { padding-top: 0; padding-left: 36px; text-align: left; }
    .qf-track__dot { top: 2px; left: 0; transform: none; }
    .qf-done__actions .qf-btn { min-width: 0; width: 100%; }
}
