/* ✅ MK Created 2026-10-22: ads landing form (/quote).
   ✅ MK Redesigned 2026-10-24 ("very basic ... needs to be extra extra better, nice background"):
   warm illustrated backdrop, the form on a crisp card, Stories-style step bars, big icon tiles, a "What happens next"
   panel on wide screens; on phones the card fills the screen like an app with a sticky thumb-zone Next button.
   Design rules: black + orange, green only for done/verified, buttons 46 (master) / 40 / 34 px, 6px button corners,
   flat (no drop shadows), press scale .98, 3-dot loading, inputs 16px+ so iPhones never zoom. */
:root {
  --ink: #181512;
  --ink-2: #4a4540;
  --muted: #75726c;
  --line: #ebe7df;
  --line-strong: #d9d4ca;
  --soft: #f6f3ec;
  --cream: #f6f3ec;
  --orange: #ea6a16;
  --orange-d: #c8510c;
  --orange-soft: #fff1e6;
  --red: #c43d2b;
  --good: #138a55;
  --good-soft: #e8f5ee;
  --h: 46px;
  --h-md: 40px;
  --h-sm: 34px;
  --r: 6px;
  --card-r: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.qf-lock { overflow: hidden; }
body.qf-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--orange-d); }
button { font: inherit; color: inherit; }
.app-icon { width: 20px; height: 20px; flex: 0 0 auto; }
[hidden] { display: none !important; }

/* ---------- backdrop: cream, a soft dot grid, warm glow, our illustrated street along the bottom ---------- */
.qf-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(234, 106, 22, .10), transparent 70%),
    radial-gradient(700px 480px at 100% 10%, rgba(234, 106, 22, .06), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(24, 21, 18, .07) 1px, transparent 1.4px) 0 0 / 22px 22px,
    var(--cream);
}
.qf-bg-scene {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(46vh, 400px);
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 100%;
  opacity: .4;
  filter: blur(.6px) saturate(.9);
  -webkit-mask-image: linear-gradient(to top, #000 45%, transparent);
  mask-image: linear-gradient(to top, #000 45%, transparent);
}

/* ---------- top bar ---------- */
.qf-top { position: relative; z-index: 20; }
.qf-top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1040px, 100%);
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}
.qf-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.qf-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0; }
.qf-top-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--h-sm);
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.qf-top-note .app-icon { width: 17px; height: 17px; color: var(--orange); }
.qf-top-step { display: none; color: var(--ink-2); font-size: 14px; font-weight: 700; }

/* ---------- layout: the card + the side panel ---------- */
.qf { position: relative; z-index: 1; padding: 8px 24px 72px; }
.qf-shell {
  display: grid;
  grid-template-columns: minmax(0, 620px) 340px;
  justify-content: center;
  align-items: start;
  gap: 28px;
  width: min(1040px, 100%);
  margin: 0 auto;
}
.qf-card {
  min-width: 0;
  padding: 22px 32px 30px;
  border: 1px solid rgba(24, 21, 18, .08);
  border-radius: var(--card-r);
  background: #fff;
}
.qf-col { min-width: 0; }
.qf-card-head { margin: 0 0 22px; }
.qf-step { min-height: 18px; margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .01em; }

/* Stories-style bars: one per step, done = full, current fills in, "Sent" = all green */
.qf-bars { display: flex; gap: 5px; height: 5px; }
.qf-bar { position: relative; flex: 1; overflow: hidden; border-radius: 3px; background: #ece8e0; }
.qf-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: var(--orange); transition: width .5s var(--ease), background .3s ease; }
.qf-bar.is-done i, .qf-bar.is-cur i { width: 100%; }
.qf-bar.is-cur i { transition-duration: .7s; }
.qf-bar.is-wait i { width: 100%; animation: qf-bar-wait 1s ease-in-out infinite; }
@keyframes qf-bar-wait { 50% { opacity: .45; } }
.qf-bars.is-sent .qf-bar i { background: var(--good); }

/* ---------- step body + transitions ---------- */
.qf-body.is-in { animation: qf-in .38s var(--ease); }
.qf-body.is-back { animation: qf-back .38s var(--ease); }
@keyframes qf-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes qf-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.qf-kicker { display: block; margin-bottom: 8px; color: var(--orange-d); font-size: 14px; font-weight: 700; }
.qf-title { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.qf-sub { margin: 8px 0 0; color: var(--ink-2); font-size: 16.5px; }
.qf-flash { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #f3c9c2; border-radius: var(--r); background: #fdf1ef; color: var(--red); font-weight: 600; }
.qf-loading { display: flex; justify-content: center; gap: 6px; padding: 60px 0; }
.qf-loading span { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); animation: qf-dot 1s infinite ease-in-out; }
.qf-loading span:nth-child(2) { animation-delay: .15s; }
.qf-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes qf-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }

/* the picked job's chip (icon + name) on the later steps */
.qf-job {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  height: var(--h-sm);
  margin: 0 0 12px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.qf-job-ic { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--orange); color: #fff; }
.qf-job-ic .app-icon { width: 15px; height: 15px; }
.qf-job-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- inputs ---------- */
.qf-input {
  width: 100%;
  height: var(--h);
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.qf-input::placeholder { color: #9b968e; }
.qf-input:focus { border-color: var(--ink); outline: 3px solid rgba(234, 106, 22, .22); outline-offset: 0; }
.qf-input.is-bad { border-color: var(--red); background: #fffafa; }
.qf-textarea { height: 140px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.qf-label { display: block; margin: 0 0 6px; color: var(--ink); font-size: 15px; font-weight: 700; }
.qf-err { margin: 12px 0 0; color: var(--red); font-size: 15px; font-weight: 600; }
.qf-err:empty { display: none; }
.qf-err.is-good { color: var(--good); }
.qf-note { min-height: 22px; margin: 10px 0 0; color: var(--good); font-size: 15px; font-weight: 600; }
.qf-note:empty { visibility: hidden; }

/* ZIP step: the picture on top, one big field */
.qf-hero { height: 210px; margin: 0 0 20px; overflow: hidden; border-radius: 12px; background: #efeae1; }
.qf-hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; animation: qf-hero-in .9s var(--ease); }
@keyframes qf-hero-in { from { opacity: 0; transform: scale(1.04); } }
.qf-zip { position: relative; width: min(380px, 100%); margin: 22px 0 0; }
.qf-zip .qf-input { height: 58px; padding: 0 48px; font-size: 22px; font-weight: 700; letter-spacing: .1em; }
.qf-zip-ic, .qf-zip-ok { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; pointer-events: none; }
.qf-zip-ic { left: 15px; color: var(--orange); }
.qf-zip-ok { right: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--good); color: #fff; opacity: 0; transform: translateY(-50%) scale(.6); transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1.3); }
.qf-zip-ok .app-icon { width: 16px; height: 16px; stroke-width: 3; }
.qf-zip.is-ok .qf-zip-ok { opacity: 1; transform: translateY(-50%) scale(1); }
.qf-zip.is-ok .qf-input { border-color: var(--good); }

/* "What do you need help with?" tiles: big tap tiles, icon on top, a check badge when picked */
.qf-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.qf-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 96px;
  padding: 12px 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.qf-tile b { display: block; max-width: 100%; font-size: 14px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.qf-tile-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: var(--soft); color: var(--ink); transition: background .15s ease, color .15s ease; }
.qf-tile-ic .app-icon { width: 21px; height: 21px; }
.qf-tile-ok {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .15s ease, transform .22s cubic-bezier(.2, .8, .2, 1.4);
}
.qf-tile-ok .app-icon { width: 13px; height: 13px; stroke-width: 3; }
.qf-tile:not(.is-sel):hover { border-color: var(--ink); }
.qf-tile:not(.is-sel):hover .qf-tile-ic { background: var(--orange-soft); color: var(--orange-d); }
.qf-tile:active, .qf-opt:active, .qf-btn:active, .qf-own:active { transform: scale(.98); }
.qf-tile.is-sel { border-color: var(--orange); outline: 1px solid var(--orange); outline-offset: -2px; background: var(--orange-soft); }
.qf-tile.is-sel .qf-tile-ic { background: var(--orange); color: #fff; }
.qf-tile.is-sel .qf-tile-ok { opacity: 1; transform: none; }
.qf-other { margin-top: 10px; }
.qf-own {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: var(--h);
  margin-top: 10px;
  padding: 0 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  background: var(--soft);
  color: var(--ink-2);
  font-size: 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, color .15s ease, transform .12s ease;
}
.qf-own span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qf-own-ic { display: grid; color: var(--orange-d); }
/* MK 10-24: own words can be cleared with a small x */
.qf-own-row { position: relative; }
.qf-own-row.has-words .qf-own { padding-right: 48px; }
.qf-own-clear { position: absolute; right: 8px; top: 50%; display: none; place-items: center; width: 30px; height: 30px; margin-top: -10px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.qf-own-row.has-words .qf-own-clear { display: grid; }
.qf-own-clear:hover { background: rgba(24, 21, 18, .06); color: var(--ink); }
.qf-own-clear svg { width: 15px; height: 15px; }
.qf-own:hover { border-color: var(--ink); color: var(--ink); }

/* one-answer and pick-all rows */
.qf-opts { display: grid; gap: 8px; margin-top: 20px; }
.qf-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.qf-opt-t { flex: 1; font-size: 17px; font-weight: 600; line-height: 1.25; }
.qf-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  transition: background .15s ease, border-color .15s ease;
}
.qf-opt.is-multi .qf-mark { border-radius: 6px; }
.qf-mark .app-icon { width: 14px; height: 14px; stroke-width: 3.2; }
.qf-chev { display: grid; color: #b1aca3; transition: transform .2s var(--ease), color .15s ease; }
.qf-chev .app-icon { width: 18px; height: 18px; }
.qf-opt:not(.is-sel):hover { border-color: var(--ink); }
.qf-opt:not(.is-sel):hover .qf-chev { color: var(--ink); transform: translateX(3px); }
.qf-opt.is-sel { border-color: var(--orange); outline: 1px solid var(--orange); outline-offset: -2px; background: var(--orange-soft); }
.qf-opt.is-sel .qf-mark { border-color: var(--orange); background: var(--orange); color: #fff; animation: qf-pop .28s cubic-bezier(.2, .8, .2, 1.4); }
.qf-opt.is-sel .qf-chev { color: var(--orange-d); transform: translateX(4px); }
@keyframes qf-pop { from { transform: scale(.6); } }

/* details */
.qf-body .qf-textarea { margin-top: 20px; }
.qf-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qf-photo { position: relative; width: 72px; height: 72px; border-radius: var(--r); overflow: hidden; }
.qf-photo img { width: 100%; height: 100%; object-fit: cover; }
.qf-photo button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(24, 21, 18, .75); color: #fff; cursor: pointer; }
.qf-photo button .app-icon { width: 14px; height: 14px; }
.qf-photo-add { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 16px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--soft); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.qf-photo-add:hover { border-color: var(--ink); }
.qf-photo-add .app-icon { color: var(--orange-d); }

/* "Building your project": the job icon in a turning ring, three checks tick off */
.qf-building { padding: 26px 0 8px; text-align: center; }
.qf-build-mark { position: relative; display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 20px; }
.qf-build-ring { position: absolute; inset: 0; border: 3px solid #f0ebe2; border-top-color: var(--orange); border-radius: 50%; animation: qf-spin .9s linear infinite; }
.qf-build-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: #fff; animation: qf-pulse 1.4s ease-in-out infinite; }
.qf-build-ic .app-icon { width: 26px; height: 26px; }
@keyframes qf-spin { to { transform: rotate(360deg); } }
@keyframes qf-pulse { 50% { transform: scale(1.06); } }
.qf-build-list { display: grid; gap: 12px; width: min(340px, 100%); margin: 22px auto 0; padding: 0; list-style: none; text-align: left; }
.qf-build-list li { display: flex; align-items: center; gap: 12px; color: #a39e95; font-size: 16px; font-weight: 600; transition: color .25s ease; }
.qf-build-dot { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 2px solid var(--line-strong); border-radius: 50%; color: transparent; transition: background .2s ease, border-color .2s ease; }
.qf-build-dot .app-icon { width: 13px; height: 13px; stroke-width: 3.2; }
.qf-build-list li.is-on { color: var(--ink); }
.qf-build-list li.is-on .qf-build-dot { border-color: var(--orange); border-right-color: transparent; animation: qf-spin .8s linear infinite; }
.qf-build-list li.is-done { color: var(--ink); }
.qf-build-list li.is-done .qf-build-dot { border-color: var(--good); background: var(--good); color: #fff; animation: qf-pop .28s cubic-bezier(.2, .8, .2, 1.4); }

/* contact */
.qf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 22px; }
.qf-full { grid-column: 1 / -1; }
.qf-reach { display: flex; align-items: center; gap: 12px; }
.qf-reach .qf-label { margin: 0; white-space: nowrap; }
.qf-reach .qf-seg { flex: 1; }
.qf-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: 8px; background: var(--soft); }
.qf-seg button { height: var(--h-sm); border: 0; border-radius: var(--r); background: transparent; color: var(--ink-2); font-size: 16px; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease; }
.qf-seg button:not(.is-on):hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.qf-seg button.is-on { background: var(--ink); color: #fff; }
/* MK 10-24: "Call or text" is the first and widest choice - never wrap it; on phones the label sits above the choices */
.qf-seg { grid-template-columns: 1.4fr 1fr 1fr; }
.qf-seg button { white-space: nowrap; padding: 0 6px; }
@media (max-width: 480px) {
  .qf-reach { flex-direction: column; align-items: stretch; gap: 8px; }
  .qf-seg button { font-size: 15px; }
}
.qf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* ✅ MK 2026-10-23: consent line under the send button (contact step): small, muted, the bar wraps to fit it */
.qf-actions.has-consent { flex-wrap: wrap; row-gap: 10px; }
.qf-consent { flex: 0 0 100%; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.qf-consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.qf-consent a:hover { color: var(--ink); }

/* Sent + optional code */
.qf-done { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.qf-done-mark { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--good); color: #fff; animation: qf-done-in .5s cubic-bezier(.2, .8, .2, 1.4); }
.qf-done-mark .app-icon { width: 28px; height: 28px; stroke-width: 3; }
@keyframes qf-done-in { from { opacity: 0; transform: scale(.4) rotate(-20deg); } }
.qf-done-t { margin: 0; color: var(--good); font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.qf-sent { min-height: 0; margin: 4px 0 0; color: var(--ink-2); font-size: 16px; }
.qf-verify { padding: 20px; border-radius: 14px; background: var(--soft); }
.qf-verify .qf-kicker { color: var(--ink-2); }
.qf-verify .qf-title { font-size: 24px; }
.qf-code { display: flex; gap: 8px; margin-top: 20px; }
.qf-code input { width: 50px; height: 58px; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; font: inherit; font-size: 24px; font-weight: 700; text-align: center; outline: none; }
.qf-code input:focus { border-color: var(--ink); outline: 3px solid rgba(234, 106, 22, .22); }
.qf-code.is-wrong input { border-color: var(--red); animation: qf-shake .3s; }
@keyframes qf-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.qf-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.qf-links a.qf-btn { text-decoration: none; }

/* ---------- buttons (flat, 6px, press .98, 3 dots while working) ---------- */
.qf-actions { display: flex; gap: 12px; margin-top: 26px; }
.qf-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.qf-btn-main { flex: 1; background: var(--orange); color: #fff; }
.qf-btn-main:hover { background: var(--orange-d); }
.qf-btn-main .app-icon { transition: transform .2s var(--ease); }
.qf-btn-main:hover .app-icon { transform: translateX(3px); }
.qf-btn-main:disabled { background: #f3b98f; cursor: default; transform: none; }
.qf-btn-ghost { flex: 0 0 132px; border-color: var(--line-strong); background: #fff; color: var(--ink); }
.qf-btn-ghost:hover { border-color: var(--ink); }
.qf-btn-ghost .app-icon { transform: rotate(180deg); }
.qf-btn-sm { flex: 0 0 auto; height: var(--h-sm); padding: 0 14px; border-color: var(--line-strong); background: #fff; font-size: 15px; }
.qf-btn-sm:hover { border-color: var(--ink); }
/* while working: the button keeps its size, the label hides, 3 dots fill in one by one */
.qf-btn.is-busy { pointer-events: none; }
.qf-btn.is-busy > * { visibility: hidden; }
.qf-btn.is-busy::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -20px;
  background: radial-gradient(circle 4px at 4px 4px, #fff 98%, transparent) 0 0 / 16px 8px repeat-x;
  animation: qf-dots 1s steps(1) infinite;
}
.qf-btn-sm.is-busy::before, .qf-btn-ghost.is-busy::before { background: radial-gradient(circle 4px at 4px 4px, var(--ink) 98%, transparent) 0 0 / 16px 8px repeat-x; }
@keyframes qf-dots { 0% { width: 8px; } 33% { width: 24px; } 66% { width: 40px; } }

.qf-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 14.5px; font-weight: 600; }
.qf-trust li { display: inline-flex; align-items: center; gap: 6px; }
.qf-trust .app-icon { width: 18px; height: 18px; color: var(--orange); stroke-width: 2.6; }

/* ---------- side panel (wide screens): clip, what happens next, trust ---------- */
.qf-side { position: sticky; top: 76px; padding: 14px 14px 22px; border-radius: var(--card-r); background: var(--ink); color: #f3efe7; }
.qf-side-media { overflow: hidden; border-radius: 12px; background: #2a2622; aspect-ratio: 16 / 9; }
.qf-side-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.qf-side-title { margin: 18px 8px 12px; color: #fff; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.qf-next { display: grid; gap: 14px; margin: 0; padding: 0 8px; list-style: none; }
.qf-next li { display: flex; gap: 12px; }
.qf-next-n { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--orange); color: #fff; font-size: 13px; font-weight: 800; }
.qf-next b { display: block; color: #fff; font-size: 15px; line-height: 1.3; }
.qf-next span:not(.qf-next-n) { display: block; margin-top: 2px; color: #b9b2a7; font-size: 14px; line-height: 1.4; }
.qf-side-trust { display: grid; gap: 9px; margin: 18px 8px 0; padding: 16px 0 0; border-top: 1px solid rgba(255, 255, 255, .1); list-style: none; font-size: 14px; font-weight: 600; }
.qf-side-trust li { display: flex; align-items: center; gap: 9px; }
.qf-side-trust .app-icon { width: 17px; height: 17px; color: var(--orange); stroke-width: 2.4; }
/* the panel already says it, so the small trust row under the form stays for narrower screens */
.qf-shell .qf-trust { display: none; }

/* "own words" sheet */
.qf-sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(24, 21, 18, .5); animation: qf-fade .2s ease; }
.qf-sheet-panel { width: min(520px, 100%); padding: 20px; border-radius: var(--card-r); background: #fff; animation: qf-rise .28s var(--ease); }
.qf-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.qf-sheet-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.qf-icon-btn { display: grid; place-items: center; width: var(--h-sm); height: var(--h-sm); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; cursor: pointer; }
.qf-icon-btn:hover { border-color: var(--ink); }
.qf-sheet .qf-err { text-align: left; }
.qf-sheet-btns { display: flex; gap: 10px; margin-top: 14px; }
.qf-sheet-btns .qf-btn-ghost { flex: 0 0 120px; }
@keyframes qf-fade { from { opacity: 0; } }
@keyframes qf-rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- medium screens: no side panel, the card stays centered on the backdrop ---------- */
@media (max-width: 979px) {
  .qf-shell { grid-template-columns: minmax(0, 620px); }
  .qf-side { display: none; }
  .qf-shell .qf-trust { display: flex; }
  .qf-trust[hidden] { display: none; }
}

/* ---------- phones: the card fills the screen like an app; Back / Next stay in the thumb zone ---------- */
@media (max-width: 640px) {
  body.qf-page { background: #fff; }
  .qf-bg { display: none; }
  .qf-top { position: sticky; top: 0; background: #fff; }
  .qf-top-in { height: 56px; padding: 0 16px; }
  .qf-top-note { display: none; }
  .qf-top-step { display: block; }
  .qf { padding: 0 0 calc(96px + env(safe-area-inset-bottom)); }
  .qf-card { padding: 0 16px 8px; border: 0; border-radius: 0; }
  /* the bars ride under the top bar while you scroll */
  .qf-card-head { position: sticky; top: 56px; z-index: 15; margin: 0 -16px 16px; padding: 2px 16px 10px; background: #fff; }
  .qf-step { display: none; }
  .qf-bars { height: 4px; gap: 4px; }
  .qf-title { font-size: 25px; }
  .qf-sub { font-size: 16px; }
  .qf-hero { height: 164px; margin-bottom: 16px; }
  .qf-zip { width: 100%; }
  .qf-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
  .qf-tile { min-height: 86px; padding: 10px 4px 8px; gap: 6px; }
  .qf-tile b { font-size: 13.5px; }
  .qf-tile-ic { width: 36px; height: 36px; }
  .qf-tile-ic .app-icon { width: 19px; height: 19px; }
  .qf-tile-ok { top: 5px; right: 5px; }
  .qf-opts { gap: 8px; margin-top: 16px; }
  .qf-opt { min-height: 52px; }
  .qf-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    margin: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .qf-btn-ghost { flex: 0 0 100px; }
  .qf-actions.has-consent { row-gap: 6px; }
  .qf-consent { font-size: 12px; }
  .qf.has-consent { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }   /* room for the taller bar */
  .qf-trust { font-size: 14px; }
  .qf-sheet { place-items: end stretch; padding: 0; }
  .qf-sheet-panel { width: 100%; border-radius: var(--card-r) var(--card-r) 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .qf-form { gap: 12px 10px; }
  .qf-code { gap: 6px; }
  .qf-code input { width: 44px; height: 54px; }
  .qf-verify { padding: 16px; }
  .qf-verify .qf-title { font-size: 22px; }
  .qf-building { padding-top: 32px; }
}
@media (max-width: 360px) {
  .qf-tile b { font-size: 12.5px; }
  .qf-tile-ic { width: 32px; height: 32px; }
  .qf-title { font-size: 23px; }
  .qf-code input { width: 40px; }
}
/* very short phones (older small iPhones): a bit tighter so each step still fits above the Back / Next bar */
@media (max-width: 640px) and (max-height: 600px) {
  .qf-title { font-size: 21px; }
  .qf-sub { margin-top: 4px; font-size: 15px; }
  .qf-hero { height: 110px; }
  .qf-tiles { gap: 6px; margin-top: 10px; }
  .qf-tile { min-height: 70px; padding: 6px 4px; gap: 4px; }
  .qf-tile-ic { width: 30px; height: 30px; }
  .qf-own { height: 40px; margin-top: 8px; }
  .qf-opts { gap: 6px; margin-top: 12px; }
  .qf-opt { min-height: 46px; }
  .qf-form { gap: 8px; margin-top: 12px; }
  .qf-label { margin-bottom: 4px; font-size: 14px; }
  .qf-short-hide { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .qf-body.is-in, .qf-body.is-back, .qf-build-ic, .qf-build-ring, .qf-sheet, .qf-sheet-panel, .qf-hero img, .qf-done-mark { animation: none; }
  .qf-bar i { transition: none; }
}
/* MK 2026-10-22: "if they need to fill a field next then ripple or highlight it so they know their next step".
   The next field to fill pulses a few times (orange ring); when the step is complete, the Continue button pulses. */
@keyframes bh-next-ring {
  0% { box-shadow: 0 0 0 0 rgba(234, 106, 22, .5); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(234, 106, 22, 0); }
}
.qf-input.is-next-step { border-color: #ea6a16 !important; animation: bh-next-ring 1.5s ease-out 0s 3; }
.qf-btn.is-next-step { animation: bh-next-ring 2.2s ease-out .3s infinite; }
@media (prefers-reduced-motion: reduce) { .qf-input.is-next-step, .qf-btn.is-next-step { animation: none; } }

/* ---------- MK 10-24 "feels cluttered": the ZIP step is the one clear thing to do. The page sits behind a dark, soft veil,
   the card stands alone in the middle, and a ripple pulls the eye to the ZIP box until a good ZIP is in. ---------- */
.qf-bg::after { content: ""; position: absolute; inset: 0; background: rgba(24, 21, 18, .66); opacity: 0; transition: opacity .45s ease; }
.qf-bg-scene { transition: filter .45s ease; }
.qf-zip::before, .qf-zip::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--orange); border-radius: var(--r); opacity: 0; pointer-events: none; }
body.qf-zip-focus .qf-zip:not(.is-ok)::before { animation: qf-zip-ripple 2.4s ease-out infinite; }
body.qf-zip-focus .qf-zip:not(.is-ok)::after { animation: qf-zip-ripple 2.4s ease-out 1.2s infinite; }
@keyframes qf-zip-ripple { 0% { inset: 0; opacity: .6; border-radius: var(--r); } 100% { inset: -13px -18px; opacity: 0; border-radius: 16px; } }
body.qf-zip-focus .qf-hero { display: none; }
@media (min-width: 641px) {
  body.qf-zip-focus .qf-bg::after { opacity: 1; }
  body.qf-zip-focus .qf-bg-scene { filter: blur(3px) saturate(.8); }
  body.qf-zip-focus .qf-brand { color: #fff; }
  body.qf-zip-focus .qf-logo { background: #fff; color: var(--ink); }
  body.qf-zip-focus .qf-top-note { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #f3efe7; }
  body.qf-zip-focus .qf-shell { grid-template-columns: minmax(0, 520px); min-height: calc(100vh - 150px); align-content: center; }
  body.qf-zip-focus .qf-side { display: none; }
  body.qf-zip-focus .qf-card { padding: 26px 36px 32px; text-align: center; animation: qf-rise .45s var(--ease); }
  body.qf-zip-focus .qf-zip { margin: 26px auto 0; }
  body.qf-zip-focus .qf-shell .qf-trust { display: flex; justify-content: center; }
  body.qf-zip-focus .qf-trust[hidden] { display: none; }
}
/* phones: the same idea - the page goes dark, the ZIP card sits in the middle with its Next button inside it */
@media (max-width: 640px) {
  body.qf-zip-focus .qf-bg { display: block; }
  body.qf-zip-focus .qf-bg::after { opacity: 1; }
  body.qf-zip-focus .qf-bg-scene { filter: blur(3px) saturate(.8); }
  body.qf-zip-focus .qf-top { background: transparent; }
  body.qf-zip-focus .qf-brand { color: #fff; }
  body.qf-zip-focus .qf-logo { background: #fff; color: var(--ink); }
  body.qf-zip-focus .qf-top-step { color: #d9d2c6; }
  body.qf-zip-focus .qf { display: grid; align-content: center; min-height: calc(100vh - 56px); min-height: calc(100svh - 56px); padding: 8px 14px 28px; }
  body.qf-zip-focus .qf-card { padding: 20px 18px 22px; border-radius: var(--card-r); text-align: center; animation: qf-rise .4s var(--ease); }
  body.qf-zip-focus .qf-card-head { position: static; margin: 0 0 18px; padding: 0; background: none; }
  body.qf-zip-focus .qf-actions { position: static; margin-top: 16px; padding: 0; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.qf-zip-focus .qf-trust { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .qf-zip::before, .qf-zip::after { animation: none !important; }
  .qf-bg::after, .qf-bg-scene { transition: none; }
  body.qf-zip-focus .qf-card { animation: none; }
}

/* MK 10-24 compact tiles: with 20 jobs the form ran ~120px past the "What happens next" box - desktop tiles are a bit shorter now */
@media (min-width: 980px) {
  .qf-tiles { gap: 8px; margin-top: 16px; }
  .qf-tile { min-height: 78px; padding: 7px 4px 6px; gap: 5px; }
  .qf-tile b { font-size: 13.5px; line-height: 1.15; }
  .qf-tile-ic { width: 30px; height: 30px; }
  .qf-tile-ic .app-icon { width: 17px; height: 17px; }
  .qf-tile-ok { top: 5px; right: 5px; width: 18px; height: 18px; }
}
