/* Mayo Pressure Washing: the free estimate page.
 * Loaded after styles.css. Reuses its tokens and .btn; everything new is
 * prefixed qf-. Teal marks a choice, gold stays the one action. */
:root {
  --qf-alt: var(--ground-alt, #f4f1ea);
  --qf-deep: var(--ground-deep, #12302a);
  --qf-teal: var(--accent-teal, #1f8a8a);
  --qf-line: oklch(30% .03 200 / .16);
  --qf-bad: oklch(52% .19 27);
}

/* ---------- Page top ---------- */
.qf-page { background: var(--qf-alt); padding: calc(var(--head) + env(safe-area-inset-top) + 36px) 0 var(--sec); }
@media (min-width: 1024px) { .qf-page { padding-top: calc(var(--head) + 64px); } }
.qf-top { margin-bottom: var(--s8); }
@media (min-width: 1024px) { .qf-top { margin-bottom: var(--s10); } }
.qf-eyebrow { margin: 0 0 var(--s4); color: var(--qf-teal); font-size: 12px; line-height: 1.2; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.qf-title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .005em;
  font-size: clamp(56px, 9vw, 112px); line-height: .86; color: var(--qf-deep); margin-bottom: var(--s5);
}
.qf-lede { max-width: 40ch; font-size: 18px; line-height: 1.5; margin-bottom: var(--s3); }
@media (min-width: 1024px) { .qf-lede { font-size: 20px; } }
.qf-rating { margin: 0; color: var(--muted); font-size: 15px; font-weight: 500; }
.qf-star { color: oklch(72% .15 75); }

/* ---------- Layout ---------- */
.qf-grid { display: grid; gap: var(--s6); }
@media (min-width: 1024px) {
  .qf-grid { grid-template-columns: minmax(0, 1fr) 340px; column-gap: var(--s10); align-items: start; }
  .qf-rail { position: sticky; top: calc(var(--head) + 24px); }
}

/* ---------- The form card ---------- */
.qf-form, .qf-done { min-width: 0; background: var(--paper); border-radius: 14px; padding: var(--s5);
  box-shadow: 0 1px 0 var(--qf-line), 0 24px 60px -40px oklch(25% .04 200 / .55); }
@media (min-width: 640px) { .qf-form, .qf-done { padding: var(--s8); } }
@media (min-width: 1024px) { .qf-form, .qf-done { padding: var(--s10) var(--s12); } }
.qf-hp { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; }

.qf-step { border: 0; margin: 0; padding: 0 0 var(--s8); min-width: 0; }
.qf-step + .qf-step { border-top: 1px solid var(--qf-line); padding-top: var(--s8); }
.qf-legend { float: left; width: 100%; display: flex; align-items: center; gap: var(--s3); padding: 0; margin-bottom: var(--s4);
  font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 26px; line-height: 1; letter-spacing: .01em; }
@media (min-width: 1024px) { .qf-legend { font-size: 30px; } }
.qf-legend + * { clear: both; }
.qf-legend em, .qf-field label em, .qf-label em { font-family: var(--font); font-style: normal; font-weight: 400; text-transform: none;
  letter-spacing: 0; font-size: 14px; color: var(--muted); margin-left: 2px; }
.qf-n { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--qf-deep); color: var(--paper); font-family: var(--font); font-weight: 500; font-size: 14px; }
.qf-hint { color: var(--muted); margin: -4px 0 var(--s4); font-size: 15px; }
.qf-sub + .qf-sub { margin-top: var(--s6); }
.qf-sub-last { margin-top: var(--s5); }
.qf-label { margin: 0 0 var(--s2); font-size: 14px; font-weight: 500; }

/* Chips: multi-select. A check appears on the chosen ones. */
.qf-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.qf-chip { position: relative; cursor: pointer; }
.qf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.qf-chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--qf-line); background: var(--paper); font-size: 15px; font-weight: 500; line-height: 1.2;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  user-select: none; -webkit-user-select: none;
}
.qf-chip span::before {
  content: ""; width: 0; height: 16px; margin-left: -4px; opacity: 0; transition: width .15s var(--ease), opacity .15s var(--ease);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (hover: hover) { .qf-chip:hover span { border-color: var(--qf-teal); } }
.qf-chip input:checked + span { background: color-mix(in oklch, var(--qf-teal) 11%, white); border-color: var(--qf-teal); color: var(--qf-deep); }
.qf-chip input:checked + span::before { width: 16px; margin-left: -6px; opacity: 1; color: var(--qf-teal); }
.qf-chip input:focus-visible + span { outline: 2px solid var(--qf-teal); outline-offset: 2px; }
.qf-chips-sm .qf-chip span { min-height: 40px; padding: 0 14px; font-size: 14px; }
.qf-chips.is-bad .qf-chip span { border-color: color-mix(in oklch, var(--qf-bad) 55%, white); }

/* Segmented choices: one of a few. */
.qf-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px;
  background: color-mix(in oklch, var(--qf-alt) 80%, oklch(80% .02 80)); max-width: 460px; }
.qf-seg-4 { max-width: none; }
@media (max-width: 639px) { .qf-seg-4 { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } }
.qf-seg label { cursor: pointer; min-width: 0; }
.qf-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.qf-seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 4px var(--s2);
  border-radius: 9px; font-weight: 500; font-size: 14px; line-height: 1.2; color: var(--muted);
  transition: background-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease); }
.qf-seg input:checked + span { background: var(--paper); color: var(--qf-deep); box-shadow: 0 1px 3px oklch(25% .04 200 / .2), inset 0 0 0 1px var(--qf-teal); }
.qf-seg input:focus-visible + span { outline: 2px solid var(--qf-teal); outline-offset: 1px; }

/* Text fields. */
.qf-fields { display: grid; grid-template-columns: 1fr; gap: var(--s4) var(--s3); }
@media (min-width: 640px) { .qf-fields { grid-template-columns: 1fr 1fr; } .qf-span { grid-column: span 2; } }
.qf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qf-field label { font-size: 14px; font-weight: 500; }
.qf-field input, .qf-field select, .qf-field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid oklch(30% .03 200 / .24); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font-size: 16px; /* 16px stops iOS zooming on focus */
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.qf-field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.qf-field select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312302a' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; }
.qf-field select:invalid, .qf-field select.is-empty { color: var(--muted); }
.qf-field input::placeholder, .qf-field textarea::placeholder { color: oklch(50% .02 220 / .55); }
.qf-field input:focus, .qf-field select:focus, .qf-field textarea:focus { outline: none; border-color: var(--qf-teal);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--qf-teal) 20%, transparent); }
.qf-field [aria-invalid="true"] { border-color: var(--qf-bad); box-shadow: 0 0 0 3px color-mix(in oklch, var(--qf-bad) 14%, transparent); }
.qf-err { margin: 2px 0 0; color: var(--qf-bad); font-size: 14px; font-weight: 500; line-height: 1.35; }
.qf-step > .qf-err { margin-top: var(--s3); }
.qf-notes { margin-top: var(--s5); }

/* Photo picker. */
.qf-drop { border: 1.5px dashed oklch(30% .03 200 / .28); border-radius: 12px; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.qf-drop.is-over, .qf-drop:hover { border-color: var(--qf-teal); background: color-mix(in oklch, var(--qf-teal) 6%, white); }
.qf-drop-label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s6) var(--s4); cursor: pointer; text-align: center; }
.qf-drop-label svg { width: 30px; height: 30px; fill: none; stroke: var(--qf-teal); stroke-width: 1.5; stroke-linejoin: round; margin-bottom: 2px; }
.qf-drop-title { font-weight: 500; font-size: 16px; }
.qf-drop-sub { color: var(--muted); font-size: 14px; }
#f-photos:focus-visible + .qf-drop-label { outline: 2px solid var(--qf-teal); outline-offset: 3px; border-radius: 12px; }
.qf-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); padding: 0 var(--s3) var(--s3); }
@media (min-width: 640px) { .qf-thumbs { grid-template-columns: repeat(6, 1fr); } }
.qf-thumbs:empty { display: none; }
.qf-thumbs li { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--qf-alt); }
.qf-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qf-thumbs button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0;
  border-radius: 50%; background: oklch(15% .02 200 / .7); color: var(--paper); cursor: pointer; }
.qf-thumbs button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* Submit. */
.qf-submit { border-top: 1px solid var(--qf-line); padding-top: var(--s8); }
.qf-summary-err { margin: 0 0 var(--s4); padding: 12px 14px; border-radius: var(--radius); font-weight: 500; font-size: 15px;
  color: var(--qf-bad); background: color-mix(in oklch, var(--qf-bad) 8%, white); }
.qf-submit .btn-block { min-height: 58px; font-size: 14px; }
.qf-fine { margin: var(--s3) 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.qf-fine a { color: var(--ink); font-weight: 500; white-space: nowrap; }

/* ---------- Sent ---------- */
.qf-done:focus { outline: none; }
.qf-done-mark { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--qf-teal); margin-bottom: var(--s5);
  animation: qf-pop .4s var(--ease) both; }
.qf-done-mark svg { width: 30px; height: 30px; fill: none; stroke: var(--paper); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24; animation: qf-tick .4s .15s var(--ease) forwards; }
@keyframes qf-pop { from { scale: .6; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes qf-tick { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .qf-done-mark { animation: none; } .qf-done-mark svg { animation: none; stroke-dashoffset: 0; } }
.qf-done-head { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 44px; line-height: .9; color: var(--qf-deep); margin-bottom: var(--s4); }
@media (min-width: 1024px) { .qf-done-head { font-size: 60px; } }
.qf-done-lede { font-size: 18px; line-height: 1.5; max-width: 46ch; }
.qf-done-sum { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px var(--s6); margin: var(--s6) 0; padding-top: var(--s5);
  border-top: 1px solid var(--qf-line); font-size: 15px; }
.qf-done-sum dt { color: var(--muted); }
.qf-done-sum dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.qf-demo { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--s6); padding: 6px 12px; border-radius: 999px;
  background: var(--qf-alt); color: var(--muted); font-size: 13px; font-weight: 500; }
.qf-demo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: oklch(72% .15 75); }
.qf-done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.qf-link { padding: 8px 0; border: 0; background: none; cursor: pointer; color: var(--qf-teal); font-weight: 500; font-size: 15px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- Rail ---------- */
.qf-rail { display: grid; gap: var(--s4); min-width: 0; }
.qf-card { border-radius: 14px; padding: var(--s6); }
.qf-card-head { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 24px; line-height: 1; margin-bottom: var(--s4); }
.qf-live { background: var(--paper); box-shadow: 0 1px 0 var(--qf-line); }
@media (max-width: 1023px) { .qf-live { display: none; } }
.qf-live-sum { display: grid; gap: 12px; margin: 0; font-size: 15px; }
.qf-live-sum div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s3); }
.qf-live-sum dt { color: var(--muted); }
.qf-live-sum dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.qf-live-sum dd.is-empty { font-weight: 400; color: oklch(50% .02 220 / .7); }
.qf-call { background: var(--qf-deep); color: var(--paper); }
.qf-card-label { margin: 0 0 var(--s2); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: oklch(100% 0 0 / .7); }
.qf-phone { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 38px; line-height: 1; letter-spacing: .01em; margin-bottom: var(--s2);
  transition: translate .2s var(--ease); }
.qf-phone:hover { translate: 0 -2px; }
.qf-mail { margin: 0 0 var(--s5); font-size: 14px; overflow-wrap: anywhere; }
.qf-mail a { color: oklch(100% 0 0 / .8); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.qf-hours { display: grid; gap: 6px; margin: 0; padding-top: var(--s4); border-top: 1px solid oklch(100% 0 0 / .14); font-size: 14px; }
.qf-hours div { display: flex; justify-content: space-between; gap: var(--s3); }
.qf-hours dt { color: oklch(100% 0 0 / .65); }
.qf-hours dd { margin: 0; }
