/* Get a quote (/quote/): simplified header, 5-step photo quote form, pipe puzzle, confirmation.
   Values are taken from design/Quote Form v2.dc.html. Tokens come from site.css. */

.q-page {
  /* Divider inside the card and the empty upload bar, as drawn in the design. */
  --q-rule: #ece7df;
  --q-pad: clamp(20px, 3vw, 36px);
  background: var(--page);
  /* The design leaves line-height at the browser default except where it sets one. */
  line-height: normal;
}

/* ---------- Simplified header ---------- */
.qh { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.qh__in {
  max-width: var(--container); margin: 0 auto; min-height: 64px; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.qh__brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--ink); }
.qh__brand:hover { color: var(--ink); }
.qh__mark {
  width: 38px; height: 38px; flex: none; border-radius: 9px; background: var(--copper); color: #fff;
  display: grid; place-items: center; font: 800 13px var(--font); font-stretch: 115%;
}
.qh__name { font: 800 17px var(--font); font-stretch: 110%; }
.qh__name--m { font: 800 15px/1.15 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qh__links { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.qh__ask { color: var(--muted); }
.qh__sms { font-weight: 700; text-decoration: none; }
.qh__back { color: var(--ink); font-weight: 600; }
.qh__textbtn {
  flex: none; display: flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--ink); border-radius: 8px; color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none;
}
.qh__textbtn:hover { background: var(--ink); color: #fff; }

/* ---------- Layout ---------- */
.q-wrap {
  max-width: var(--container); margin: 0 auto; padding: 28px 20px 40px;
  display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start;
}
.q-main { flex: 1 1 620px; min-width: 0; }
.q-h1 {
  font: 800 clamp(28px, 4.2vw, 42px)/1.08 var(--font); font-stretch: 108%; letter-spacing: -.02em; margin: 0 0 8px;
}
.q-sub { margin: 0 0 22px; font-size: 17px; line-height: 1.5; color: var(--text); }

/* Welcome back banner */
.q-restored {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--teal-tint); color: var(--teal-dark); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; font-size: 15.5px;
}
.q-restored__btns { display: flex; gap: 10px; }
.q-restored__btns button {
  min-height: 44px; padding: 0 16px; border-radius: 8px; font-weight: 700; font-size: 15px;
  border: 1.5px solid var(--teal-dark); background: transparent; color: var(--teal-dark);
}
.q-restored__btns .q-restored__go { border-color: var(--teal-dark); background: var(--teal-dark); color: #fff; }
.q-restored__btns button:hover { background: var(--teal-dark); color: #fff; }

/* Progress: desktop segments */
.q-prog { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.q-prog li { display: flex; flex-direction: column; gap: 8px; }
.q-prog__bar { height: 6px; border-radius: 3px; background: var(--line-2); }
.q-prog__lbl { font-size: 14.5px; font-weight: 500; color: var(--muted-2); }
.q-prog li.is-past .q-prog__bar { background: var(--ink); }
.q-prog li.is-past .q-prog__lbl { color: var(--ink); }
.q-prog li[aria-current="step"] .q-prog__bar { background: var(--copper); }
.q-prog li[aria-current="step"] .q-prog__lbl { color: var(--ink); font-weight: 700; }
/* Progress: mobile */
.q-mprog { margin: 0 0 18px; }
.q-mprog__top { display: flex; justify-content: space-between; font-size: 14.5px; margin-bottom: 8px; }
.q-mprog__top span { color: var(--muted); }
.q-mprog__track { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.q-mprog__fill { height: 100%; background: var(--copper); border-radius: 3px; }

/* Card */
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: var(--q-pad); }
.q-nojs p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; color: var(--text); }
.q-h2 { font: 700 24px var(--font); font-stretch: 105%; margin: 0 0 6px; outline: none; }
.q-h2:focus, .q-h2:focus-visible { outline: none; }
.q-help { margin: 0 0 20px; font-size: 15.5px; color: var(--muted); }
.q-help--18 { margin-bottom: 18px; }
.q-nowrap { white-space: nowrap; }

/* Errors */
.q-err { color: var(--error); font-weight: 600; }
.q-err--block { margin: 14px 0 0; font-size: 15px; }
.q-err--busy { margin: 12px 0 0; font-size: 15px; }
.q-err--desc { margin: 8px 0 0; font-size: 14.5px; }
.q-err--field { display: block; margin-top: 6px; font-size: 14px; }
.q-err--consent { display: block; margin-top: 2px; font-size: 14px; }
.q-formerr {
  margin: 22px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--error-bg); color: var(--error-text);
  font-size: 15.5px; line-height: 1.5; font-weight: 600;
}
.q-formerr a { color: var(--error-text); font-weight: 700; }

/* ---------- Step 1: job type tiles ---------- */
.q-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.q-tile {
  display: flex; align-items: center; gap: 14px; min-height: 64px; text-align: left; padding: 14px 18px;
  border-radius: 11px; border: 2px solid var(--input-border); background: var(--surface); color: var(--ink);
  font-size: 16.5px; font-weight: 600;
}
.q-tile:hover { border-color: var(--copper); }
.q-tile__box {
  width: 24px; height: 24px; flex: none; border-radius: 6px; border: 2px solid var(--input-border); background: var(--surface);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.q-tile__txt { display: flex; flex-direction: column; gap: 2px; }
.q-tile__sub { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.q-tile[aria-checked="true"] { border-color: var(--copper); background: var(--copper-tint); }
.q-tile[aria-checked="true"] .q-tile__box { border-color: var(--copper); background: var(--copper); }
.q-tile[aria-checked="true"] .q-tile__box::after { content: "✓"; }
.q-note { margin: 18px 0 0; font-size: 14.5px; color: var(--muted); }

/* ---------- Step 2: photos ---------- */
.q-guides { display: grid; gap: 12px; margin-bottom: 18px; }
.q-guide { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.q-guide__h { font-weight: 700; font-size: 16px; margin: 0 0 12px; }
.q-guide ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.q-guide li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border-radius: 10px; padding: 12px; font-size: 15px; line-height: 1.4; }
.q-guide__n {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--copper); color: #fff;
  display: grid; place-items: center; font: 700 13px var(--mono);
}
.q-guide__tip { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.q-guide__tip--warn { color: var(--error-text); }

.q-ups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.q-up {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px;
  border-radius: 12px; font-weight: 700; font-size: 17px; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.q-up input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.q-up:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 2px; }
@supports not selector(:has(*)) { .q-up:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; } }
.q-up--cam { background: var(--copper); color: #fff; }
.q-up--cam:hover { background: var(--copper-dark); }
.q-up--pick { border: 2px dashed var(--input-border-2); background: var(--surface-2); color: var(--ink); }
.q-up--pick:hover { border-color: var(--ink); }
.q-uphelp { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

.q-files { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.q-files:empty { display: none; }
.q-file { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); }
.q-file__thumb {
  position: relative; aspect-ratio: 4 / 3; background: var(--ink); display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px; overflow: hidden;
}
.q-file__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-file__badge { position: relative; }
.q-file__rm {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; border: 0; background: transparent;
  display: grid; place-items: center; color: #fff;
}
.q-file__rm span {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(14, 36, 51, .85);
  display: grid; place-items: center; font-size: 16px; line-height: 1;
}
.q-file__rm:hover span { background: var(--ink); }
.q-file__rm:focus-visible { outline-offset: -4px; }
.q-file__info { padding: 8px 10px 10px; }
.q-file__name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-file__track { height: 4px; border-radius: 2px; background: var(--q-rule); margin: 6px 0; overflow: hidden; }
.q-file__bar { height: 100%; width: 0; background: var(--copper); transition: width .15s linear; }
.q-file__status { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.q-file.is-done .q-file__bar { background: var(--success); }
.q-file.is-done .q-file__status { color: var(--success); }
.q-file.is-err { border-color: var(--error); }
.q-file.is-err .q-file__thumb { background: var(--error); }
.q-file.is-err .q-file__thumb img { display: none; }
.q-file.is-err .q-file__bar { background: var(--error); width: 100% !important; }
.q-file.is-err .q-file__status { color: var(--error); }

.q-desc { display: block; margin-top: 22px; }
.q-desc__lbl { display: block; font-weight: 700; font-size: 15.5px; margin-bottom: 8px; }
.q-textarea {
  display: block; width: 100%; border: 1.5px solid var(--input-border); border-radius: 9px; padding: 14px 16px;
  font: 16px/1.5 var(--font); resize: vertical; color: var(--ink); background: var(--surface);
}

/* ---------- Step 3: details ---------- */
.q-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px 20px; }
.q-full { grid-column: 1 / -1; }
.q-ll { display: contents; }
.q-label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 7px; }
.q-label__note { font-weight: 400; color: var(--muted); }
.q-input {
  display: block; width: 100%; height: 52px; border: 1.5px solid var(--input-border); border-radius: 9px;
  padding: 0 14px; font-size: 16px; background: var(--surface); color: var(--ink);
}
.q-input::placeholder, .q-textarea::placeholder { color: var(--muted-2); opacity: 1; }
.q-input[aria-invalid="true"], .q-textarea[aria-invalid="true"] { border-color: var(--error); }
.q-textarea--sm { padding: 12px 14px; }

.q-seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-seg legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; }
.q-seg__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.q-seg__opts button {
  min-height: 48px; border-radius: 9px; border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 15px;
}
.q-seg__opts button:hover { border-color: var(--ink); }
.q-seg__opts button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }

.q-combo { position: relative; }
.q-listbox {
  list-style: none; margin: 4px 0 0; padding: 6px; position: absolute; left: 0; right: 0; top: 100%; z-index: 4;
  background: var(--surface); border: 1px solid var(--input-border); border-radius: 10px; box-shadow: var(--shadow-drop);
}
.q-listbox li { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 7px; font-size: 15.5px; cursor: pointer; }
.q-listbox li:hover, .q-listbox li[aria-selected="true"] { background: var(--page); }
.q-area { display: inline-flex; margin-top: 8px; padding: 6px 10px; border-radius: 7px; font-size: 14px; font-weight: 600; }
.q-area--free { background: var(--success-bg); color: var(--success-text); }
.q-area--area { background: var(--teal-tint); color: var(--teal-dark); }
.q-area--arrangement { background: var(--copper-tint-2); color: var(--copper-notice-text); }
.q-area--outside { background: var(--error-bg); color: var(--error-text); }

.q-check {
  display: flex; gap: 12px; align-items: center; font-size: 15.5px; min-height: 48px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
}
.q-check input, .q-consent input, .q-flex input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--copper); }
.q-privacy { border-top: 1px solid var(--q-rule); padding-top: 16px; }
.q-privacy p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.q-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; min-height: 44px; cursor: pointer; }
.q-consent input { margin-top: 1px; }
.q-consent input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 1px; }

/* ---------- Step 4: preferred time ---------- */
.q-flex {
  display: flex; gap: 12px; align-items: center; font-size: 16px; font-weight: 600; min-height: 52px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); border-radius: 11px; padding: 8px 16px; margin-bottom: 20px;
}
.q-flex.is-on { border-color: var(--copper); background: var(--copper-tint); }
.q-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-fs--days { margin-bottom: 22px; }
.q-fs legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; padding: 0; }
.q-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; outline: none; }
.q-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.q-day, .q-slot {
  border-radius: 10px; border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.q-day { height: 72px; padding: 0; }
.q-day__dow { font-size: 13.5px; font-weight: 600; }
.q-day__date { font: 800 20px var(--font); }
.q-slot { min-height: 64px; font-size: 15px; font-weight: 600; padding: 6px; }
.q-slot__range { font-size: 13px; font-weight: 400; }
.q-day:hover, .q-slot:hover { border-color: var(--ink); }
.q-day[aria-pressed="true"], .q-slot[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.q-notice {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--copper-tint-2); color: var(--copper-notice-text);
  font-size: 14.5px; line-height: 1.5;
}

/* ---------- Step 5: review and puzzle ---------- */
.q-review-list { margin: 0; }
.q-rv { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--q-rule); }
.q-rv dl { margin: 0; min-width: 0; }
.q-rv dt { font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.q-rv dd { margin: 0; font-size: 16px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.q-edit {
  flex: none; align-self: flex-start; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--input-border);
  border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 15px;
}
.q-edit:hover { border-color: var(--ink); }
.q-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.q-pipe { margin-top: 22px; border: 2px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--surface-2); }
.q-pipe.is-solved { border-color: var(--success); }
.q-pipe.is-err { border-color: var(--error); }
.q-pipe__h { font: 700 18px var(--font); font-stretch: 105%; margin: 0 0 4px; }
.q-pipe__p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.q-pipe__wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.q-pipe__grid { display: grid; grid-template-columns: 34px repeat(3, 52px) 34px; grid-template-rows: repeat(2, 52px); gap: 4px; }
.q-pipe__stub { display: flex; align-items: center; }
.q-pipe__stub--in { grid-column: 1; grid-row: 1; }
.q-pipe__stub--out { grid-column: 5; grid-row: 2; }
.q-pipe__stub path.q-pipe__flow { stroke: var(--input-border); }
.q-pipe.is-solved .q-pipe__stub path.q-pipe__flow { stroke: var(--teal); }
.q-tilebtn {
  width: 52px; height: 52px; padding: 0; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface);
  overflow: hidden;
}
.q-tilebtn:hover { background: var(--copper-tint); }
.q-tilebtn svg { display: block; width: 49px; height: 49px; transition: transform .18s ease; }
.q-tilebtn path { stroke: var(--copper); }
.q-tilebtn.is-wet path { stroke: var(--teal); }
.q-pipe.is-solved .q-tilebtn.is-wet { border-color: var(--success); }
.q-pipe__labels { display: grid; grid-template-columns: 34px repeat(3, 52px) 34px; gap: 4px; font-size: 12px; color: var(--muted); }
.q-pipe__labels span:first-child { grid-column: 1 / 3; }
.q-pipe__labels span:last-child { grid-column: 4 / 6; text-align: right; }
.q-pipe__status { margin: 12px 0 0; text-align: center; font-size: 15px; font-weight: 700; color: var(--muted); }
.q-pipe__status.is-ok { color: var(--success); }
.q-pipe__status.is-bad { color: var(--error); }
.q-pipe__alt { margin: 10px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }

/* ---------- Confirmation ---------- */
.q-done { padding: 12px 4px 4px; }
.q-done__tick { width: 64px; height: 64px; margin-bottom: 16px; border-radius: 50%; background: var(--success-bg); display: grid; place-items: center; }
.q-done .q-h2 { font: 800 30px var(--font); font-stretch: 105%; margin: 0 0 8px; }
.q-done__p { margin: 0 0 6px; font-size: 17px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.q-done__ref { font-family: var(--mono); }
.q-tl { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); }
.q-tl li { position: relative; padding: 0 0 16px 22px; }
.q-tl li:last-child { padding-bottom: 0; }
.q-tl__dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--input-border); }
.q-tl__dot--ok { background: var(--success); }
.q-tl__dot--cu { background: var(--copper); }
.q-done__notice {
  background: var(--copper-tint-2); color: var(--copper-notice-text); border-radius: 12px; padding: 14px 16px;
  font-size: 15.5px; line-height: 1.5; margin-bottom: 20px;
}
.q-done__notice a { color: var(--copper-notice-text); font-weight: 700; }
.q-done__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.q-done__home {
  display: inline-flex; align-items: center; min-height: 48px; background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 700; padding: 0 22px; border-radius: 9px;
}
.q-done__home:hover { background: var(--ink-2); color: #fff; }
.q-done__again {
  min-height: 48px; background: transparent; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; font-size: 16px;
  padding: 0 20px; border-radius: 9px;
}
.q-done__again:hover { background: var(--ink); color: #fff; }

/* ---------- Sticky in-card footer ---------- */
.q-nav {
  position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 28px calc(-1 * var(--q-pad)) calc(-1 * var(--q-pad));
  padding: 14px var(--q-pad) calc(14px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--q-rule); border-radius: 0 0 16px 16px;
  box-shadow: 0 -6px 16px rgba(14, 36, 51, .05);
}
.q-back {
  min-height: 52px; padding: 0 18px; border-radius: 9px; border: 1.5px solid var(--input-border); background: var(--surface);
  color: var(--ink); font-weight: 700; font-size: 16px;
}
.q-back:hover:not(:disabled) { border-color: var(--ink); }
.q-back:disabled { opacity: .45; cursor: default; }
.q-nav__r { display: flex; align-items: center; gap: 14px; flex: 1; justify-content: flex-end; }
.q-saved { font-size: 13.5px; color: var(--success); font-weight: 600; }
.q-next {
  min-height: 56px; padding: 0 28px; border-radius: 9px; border: 0; background: var(--copper); color: #fff;
  font-weight: 700; font-size: 17px; transition: background-color .15s ease;
}
.q-next:hover { background: var(--copper-dark); }
.q-next[aria-disabled="true"] { opacity: .7; cursor: progress; }

/* ---------- Aside ---------- */
.q-aside { flex: 0 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 84px; }
.q-acard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.q-acard__h { font: 700 19px var(--font); font-stretch: 105%; margin: 0 0 14px; }
.q-acard__h--sm { font: 700 17px var(--font); margin-bottom: 12px; }
.q-acard__steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--text); }
.q-acard__dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 15px; }
.q-acard__dl dt { color: var(--muted); }
.q-acard__dl dd { margin: 0; font-weight: 700; }
.q-review { margin: 0; background: var(--ink); color: #fff; border-radius: 16px; padding: 22px 24px; }
.q-review__stars { color: var(--star-dark); font-size: 16px; margin-bottom: 8px; }
.q-review blockquote { margin: 0 0 10px; font-size: 15.5px; line-height: 1.5; }
.q-review figcaption { font-size: 13.5px; color: var(--on-dark); }
.q-lic { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--muted); line-height: 1.8; padding: 0 4px; }

/* ---------- Quiet page footer (licence numbers stay visible on mobile) ---------- */
.q-foot { border-top: 1px solid var(--line-2); }
.q-foot__in {
  max-width: var(--container); margin: 0 auto; padding: 18px 20px 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; font-size: 13px; line-height: 1.6; color: var(--muted);
}
.q-foot__in p { margin: 0; }
.q-foot__lic { font-family: var(--mono); font-size: 12.5px; }
.q-foot__links a { color: var(--muted); }
.q-foot__links a:hover { color: var(--copper-dark); }

@media (max-width: 719.98px) {
  .q-foot__in { padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); }
}

/* Desktop follows QPG Site.dc.html#quote, which mounts the form under the site's global border-box reset (header 64px,
   1240px container incl. 20px gutters, 24px tick box, 64px upload buttons, as in the README). The standalone
   Quote Form v2 file lacks that reset (content-box: 85px header, 28px tick box); we no longer emulate it. */
/* Mobile: QPG Site.dc.html mounts the mobile form under a global border-box reset, which gives the README's
   sizes (64px header, 44px "Text us", 24px tick box, 64px upload buttons, 48px/52px check rows). */
@media (max-width: 719.98px) {
  .qh__in, .q-wrap, .q-foot__in, .qh__textbtn, .q-tile__box, .q-up, .q-check, .q-flex { box-sizing: border-box; }
  /* Back + "✓ Progress saved" + "Review request" don't fit one 308px row (the label wrapped to 2 lines), so on
     mobile the saved note sits on its own small row above the buttons and the buttons never wrap. */
  .q-nav { flex-wrap: wrap; row-gap: 4px; padding-top: 10px; }
  .q-nav__r { display: contents; }
  .q-saved { order: -1; flex: 1 0 100%; text-align: right; font-size: 12.5px; line-height: 1.3; }
  .q-back, .q-next { flex: none; white-space: nowrap; }
  .q-nav:has(.q-saved[hidden]) { padding-top: 14px; }
  .qh__brand { min-height: 44px; } /* 44px tap target; no visual change */
}

/* Very narrow phones (< 375px): keep Back and the primary button on one row without overflow. */
@media (max-width: 374.98px) {
  .q-nav, .q-nav__r { gap: 8px; }
  .q-back { padding: 0 14px; }
  .q-next { padding: 0 18px; }
  .q-saved { font-size: 12.5px; min-width: 0; }
}
/* < 360px: the 240px pipe grid is wider than the puzzle card's content box; borrow some card padding and
   trim the two end stubs so the grid sits inside the card. */
@media (max-width: 359.98px) {
  .q-pipe { margin-inline: -12px; padding-inline: 10px; }
  .q-pipe__grid, .q-pipe__labels { grid-template-columns: 32px repeat(3, 52px) 32px; }
  .q-pipe__stub svg { width: 32px; }
}

/* Visible file-limit note under the upload help text */
.q-capnote { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--copper-notice-text); }

/* Optional reminders tick box under the required consent. */
.q-consent--opt { margin-top: 10px; }
.q-consent--opt .q-label__note { display: block; }
