:root {
  --navy: #3A2A1A;
  --ink: #34281C;
  --accent: #8F5A2C;
  --accent-dark: #74451E;
  --cream: #F1E6D4;
  --bg: #EFE6D6;
  --surface: #FCF8F1;
  --border: #E4D8C4;
  --border-strong: #CBB99C;
  --muted: #7A6A54;
  --muted-2: #5E5040;
  --danger: #B23A2E;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-card: 0 1px 2px rgba(58,42,26,.06), 0 10px 26px -14px rgba(58,42,26,.24);
  --shadow-pop: 0 -6px 24px -10px rgba(58,42,26,.24);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
/* The sticky total bar only exists while the widget is the thing on screen. */
body.iq-active { padding-bottom: 88px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 30px 16px 40px; }

/* ---------- intro ---------- */
/* Tag-agnostic so a host page can demote these for correct heading order. */
.intro :is(h1, h2, h3) { font-size: clamp(30px, 7vw, 46px); font-weight: 800; letter-spacing: -.03em; color: var(--navy); line-height: 1.02; }
.intro p { margin-top: 10px; color: var(--muted-2); font-size: 15.5px; max-width: 52ch; }

/* ---------- card / section ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 22px 20px 24px; margin-top: 20px;
}
.card.enter { animation: enter .34s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.shead { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.badge {
  width: 30px; height: 30px; flex: none; border-radius: 999px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.shead :is(h2, h3, h4) { font-size: clamp(20px, 4.4vw, 25px); font-weight: 800; letter-spacing: -.02em; color: var(--navy); }

/* ---------- services grid ---------- */
.services { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .services { grid-template-columns: 1fr 1fr; } }
.svc {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 15px 16px; border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .15s var(--ease), box-shadow .18s var(--ease);
}
.svc:hover { border-color: var(--accent); box-shadow: 0 6px 18px -12px rgba(143,90,44,.5); }
.svc:active { transform: scale(.99); }
.svc[aria-pressed="true"] { border-color: var(--accent); background: var(--cream); box-shadow: inset 0 0 0 1px var(--accent); }
.svc .t { font-size: 15.5px; font-weight: 700; color: var(--navy); }
.svc .d { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.svc .p { margin-top: 2px; font-size: 13.5px; font-weight: 800; color: var(--accent-dark); }

/* ---------- survey fields ---------- */
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.flabel { display: block; font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.fhint { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; line-height: 1.45; }
.flabel + .rows, .flabel + .fhint { margin-top: 8px; }
.rows { display: grid; gap: 9px; }

.row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 50px; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 500;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.row:hover { border-color: var(--border-strong); }
.row .ind {
  width: 21px; height: 21px; flex: none; border: 1.6px solid var(--border-strong);
  display: grid; place-items: center; color: transparent;
  transition: border-color .16s var(--ease), background .16s var(--ease), color .16s var(--ease);
}
.row.radio .ind { border-radius: 999px; }
.row.check .ind { border-radius: 6px; }
.row .ind svg { width: 13px; height: 13px; }
.row .ind .dot { width: 10px; height: 10px; border-radius: 999px; background: currentColor; }
.row .rl { flex: 1 1 auto; }
.row .delta { font-weight: 800; color: var(--accent-dark); white-space: nowrap; font-size: 13.5px; }
.row .incl { font-weight: 600; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.row[aria-pressed="true"] { border-color: var(--accent); background: var(--cream); color: var(--navy); font-weight: 600; }
.row[aria-pressed="true"] .ind { border-color: var(--accent); color: var(--accent); }
.row.check[aria-pressed="true"] .ind { background: var(--accent); color: #fff; }

select.inp, input.inp, textarea.inp {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
select.inp {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237A6A54' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center;
}
textarea.inp { min-height: 96px; resize: vertical; line-height: 1.5; }
input.inp[type="number"] { max-width: 140px; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(143,90,44,.18); }
input[aria-invalid="true"] { border-color: var(--danger); }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; width: 100%; min-height: 132px; padding: 22px 18px; text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--cream);
  color: var(--muted-2); cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease);
}
.dropzone:hover { border-color: var(--accent); background: #F6ECDB; }
.dropzone.drag { border-color: var(--accent); border-style: solid; background: #F6ECDB; box-shadow: 0 0 0 3px rgba(143,90,44,.16); transform: scale(1.004); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dz-ico {
  width: 46px; height: 46px; flex: none; border-radius: 999px; background: var(--surface);
  border: 1.5px solid var(--border); display: grid; place-items: center; color: var(--accent);
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.dropzone:hover .dz-ico, .dropzone.drag .dz-ico { transform: translateY(-2px); border-color: var(--accent); }
.dz-ico svg { width: 22px; height: 22px; }
.dz-title { font-size: 14.5px; font-weight: 700; color: var(--navy); }
.dz-title .lnk { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.dz-sub { font-size: 12px; color: var(--muted); }

.dz-files { display: grid; gap: 9px; margin-top: 12px; }
.dz-file {
  display: flex; align-items: center; gap: 12px; padding: 9px 11px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  animation: enter .26s var(--ease) both;
}
.dz-thumb {
  width: 42px; height: 42px; flex: none; border-radius: 9px; object-fit: cover;
  background: var(--cream); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent);
}
.dz-thumb svg { width: 20px; height: 20px; }
.dz-meta { flex: 1 1 auto; min-width: 0; }
.dz-name { font-size: 13.5px; font-weight: 600; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-size { font-size: 12px; color: var(--muted); }
.dz-x {
  width: 30px; height: 30px; flex: none; border-radius: 999px; display: grid; place-items: center;
  color: var(--muted); transition: background .16s var(--ease), color .16s var(--ease);
}
.dz-x:hover { background: var(--cream); color: var(--danger); }
.dz-x svg { width: 15px; height: 15px; }

.err { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 13px; color: var(--danger); font-weight: 600; }
.err svg { width: 15px; height: 15px; flex: none; }

/* ---------- pick a time ---------- */
.subh { font-size: 14px; font-weight: 700; color: var(--navy); margin: 4px 0 10px; }
.dates { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; }
.datechip {
  flex: 0 0 auto; width: 78px; padding: 11px 6px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); text-align: center; transition: border-color .16s var(--ease), background .16s var(--ease);
}
.datechip:hover { border-color: var(--border-strong); }
.datechip .wd { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.datechip .dd { font-size: 20px; font-weight: 800; color: var(--navy); line-height: 1.15; }
.datechip .mo { font-size: 11px; font-weight: 600; color: var(--muted); }
.datechip .fd { display: block; font-size: 10.5px; font-weight: 700; color: var(--accent-dark); margin-top: 3px; }
.datechip[aria-pressed="true"] { border-color: var(--accent); background: var(--cream); }
.datechip[aria-pressed="true"] .wd, .datechip[aria-pressed="true"] .mo { color: var(--accent-dark); }

.times { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.timechip {
  min-height: 44px; padding: 10px 18px; font-size: 14.5px; font-weight: 700;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--navy);
  transition: border-color .16s var(--ease), background .16s var(--ease), color .16s var(--ease);
}
.timechip:hover { border-color: var(--border-strong); }
.timechip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ---------- contact ---------- */
.contact { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 20px; }
.fields { display: grid; gap: 15px; }
@media (min-width: 560px) { .fields.two { grid-template-columns: 1fr 1fr; } }
.fl { display: block; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.opt { font-weight: 500; color: var(--muted); }

.prefill-note {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--muted-2); font-size: 13px; font-weight: 600;
}
.prefill-note svg { width: 16px; height: 16px; flex: none; color: var(--accent-dark); }
input.inp.locked { background: var(--cream); color: var(--muted-2); cursor: default; border-style: dashed; }
input.inp.locked:focus { box-shadow: none; border-color: var(--border-strong); }

.confirmbtn {
  margin-top: 20px; width: 100%; min-height: 54px; border-radius: 13px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 10px 22px -10px rgba(143,90,44,.55);
  transition: background .16s var(--ease), transform .12s var(--ease);
}
.confirmbtn:hover { background: var(--accent-dark); }
.confirmbtn:active { transform: scale(.99); }
.confirmbtn svg { width: 19px; height: 19px; }
.reassure { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.reassure svg { width: 14px; height: 14px; color: var(--accent); flex: none; }

/* ---------- confirmation ---------- */
.confirm-head { text-align: center; padding: 6px 0 4px; }
.tick {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 999px; background: var(--cream);
  display: grid; place-items: center; color: var(--accent-dark);
}
.tick svg { width: 32px; height: 32px; }
.confirm-head :is(h2, h3) { font-size: clamp(23px, 5.4vw, 30px); font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.confirm-head p { margin-top: 8px; color: var(--muted-2); font-size: 15px; max-width: 46ch; margin-inline: auto; }

.summary { margin-top: 20px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.sline { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 15px; font-size: 14px; border-bottom: 1px solid var(--border); }
.sline:last-child { border-bottom: none; }
.sline .sk { color: var(--muted); font-weight: 600; flex: none; }
.sline .sv { text-align: right; font-weight: 600; color: var(--ink); }
.sline.tot { background: var(--cream); }
.sline.tot .sk { color: var(--navy); font-weight: 800; }
.sline.tot .sv { color: var(--accent-dark); font-weight: 800; font-size: 16.5px; }

.cactions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 20px; }
.cbtn { flex: 1 1 auto; min-height: 52px; padding: 13px 20px; border-radius: 13px; font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.cbtn svg { width: 18px; height: 18px; }
.cbtn.primary { background: var(--navy); color: #fff; }
.cbtn.primary:hover { background: #241A10; }
.cbtn.ghost { border: 1.5px solid var(--border-strong); color: var(--navy); background: var(--surface); flex: 0 0 auto; }
.cbtn.ghost:hover { border-color: var(--accent); }

/* ---------- page footer ---------- */
.pagefoot { margin-top: 28px; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.pagefoot a { color: var(--muted); }

/* ---------- sticky total bar ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--shadow-pop);
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px;
  transform: translateY(0); transition: transform .3s var(--ease), opacity .3s var(--ease);
}
body:not(.iq-active) .sticky { transform: translateY(110%); opacity: 0; pointer-events: none; }
.sticky .inner { width: 100%; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.sticky .brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sticky .logo { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 15px; letter-spacing: -.03em; }
.sticky .tl { min-width: 0; }
.sticky .tl .cap { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sticky .tl .amt { font-size: 21px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.1; }
.sticky .help { margin-left: auto; flex: none; display: flex; align-items: center; gap: 11px; }
.sticky .helptext { font-size: 13px; font-weight: 600; color: var(--muted-2); white-space: nowrap; }
.sticky .call {
  flex: none; min-height: 46px; padding: 11px 18px; border-radius: 11px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 14.5px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; transition: background .16s var(--ease);
}
.sticky .call:hover { background: var(--accent-dark); }
.sticky .call svg { width: 17px; height: 17px; }
@media (max-width: 440px) { .sticky .helptext { display: none; } }
@media (max-width: 360px) { .sticky .call span { display: none; } }

.reveal { opacity: 0; transform: translateY(10px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
