@import url('https://fonts.googleapis.com/css2?family=Calistoga&family=Inter:wght@400;500;600;700;800&display=swap');

/* Demo page - the sales narrative wrapped around the widget.
   Colour tokens are inherited from widget.css; only new ones live here. */
:root {
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Calistoga", Georgia, "Times New Roman", serif;
  --band: #E7DAC5;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 48px;
}

body.demo { padding-bottom: 0; }
body.demo.iq-active { padding-bottom: 88px; }

.d-wrap { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 20px; }
.d-narrow { max-width: 720px; }

.d-sec { padding: var(--space-lg) 0; }
.d-sec.band { background: var(--band); }
.d-sec.surface { background: var(--surface); }
@media (min-width: 760px) { .d-sec { padding: 72px 0; } }

.d-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark);
}
.d-eyebrow .n {
  width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 11px; letter-spacing: 0;
}
.d-sec h2 {
  font-family: var(--display); font-weight: 400; color: var(--navy);
  font-size: clamp(27px, 5.6vw, 40px); line-height: 1.14; letter-spacing: -.01em;
}
.d-sec > .d-wrap > p, .d-lead { margin-top: 14px; color: var(--muted-2); font-size: 16.5px; line-height: 1.65; max-width: 60ch; }

/* ---------- brand bar ---------- */
.d-topbar { padding: 20px 0 0; }
.d-topbar .d-wrap { display: flex; justify-content: flex-end; }
.d-logo {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 4px;
  text-decoration: none; color: var(--navy);
}
.d-logo .mark {
  width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--accent);
  display: grid; place-items: center; color: #fff;
}
.d-logo .mark svg { width: 16px; height: 16px; }
.d-logo .word {
  font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -.01em; line-height: 1;
}

/* ---------- hook ---------- */
.d-hook { padding: 14px 0 var(--space-lg); text-align: left; }
@media (min-width: 760px) { .d-hook { padding: 40px 0 72px; } }
.d-hook .tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; margin-bottom: 14px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  font-size: 12.5px; font-weight: 700; color: var(--muted-2);
}
.d-hook .tag .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent); flex: none; }
.d-hook h1 {
  font-family: var(--display); font-weight: 400; color: var(--navy);
  font-size: clamp(26px, 6.4vw, 44px); line-height: 1.09; letter-spacing: -.015em; max-width: 21ch;
}
.d-hook h1 em { font-style: normal; color: var(--accent-dark); }
.d-hook .d-lead { margin-top: 16px; font-weight: 700; color: var(--navy); }
/* Compact on phones: the hook and its button have to land in one screen. */
.d-hook .d-mail { margin-top: 18px; }
.d-hook .d-gaps { margin-top: 12px; }
.d-hook .d-btn { margin-top: 22px; }
.d-time { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
@media (max-width: 600px) {
  .d-hook .d-mail-body { padding: 14px 15px 16px; }
  .d-hook .d-mail-msg { margin-top: 11px; padding: 12px 13px; font-size: 14px; }
  .d-hook .d-mail-foot { margin-top: 11px; }
}

/* ---------- the typical enquiry ---------- */
.d-mail {
  margin-top: 26px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; box-shadow: var(--shadow-card); max-width: 560px;
}
.d-mail-top {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: #F6EFE3;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.d-mail-top .lights { display: flex; gap: 5px; }
.d-mail-top .lights i { width: 9px; height: 9px; border-radius: 999px; background: var(--border-strong); }
.d-mail-body { padding: 18px 18px 20px; }
.d-mail-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.d-mail-row:last-of-type { border-bottom: none; }
.d-mail-row .k { flex: 0 0 76px; color: var(--muted); font-weight: 600; }
.d-mail-row .v { color: var(--ink); font-weight: 500; }
.d-mail-msg {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg);
  color: var(--muted-2); font-size: 15px; line-height: 1.6; font-style: italic;
}
.d-mail-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }

.d-gaps { display: grid; gap: 10px; margin-top: 26px; max-width: 560px; }
.d-gap {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  font-size: 14.5px; color: var(--muted-2); font-weight: 500;
}
.d-gap svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--danger); }

/* ---------- primary button ---------- */
.d-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 15px 30px; border-radius: 14px;
  background: var(--accent); color: #fff; font-size: 16.5px; font-weight: 700; text-decoration: none;
  box-shadow: 0 12px 26px -12px rgba(143,90,44,.62);
  transition: background .18s var(--ease), transform .14s var(--ease), box-shadow .18s var(--ease);
}
.d-btn:hover { background: var(--accent-dark); box-shadow: 0 16px 30px -12px rgba(143,90,44,.7); }
.d-btn:active { transform: scale(.985); }
.d-btn svg { width: 19px; height: 19px; }
.d-btn.ghost {
  background: var(--surface); color: var(--navy); border: 1.5px solid var(--border-strong); box-shadow: none;
}
.d-btn.ghost:hover { border-color: var(--accent); background: var(--surface); box-shadow: none; }

/* ---------- widget frame ---------- */
.d-frame {
  margin-top: 30px; border: 1px solid var(--border-strong); border-radius: 20px;
  background: var(--bg); box-shadow: 0 2px 4px rgba(58,42,26,.05), 0 26px 60px -34px rgba(58,42,26,.5);
  overflow: hidden;
}
.d-frame-top {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.d-frame-top .lights { display: flex; gap: 5px; flex: none; }
.d-frame-top .lights i { width: 10px; height: 10px; border-radius: 999px; background: var(--border-strong); }
.d-frame-top .url {
  flex: 1 1 auto; min-width: 0; padding: 6px 12px; border-radius: 999px; background: var(--bg);
  font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.d-frame .wrap { padding-top: 24px; padding-bottom: 28px; }
.d-frame .intro h1 { font-size: clamp(24px, 5vw, 34px); }

/* ---------- "request sent" strip inside the frame ---------- */
.d-sent { padding: 34px 20px; text-align: center; }
.d-sent .tick {
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 999px; background: var(--cream);
  display: grid; place-items: center; color: var(--accent-dark);
}
.d-sent .tick svg { width: 28px; height: 28px; }
.d-sent .t { font-size: 18px; font-weight: 700; color: var(--navy); }
.d-sent .s { margin-top: 6px; font-size: 14.5px; color: var(--muted-2); }

/* ---------- the reveal ---------- */
.d-compare { display: grid; gap: 18px; margin-top: 30px; align-items: start; }
/* On phones the payoff card leads; the weak one reads as the contrast under it.
   From 900px they sit side by side in reading order, before then after. */
.d-col.after { order: -1; }
@media (min-width: 900px) {
  .d-compare { grid-template-columns: 0.82fr 1.18fr; gap: 22px; }
  .d-col.after { order: 0; }
}

.d-col-head {
  display: flex; align-items: center; gap: 9px; margin-bottom: 11px;
  font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
}
.d-col-head .pip { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.d-col.before .d-col-head { color: var(--muted); }
.d-col.before .d-col-head .pip { background: var(--border-strong); }
.d-col.after .d-col-head { color: var(--accent-dark); }
.d-col.after .d-col-head .pip { background: var(--accent); }

.d-card {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden;
}
.d-card.dim { background: var(--bg); border-style: dashed; border-color: var(--border-strong); }
.d-card.dim .d-card-top { border-bottom-style: dashed; border-bottom-color: var(--border-strong); }
.d-card.dim .d-card-top .title, .d-card.dim .d-price .amt { color: var(--muted); }
.d-card.hero { border: 1.5px solid var(--accent); box-shadow: 0 2px 4px rgba(58,42,26,.05), 0 20px 46px -28px rgba(143,90,44,.65); }

.d-card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 15px 17px; border-bottom: 1px solid var(--border);
}
.d-card.hero .d-card-top { background: var(--cream); border-bottom-color: var(--border-strong); }
.d-card-top .title { font-size: 16px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.d-card-top .meta { margin-top: 3px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.d-price { flex: none; text-align: right; }
.d-price .cap { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.d-price .amt { font-size: 21px; font-weight: 800; color: var(--accent-dark); font-variant-numeric: tabular-nums; line-height: 1.15; }

.d-card-body { padding: 6px 17px 16px; }
.d-r { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.d-r:last-child { border-bottom: none; }
.d-r .k { color: var(--muted); font-weight: 600; flex: 0 1 auto; }
.d-r .v { color: var(--ink); font-weight: 600; text-align: right; }
.d-r.miss .v { color: var(--danger); font-weight: 600; font-style: italic; }

.d-note { margin-top: 13px; padding: 13px 15px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); }
.d-note .k { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.d-note .v { font-size: 14.5px; color: var(--ink); line-height: 1.55; }

.d-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.d-photos img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border-strong); }
.d-photos .cap { align-self: center; font-size: 13px; color: var(--muted); font-weight: 600; }

.d-quote {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--muted-2); font-size: 15px; line-height: 1.6; font-style: italic;
}
.d-verdict {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 13px 15px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; line-height: 1.5;
}
.d-verdict.bad { background: rgba(178,58,46,.09); color: #8C2E24; }
.d-verdict.good { background: rgba(143,90,44,.11); color: var(--accent-dark); }
.d-verdict svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.d-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- time-saved calculator ---------- */
.d-calc { display: grid; gap: 22px; margin-top: 30px; }
@media (min-width: 860px) { .d-calc { grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; } }

.d-dials { display: grid; gap: 20px; }
.d-dial label { display: block; font-size: 14.5px; font-weight: 700; color: var(--navy); }
.d-dial .hint { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.d-dial-in { display: flex; align-items: center; gap: 13px; margin-top: 10px; }
.d-dial input[type="range"] {
  flex: 1 1 auto; min-width: 0; height: 44px; -webkit-appearance: none; appearance: none; background: none; cursor: pointer;
}
.d-dial input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--border-strong); }
.d-dial input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--border-strong); }
.d-dial input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -10px;
  border-radius: 999px; background: var(--accent); border: 3px solid var(--surface);
  box-shadow: 0 2px 8px -2px rgba(58,42,26,.4);
}
.d-dial input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 999px; background: var(--accent);
  border: 3px solid var(--surface); box-shadow: 0 2px 8px -2px rgba(58,42,26,.4);
}
.d-dial input[type="range"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.d-dial .val {
  flex: 0 0 auto; min-width: 74px; padding: 8px 12px; text-align: center;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  font-size: 15px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums;
}

.d-readout {
  padding: 26px 24px; border: 1.5px solid var(--accent); border-radius: var(--radius);
  background: var(--surface); box-shadow: 0 2px 4px rgba(58,42,26,.05), 0 20px 46px -30px rgba(143,90,44,.6);
}
.d-readout .cap { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.d-readout .headline {
  font-family: var(--display); font-weight: 400; color: var(--accent-dark);
  font-size: clamp(40px, 9vw, 60px); line-height: 1.02; margin-top: 8px; font-variant-numeric: tabular-nums;
}
.d-readout .headline .u { font-size: .42em; color: var(--muted-2); margin-left: 8px; }
.d-readout .sub { margin-top: 8px; font-size: 15px; color: var(--muted-2); line-height: 1.55; }
.d-readout .split { display: grid; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
@media (min-width: 420px) { .d-readout .split { grid-template-columns: 1fr 1fr; } }
.d-readout .split .n { font-size: 25px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.2; }
.d-readout .split .l { margin-top: 3px; font-size: 13px; color: var(--muted); font-weight: 600; line-height: 1.45; }
.d-caveat { margin-top: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* ---------- final CTA / lead form ---------- */
.d-cta { text-align: center; }
.d-cta h2 { margin-inline: auto; max-width: 20ch; }
.d-cta .d-eyebrow { justify-content: center; }
.d-cta .d-lead { margin-inline: auto; text-align: center; }

.d-form {
  max-width: 520px; margin: 30px auto 0; padding: 26px 22px 24px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-card);
}
.d-form .fields { display: grid; gap: 15px; }
@media (min-width: 520px) { .d-form .fields.two { grid-template-columns: 1fr 1fr; } }
.d-form .fields + .fields { margin-top: 15px; }
.d-form .confirmbtn { margin-top: 20px; }
.d-form .reassure { margin-top: 12px; }

.d-formstate {
  display: none; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 13px 15px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; line-height: 1.5;
}
.d-formstate.show { display: flex; }
.d-formstate.err { background: rgba(178,58,46,.09); color: #8C2E24; }
.d-formstate svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.d-thanks { text-align: center; padding: 8px 0 4px; }
.d-thanks .tick {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 999px; background: var(--cream);
  display: grid; place-items: center; color: var(--accent-dark);
}
.d-thanks .tick svg { width: 30px; height: 30px; }
.d-thanks h3 { font-family: var(--display); font-weight: 400; font-size: 25px; color: var(--navy); }
.d-thanks p { margin-top: 9px; font-size: 15px; color: var(--muted-2); line-height: 1.6; }

.confirmbtn[aria-busy="true"] { opacity: .72; cursor: progress; }
.d-spin {
  width: 17px; height: 17px; border-radius: 999px; flex: none;
  border: 2.4px solid rgba(255,255,255,.4); border-top-color: #fff; animation: d-spin .7s linear infinite;
}
@keyframes d-spin { to { transform: rotate(360deg); } }
