/* ============================================================
   Instant Quotes demo (Demos page, tile 02): one quote from "how much?" to booked.
   Dark theme: near-black canvas, raised charcoal cards, white as the one accent, soft tinted status pills. Ideas taken from quoting dashboards (a quote document with an
   optional-extras block, pipeline stages with a dollar figure under each, a goal marker on a progress bar,
   a highlighted "needs attention" row) but not their layouts. Every text colour is at least 4.5:1 on its
   background (white on the emerald is about 5.5:1). See scripts/quotes-demo.js.
   ============================================================ */
.qd {
  --qd-ink: #fafafa; --qd-soft: #d4d4d8; --qd-muted: #a1a1aa; --qd-faint: #71717a;
  --qd-line: #212125; --qd-line-2: #2e2e33; --qd-tint: #121215; --qd-tint-2: #1a1a1e;
  --qd-accent: #fafafa; --qd-hi: #d4d4d8; --qd-soft-bg: #1b1b1f; --qd-blue: #d4d4d8;
  --qd-bg: #09090b; --qd-card: #0f0f12; --qd-field: #141417; --qd-on: #09090b; --qd-shadow: rgba(0, 0, 0, 0.55);
  --qd-ease: cubic-bezier(0.23, 1, 0.32, 1);
  container: qd / size;
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; outline: 0;
  font-family: var(--font-body, 'Switzer', 'Segoe UI', sans-serif); font-size: 13.5px; line-height: 1.4;
  color: var(--qd-ink); background: var(--qd-bg); color-scheme: dark; letter-spacing: -0.003em; -webkit-font-smoothing: antialiased;
}
.qd [hidden] { display: none !important; }
:where(.qd) button, :where(.qd) input { font: inherit; color: inherit; letter-spacing: inherit; }
:where(.qd) button { cursor: pointer; border: 0; background: none; text-align: left; padding: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.qd-i { width: 16px; height: 16px; flex: none; display: block; }
.qd :focus-visible { outline: 2px solid var(--qd-ink); outline-offset: 2px; }
.qd input:focus, .qd input:focus-visible { outline: 0; box-shadow: none; }
.qd h3 { margin: 0; font-weight: 500; font-size: 18px; letter-spacing: -0.02em; }
@keyframes qd-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.qd-count { margin-left: 6px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--qd-tint-2); color: var(--qd-muted); font-size: 12px; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.qd-ai { display: inline-flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 260px; }
.qd-ai-orb { width: 28px; height: 28px; flex: none; display: block; }
.qd-ai-t { font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--qd-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd-choose { flex: none; padding: 14px 20px 10px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 100%); border-bottom: 1px solid var(--qd-line); }
.qd-choose-l { margin: 0 0 9px; display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; min-height: 32px; }
.qd-ctl { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.qd-choose-l b { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--qd-accent); }
.qd-choose-l span { font-size: 12.5px; color: var(--qd-muted); }
.qd-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qd-mode { position: relative; display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 16px; border: 1px solid var(--qd-line-2); background: var(--qd-card); min-width: 0; box-shadow: 0 1px 2px var(--qd-shadow); transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 160ms ease, box-shadow 180ms ease; }
.qd-mode .qd-i { width: 34px; height: 34px; padding: 8px; border-radius: 11px; background: var(--qd-soft-bg); color: var(--qd-accent); flex: none; transition: background-color 180ms ease, color 180ms ease; }
.qd-mode > span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.qd-mode b { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd-mode i { font-style: normal; font-size: 12px; color: var(--qd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd-mode:hover { border-color: #52525b; background: var(--qd-tint-2); }
.qd-mode:active { transform: scale(0.98); }
.qd-mode.is-on { background: var(--qd-accent); border-color: var(--qd-accent); color: var(--qd-on); box-shadow: 0 10px 24px -14px rgba(255, 255, 255, 0.35); }
.qd-mode.is-on .qd-i { background: rgba(9, 9, 11, 0.08); color: var(--qd-on); }
.qd-mode.is-on i { color: #52525b; }
.qd-pause, .qd-skip { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--qd-line-2); background: var(--qd-field); font-size: 13px; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease; }
.qd-pause:hover, .qd-skip:hover { border-color: #52525b; background: var(--qd-tint-2); }
.qd-pause:active, .qd-skip:active { transform: scale(0.97); }

/* ---------- the four steps and what is happening ---------- */
.qd-rail { padding: 2px 20px 10px; flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.qd-steps { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; flex: none; }
.qd-step { display: inline-flex; align-items: center; gap: 8px; padding: 4px 13px 4px 5px; border-radius: 999px; border: 1px solid var(--qd-line); color: var(--qd-muted); transition: background-color 260ms ease, color 260ms ease, border-color 260ms ease; }
.qd-n { width: 22px; height: 22px; border-radius: 50%; background: var(--qd-tint-2); color: var(--qd-soft); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; transition: background-color 260ms ease, color 260ms ease; }
.qd-sl b { font-weight: 500; font-size: 13px; white-space: nowrap; }
.qd-step.is-on { background: var(--qd-accent); border-color: var(--qd-accent); color: var(--qd-on); }
.qd-step.is-on .qd-n { background: var(--qd-on); color: var(--qd-accent); }
.qd-step.is-done { color: var(--qd-soft); border-color: var(--qd-line-2); }
.qd-step.is-done .qd-n { background: var(--qd-ink); color: var(--qd-on); }
.qd-cap { margin: 0; flex: 1 0 100%; min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--qd-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qd-cap.qd-swap { animation: qd-fade 420ms ease-out both; }

/* ---------- the pipeline across the top ---------- */
.qd-pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.25fr); margin: 0 20px 10px; flex: none; border: 1px solid var(--qd-line); border-radius: 16px; background: var(--qd-card); box-shadow: 0 1px 2px var(--qd-shadow); overflow: hidden; }
.qd-cell { display: flex; flex-direction: column; gap: 3px; padding: 9px 16px 10px; min-width: 0; border-left: 1px solid var(--qd-line); }
.qd-cell:first-child { border-left: 0; }
.qd-pill { align-self: flex-start; display: inline-flex; align-items: center; height: 21px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; }
.qd-big { font-size: 24px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.qd-sub { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--qd-muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.qd-sub em { font-style: normal; font-weight: 600; color: var(--qd-ink); font-variant-numeric: tabular-nums; }
.qd-sub i { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.qd-rate-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; }
.qd-rate-h b { font-weight: 500; color: var(--qd-soft); }
.qd-rate-h em { font-style: normal; color: var(--qd-muted); }
.qd-meter { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--qd-tint-2); margin-top: 3px; overflow: visible; }
.qd-meter-f { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--qd-blue); transition: width 640ms var(--qd-ease); }
.qd-meter-g { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: #71717a; }

/* tags (pastel pills) */
.qd-tag, .qd-pill { white-space: nowrap; }
.qd-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.qd-t-purple { background: #1f1f23; color: #a1a1aa; } .qd-t-amber { background: rgba(245, 158, 11, 0.14); color: #fbbf24; } .qd-t-teal { background: rgba(45, 212, 191, 0.12); color: #5eead4; }
.qd-t-blue { background: rgba(96, 165, 250, 0.14); color: #93c5fd; } .qd-t-green { background: rgba(74, 222, 128, 0.12); color: #4ade80; } .qd-t-red { background: rgba(248, 113, 113, 0.14); color: #f87171; } .qd-t-orange { background: rgba(251, 146, 60, 0.14); color: #fdba74; }

/* ---------- the panels ---------- */
.qd-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px 14px; padding: 0 20px; }
.qd-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--qd-line); }
.qd-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; font-size: 13.5px; color: var(--qd-muted); transition: color 160ms ease; }
.qd-tab .qd-i { width: 15px; height: 15px; }
.qd-tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--qd-accent); transform: scaleX(0); transition: transform 260ms var(--qd-ease); }
.qd-tab:hover { color: var(--qd-ink); }
.qd-tab.is-on { color: var(--qd-accent); font-weight: 500; }
.qd-tab.is-on::after { transform: scaleX(1); }
.qd-p { min-height: 0; display: none; flex-direction: column; }
.qd[data-tab="cust"] .qd-p-cust, .qd[data-tab="quotes"] .qd-p-quotes, .qd[data-tab="doc"] .qd-p-doc { display: flex; }

/* the customer's phone */
.qd-phone { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--qd-line-2); border-radius: 22px; background: var(--qd-card); overflow: hidden; box-shadow: 0 1px 2px var(--qd-shadow), 0 18px 34px -22px var(--qd-shadow); }
.qd-ph-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--qd-line); background: var(--qd-tint); flex: none; }
.qd-ph-av { width: 30px; height: 30px; border-radius: 50%; background: #2a2a2f; color: var(--qd-ink); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.qd-ph-t { display: flex; flex-direction: column; line-height: 1.2; }
.qd-ph-t b { font-weight: 500; font-size: 13.5px; }
.qd-ph-t i { font-style: normal; font-size: 11.5px; color: var(--qd-muted); }
.qd-thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.qd-thread::-webkit-scrollbar { display: none; }
.qd-bw { display: flex; }
.qd-bw-c { justify-content: flex-end; } .qd-bw-t { justify-content: flex-start; }
.qd-b { max-width: 84%; padding: 8px 13px; border-radius: 18px; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.qd-b-c { background: var(--qd-accent); color: var(--qd-on); border-bottom-right-radius: 5px; }
.qd-b-t { background: var(--qd-tint-2); color: var(--qd-ink); border-bottom-left-radius: 5px; }
.qd-enter { animation: qd-fade 260ms var(--qd-ease) both; }
.qd-dots { display: inline-flex; align-items: center; gap: 4px; padding: 11px 14px; }
.qd-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: qd-dot 900ms ease-in-out infinite; }
.qd-dots i:nth-child(2) { animation-delay: 140ms; } .qd-dots i:nth-child(3) { animation-delay: 280ms; }
@keyframes qd-dot { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
.qd-tempty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 24px; color: var(--qd-muted); max-width: 250px; }
.qd-tempty .qd-i { width: 26px; height: 26px; color: var(--qd-faint); }
.qd-tempty b { color: var(--qd-ink); font-weight: 500; }
.qd-tempty span { font-size: 12.5px; }
.qd-card { width: 100%; border: 1px solid var(--qd-line-2); border-radius: 16px; overflow: hidden; background: var(--qd-bg); box-shadow: 0 1px 2px var(--qd-shadow), 0 14px 28px -20px var(--qd-shadow); }
.qd-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--qd-tint-2); border-bottom: 1px solid var(--qd-line); color: var(--qd-ink); }
.qd-card-h span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.qd-card-h i { font-style: normal; font-size: 11.5px; color: var(--qd-muted); }
.qd-card-h b { font-weight: 500; font-size: 13.5px; }
.qd-card-h em { font-style: normal; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.qd-card-b { padding: 8px 14px 4px; }
.qd-cl { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--qd-line); }
.qd-cl:last-child { border-bottom: 0; }
.qd-cl-ck { width: 18px; flex: none; display: inline-flex; }
.qd-cl-t { flex: 1; min-width: 0; }
.qd-cl b { font-weight: 500; font-variant-numeric: tabular-nums; }
.qd-cl.is-off { color: var(--qd-muted); } .qd-cl.is-off b { font-weight: 400; }
.qd-cl-d { color: var(--qd-soft); }
.qd-card-o { margin: 8px 0 0; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--qd-muted); }
.qd-approve { width: calc(100% - 20px); margin: 8px 10px 10px; height: 42px; border-radius: 12px; background: var(--qd-accent); color: var(--qd-on); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; transition: background-color 160ms ease, transform 160ms ease; }
.qd-approve:hover { background: var(--qd-hi); }
.qd-approve:active { transform: scale(0.98); }
.qd-approve.is-hint { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22); }
.qd-slots { padding: 6px 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.qd-slots p { margin: 0 0 2px; font-size: 12px; color: var(--qd-muted); }
.qd-slot { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--qd-line-2); font-size: 13px; transition: border-color 140ms ease, background-color 140ms ease; }
.qd-slot .qd-i { width: 15px; height: 15px; color: var(--qd-accent); }
.qd-slot:hover { border-color: #52525b; background: var(--qd-soft-bg); }
.qd-booked { margin: 6px 10px 10px; padding: 10px 12px; border-radius: 12px; background: rgba(74, 222, 128, 0.12); color: #4ade80; display: flex; align-items: center; gap: 10px; }
.qd-booked .qd-i { width: 20px; height: 20px; }
.qd-booked span { display: flex; flex-direction: column; line-height: 1.25; }
.qd-booked b { font-weight: 600; font-size: 13px; } .qd-booked i { font-style: normal; font-size: 12.5px; }
.qd-booked.is-no { background: rgba(248, 113, 113, 0.14); color: #f87171; }

/* the list of all quotes */
.qd-p-quotes { border: 1px solid var(--qd-line); border-radius: 16px; overflow: hidden; background: var(--qd-card); box-shadow: 0 1px 2px var(--qd-shadow); }
.qd-qh, .qd-row { display: grid; grid-template-columns: minmax(150px, 1.5fr) 76px 118px minmax(120px, 1.5fr); column-gap: 10px; align-items: center; padding: 0 14px; }
.qd-qh { height: 32px; flex: none; background: var(--qd-tint); border-bottom: 1px solid var(--qd-line); font-size: 11px; color: var(--qd-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.qd-rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.qd-rows::-webkit-scrollbar { display: none; }
.qd-row { position: relative; min-height: 54px; border-bottom: 1px solid var(--qd-line); cursor: pointer; transition: background-color 160ms ease; }
.qd-row:hover { background: var(--qd-tint); }
.qd-row.is-cur { background: var(--qd-soft-bg); }
.qd-row.is-attn { background: rgba(245, 158, 11, 0.09); box-shadow: inset 3px 0 0 #f59e0b; }
.qd-row.is-busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); transform: translateX(-100%); animation: qd-scan 900ms ease-in-out infinite; pointer-events: none; }
@keyframes qd-scan { to { transform: translateX(100%); } }
.qd-c { min-width: 0; display: flex; align-items: center; gap: 8px; }
.qd-c-q { gap: 10px; }
.qd-ava { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; color: var(--qd-soft); }
.qd-qn { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; border-radius: 6px; }
.qd-qn b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd-qn i { font-style: normal; font-size: 12px; color: var(--qd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd-qn:hover b { color: var(--qd-accent); }
.qd-c-t { font-weight: 500; font-variant-numeric: tabular-nums; }
.qd-c-s { flex-wrap: wrap; gap: 4px; }
.qd-c-a { font-size: 12.5px; color: var(--qd-soft); display: block; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.qd-working { display: inline-flex; align-items: center; gap: 4px; color: var(--qd-soft); }
.qd-working i { width: 4px; height: 4px; border-radius: 50%; background: var(--qd-accent); animation: qd-dot 900ms ease-in-out infinite; }
.qd-working i:nth-child(2) { animation-delay: 140ms; } .qd-working i:nth-child(3) { animation-delay: 280ms; margin-right: 4px; }
.qd-qf { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--qd-line); flex: none; font-size: 12.5px; color: var(--qd-muted); }
.qd-chase { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 10px; background: var(--qd-accent); color: var(--qd-on); font-size: 13px; font-weight: 500; flex: none; transition: background-color 160ms ease, transform 160ms ease; }
.qd-chase .qd-i { width: 15px; height: 15px; }
.qd-chase:hover { background: var(--qd-hi); }
.qd-chase:active { transform: scale(0.97); }

/* the quote document */
.qd-p-doc { border: 1px solid var(--qd-line); border-radius: 16px; background: var(--qd-card); overflow: hidden; box-shadow: 0 1px 2px var(--qd-shadow), 0 18px 34px -24px var(--qd-shadow); }
.qd-docempty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--qd-muted); padding: 24px; }
.qd-docempty .qd-i { width: 28px; height: 28px; color: var(--qd-faint); }
.qd-docempty b { color: var(--qd-ink); font-weight: 500; }
.qd-dh { padding: 10px 18px 8px; border-bottom: 1px solid var(--qd-line); flex: none; }
.qd-dh-r { display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; }
.qd-dh-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qd-dno { font-size: 17px; letter-spacing: -0.02em; color: var(--qd-muted); margin-right: 4px; }
.qd-dno b { color: var(--qd-ink); font-weight: 600; }
.qd-meta { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 6px; font-size: 12.5px; }
.qd-meta span { display: inline-flex; gap: 6px; }
.qd-meta i { font-style: normal; color: var(--qd-muted); } .qd-meta b { font-weight: 500; }
.qd-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 0 18px; }
.qd-body::-webkit-scrollbar { display: none; }
.qd-th, .qd-ln { display: grid; grid-template-columns: 22px minmax(0, 1fr) 54px 92px; column-gap: 10px; align-items: center; }
.qd-th { position: sticky; top: 0; z-index: 1; height: 30px; background: var(--qd-card); font-size: 11px; color: var(--qd-muted); letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--qd-line); }
.qd-th span:nth-child(3), .qd-th span:nth-child(4), .qd-ln-q, .qd-ln-p { text-align: right; }
.qd-ln { padding: 9px 0; border-bottom: 1px solid var(--qd-line); }
.qd-ln-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.qd-ln-t b { font-weight: 500; font-size: 13.5px; }
.qd-ln-t i { font-style: normal; font-size: 12px; color: var(--qd-muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.qd-src { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 5px; background: var(--qd-soft-bg); color: var(--qd-accent); font-size: 11px; font-weight: 500; font-style: normal; }
.qd-src.is-est { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.qd-ln-q { font-size: 12.5px; color: var(--qd-muted); font-variant-numeric: tabular-nums; }
.qd-ln-p { font-weight: 500; font-variant-numeric: tabular-nums; }
.qd-ln-p em { font-style: normal; font-weight: 400; color: var(--qd-muted); }
.qd-ln.is-off .qd-ln-t b { color: var(--qd-soft); }
.qd-ln.qd-new { animation: qd-line 320ms var(--qd-ease) both; }
@keyframes qd-line { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.qd-ln-skel { padding: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.qd-ln-skel i { display: block; height: 10px; border-radius: 5px; background: var(--qd-tint-2); }
.qd-ln-skel i:last-child { width: 60%; }
.qd-optH { display: flex; align-items: baseline; gap: 10px; padding: 12px 0 4px; }
.qd-optH b { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--qd-soft); }
.qd-optH i { font-style: normal; font-size: 12px; color: var(--qd-muted); }
.qd-foot { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 46%); border-top: 1px solid var(--qd-line); background: var(--qd-tint); }
.qd-tot { padding: 8px 18px 8px; min-width: 0; }
.qd-tot-r { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; font-size: 13px; color: var(--qd-soft); }
.qd-tot-r b { font-weight: 500; color: var(--qd-ink); font-variant-numeric: tabular-nums; }
.qd-tot-t { padding-top: 3px; font-size: 14px; color: var(--qd-ink); } .qd-tot-t b { font-size: 21px; font-weight: 600; letter-spacing: -0.03em; color: var(--qd-accent); }
.qd-tot-d { color: var(--qd-soft); } .qd-tot-d span { display: inline-flex; align-items: center; gap: 6px; } .qd-tot-d .qd-i { width: 13px; height: 13px; }
.qd-pop { animation: qd-pop 260ms var(--qd-ease); }
@keyframes qd-pop { from { transform: scale(1.06); } to { transform: none; } }
.qd-nums { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; }
.qd-nums-l { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--qd-muted); }
.qd-num { display: inline-flex; align-items: center; gap: 6px; }
.qd-num > i { font-style: normal; color: var(--qd-muted); }
.qd-num > b { font-weight: 500; }
.qd-step2 { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--qd-line-2); border-radius: 8px; padding: 1px; }
.qd-step2 b { min-width: 48px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.qd-step2 button { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--qd-accent); transition: background-color 140ms ease, transform 140ms ease; }
.qd-step2 button .qd-i { width: 13px; height: 13px; stroke-width: 2.2; }
.qd-step2 button:hover:not(:disabled) { background: var(--qd-soft-bg); }
.qd-step2 button:active:not(:disabled) { transform: scale(0.92); }
.qd-step2 button:disabled { color: #52525b; cursor: not-allowed; }
.qd-marg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; padding: 3px 9px; border-radius: 8px; background: var(--qd-tint-2); color: var(--qd-soft); font-size: 12px; width: fit-content; max-width: 100%; }
.qd-marg .qd-i { width: 13px; height: 13px; color: var(--qd-muted); }
.qd-marg b { font-weight: 600; color: var(--qd-ink); font-variant-numeric: tabular-nums; }
.qd-marg i { font-style: normal; color: var(--qd-muted); }
.qd-hold { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 8px; padding: 10px 16px; background: var(--qd-soft-bg); border-left: 1px solid var(--qd-line-2); min-width: 0; }
.qd-hold > span { display: flex; align-items: center; gap: 4px 10px; min-width: 0; flex-wrap: wrap; }
.qd-hold > span > .qd-i { flex: none; }
.qd-hold > span > i { flex-basis: 100%; padding-left: 28px; margin-top: -3px; }
.qd-hold .qd-i { width: 18px; height: 18px; color: var(--qd-accent); }
.qd-hold b { font-weight: 600; color: var(--qd-hi); }
.qd-hold i { font-style: normal; font-size: 12.5px; color: var(--qd-soft); }
.qd-hold.is-calm { background: var(--qd-tint); border-left-color: var(--qd-line); } .qd-hold.is-calm b { color: var(--qd-ink); } .qd-hold.is-calm .qd-i { color: var(--qd-muted); }
.qd-hold.is-ok { background: rgba(74, 222, 128, 0.09); border-left-color: rgba(74, 222, 128, 0.22); } .qd-hold.is-ok b, .qd-hold.is-ok .qd-i { color: #4ade80; } .qd-hold.is-ok i { color: #86efac; }
.qd-primary, .qd-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 11px; font-weight: 500; flex: none; transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease; }
.qd-primary { background: var(--qd-accent); color: var(--qd-on); } .qd-primary:hover { background: var(--qd-hi); } .qd-primary:active { transform: scale(0.97); }
.qd-primary .qd-i, .qd-ghost .qd-i { width: 15px; height: 15px; }
.qd-hold .qd-primary .qd-i { color: var(--qd-on); }
.qd-ghost { border: 1px solid var(--qd-line-2); background: var(--qd-field); color: var(--qd-ink); } .qd-ghost:hover { border-color: #52525b; background: var(--qd-tint-2); } .qd-ghost:active { transform: scale(0.97); }
.qd-hold .qd-ghost .qd-i { color: var(--qd-accent); }
.qd-ck { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #52525b; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--qd-on); flex: none; position: relative; transition: background-color 140ms ease, border-color 140ms ease; }
.qd-ck::before { content: ""; position: absolute; inset: -8px; }
.qd-ck .qd-i { width: 12px; height: 12px; opacity: 0; transform: scale(0.6); transition: opacity 120ms ease, transform 180ms var(--qd-ease); stroke-width: 2.6; }
.qd-ck:hover { border-color: var(--qd-ink); }
.qd-ck[aria-checked="true"] { background: var(--qd-accent); border-color: var(--qd-accent); }
.qd-ck[aria-checked="true"] .qd-i { opacity: 1; transform: none; }

/* ---------- tap a job, or type your own ---------- */
.qd-dock { padding: 6px 20px 10px; flex: none; }
.qd-chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.qd-chips::-webkit-scrollbar { display: none; }
.qd-chips-l { font-size: 12px; color: var(--qd-muted); white-space: nowrap; margin-right: 2px; }
.qd-chip { display: inline-flex; flex-direction: column; justify-content: center; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--qd-line-2); background: var(--qd-field); line-height: 1.15; flex: none; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease; }
.qd-chip b { font-weight: 500; font-size: 13px; white-space: nowrap; }
.qd-chip i { font-style: normal; font-size: 11.5px; color: var(--qd-muted); white-space: nowrap; }
.qd-chip:hover { border-color: #52525b; background: var(--qd-tint-2); }
.qd-chip:active { transform: scale(0.97); }
.qd-form { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 4px 0 15px; border-radius: 999px; border: 1px solid var(--qd-line-2); background: var(--qd-field); transition: border-color 180ms ease, box-shadow 180ms ease; }
.qd-form:focus-within { border-color: #71717a; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
.qd-in { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 14.5px; caret-color: var(--qd-accent); }
.qd-in::placeholder { color: var(--qd-faint); }
.qd-in:disabled { opacity: 0.6; }
.qd-send { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--qd-accent); color: var(--qd-on); display: inline-flex; align-items: center; justify-content: center; transition: transform 160ms ease, background-color 180ms ease, color 180ms ease; }
.qd-send .qd-i { width: 17px; height: 17px; }
.qd-send:hover:not(:disabled) { background: var(--qd-hi); transform: translateY(-1px); }
.qd-send:active:not(:disabled) { transform: scale(0.95); }
.qd-send:disabled { background: var(--qd-tint-2); color: #52525b; cursor: default; }
.qd-toast { position: absolute; left: 50%; bottom: 96px; transform: translate(-50%, 8px); padding: 9px 16px; border-radius: 999px; background: var(--qd-accent); color: var(--qd-on); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 280ms var(--qd-ease); z-index: 30; white-space: nowrap; }
.qd-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- wide windows: the phone or the list on the left, the quote on the right ---------- */
.df-window:has(.qd) { aspect-ratio: 59 / 45; }
@container qd (min-width: 901px) {
  .qd-main { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); }
  .qd-tabs { grid-column: 1; grid-row: 1; }
  .qd-tab-doc { display: none; }
  .qd-p-cust, .qd-p-quotes { grid-column: 1; grid-row: 2; }
  .qd-p-doc { grid-column: 2; grid-row: 1 / span 2; display: flex; }
  .qd-qh, .qd-row { grid-template-columns: minmax(0, 1fr) 64px auto; }
  .qd-qh > :nth-child(4), .qd-c-a { display: none; }
}
@container qd (max-width: 900px) {
  .qd-pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .qd-cell-rate { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--qd-line); }
  .qd-sub i { display: none; }
}
@container qd (max-width: 640px) {
  .qd-qh, .qd-row { grid-template-columns: minmax(0, 1fr) 64px auto; }
  .qd-qh > :nth-child(4), .qd-c-a { display: none; }
}
@container qd (max-height: 700px) {
  .qd-meta { margin-top: 3px; }
  .qd-sub i { display: none; }
  .qd-chips-l { display: none; }
}
@container qd (max-width: 640px) {
  .qd-rail { padding: 0 14px 6px; }
  .qd-step { padding: 4px; } .qd-step:not(.is-on) .qd-sl { display: none; } .qd-step.is-on { padding-right: 11px; }
  .qd-cap { display: none; } .qd-pipe { display: none; } .qd-sg { font-size: 12px; }
  .qd-pipe { margin: 0 14px 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qd-cell:nth-child(3) { border-left: 0; } .qd-cell:nth-child(n+3) { border-top: 1px solid var(--qd-line); }
  .qd-cell-rate { grid-column: 1 / -1; }
  .qd-cell { padding: 7px 12px 8px; } .qd-big { font-size: 19px; }
  .qd-main { padding: 0 14px; }
  .qd-dock { padding: 4px 14px 8px; }
  .qd-th, .qd-ln { grid-template-columns: 22px minmax(0, 1fr) 40px 74px; column-gap: 8px; }
  .qd-body { padding: 0 12px; } .qd-dh, .qd-tot { padding-left: 12px; padding-right: 12px; }
  .qd-foot { grid-template-columns: minmax(0, 1fr); } .qd-hold { border-left: 0; border-top: 1px solid var(--qd-line-2); flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 12px; }
  .qd-toast { bottom: 88px; }
}
@media (max-width: 640px) { .df-window:has(.qd) { aspect-ratio: auto; height: min(820px, 92svh); } }
@media (prefers-reduced-motion: reduce) {
  .qd *, .qd *::before, .qd *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; }
}

/* waiting for the visitor to tap Approve & Send */
.qd[data-wait] .qd-primary[data-act="approve-send"] { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22); }
@container qd (max-width: 760px) {
  .qd-choose { padding: 10px 12px 8px; } .qd-choose-l span { display: none; }
  .qd-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .qd-mode { padding: 7px 9px; gap: 8px; } .qd-mode .qd-i { width: 28px; height: 28px; padding: 6px; } .qd-mode i { display: none; }
}

/* ---------- the customer's text box, with suggested replies ---------- */
.qd-ph-f { flex: none; padding: 8px 10px 10px; border-top: 1px solid var(--qd-line); background: var(--qd-tint); }
.qd-sug { display: flex; flex-wrap: wrap; gap: 6px; }
.qd-sug:not(:empty) { margin-bottom: 8px; }
.qd-sg { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--qd-line-2); background: var(--qd-field); font-size: 12.5px; color: var(--qd-soft); white-space: nowrap; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease; }
.qd-sg:hover { border-color: #52525b; background: var(--qd-tint-2); color: var(--qd-ink); }
.qd-sg:active { transform: scale(0.97); }
.qd-ph-f .qd-send { width: 32px; height: 32px; }

/* a little bigger window */
.df-window:has(.qd) { width: min(1280px, 100%); }

/* ---------- everything glides: colours, sizes and panels change over a moment, never in a cut ---------- */
.qd-tag, .qd-pill { transition: background-color 260ms ease, color 260ms ease; }
.qd-hold { transition: background-color 320ms ease, border-color 320ms ease; }
.qd-ln, .qd-cl, .qd-ln-t b, .qd-ln-p, .qd-cl b { transition: opacity 240ms ease, color 240ms ease; }
.qd-ck { transition: background-color 180ms ease, border-color 180ms ease; }
.qd-row { transition: background-color 220ms ease, box-shadow 220ms ease; }
.qd-primary, .qd-ghost, .qd-approve { transition: background-color 200ms ease, transform 160ms ease, box-shadow 200ms ease, opacity 200ms ease; }
.qd-primary:active, .qd-ghost:active, .qd-approve:active { transform: scale(0.97); }
.qd-card-h em, .qd-big { font-variant-numeric: tabular-nums; }
.qd-ai-t.qd-say { animation: qd-say 320ms var(--qd-ease) both; }
@keyframes qd-say { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.qd[data-tab="cust"] .qd-p-cust, .qd[data-tab="quotes"] .qd-p-quotes, .qd[data-tab="doc"] .qd-p-doc { animation: qd-pane 280ms var(--qd-ease) both; }
@keyframes qd-pane { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qd-reflow .qd-main, .qd-reflow .qd-pipe { animation: qd-pane 340ms var(--qd-ease) both; }
@media (prefers-reduced-motion: reduce) { .qd * { animation: none !important; transition: none !important; } }

/* room between the demo and the closing call to action */
.dv-space[data-frame="window"]:has(.qd) { margin-bottom: clamp(200px, 20vw, 320px); }

/* the list is two short lines per quote, so names never get squeezed */
.qd-qh, .qd-row { grid-template-columns: minmax(0, 1fr) auto; }
.qd-qh > :nth-child(3), .qd-qh > :nth-child(4) { display: none; }
.qd-row { padding-top: 9px; padding-bottom: 9px; row-gap: 5px; min-height: 0; }
.qd-c-s { grid-column: 1 / -1; padding-left: 42px; }
.qd-c-a { display: block; grid-column: 1 / -1; padding-left: 42px; -webkit-line-clamp: 1; font-size: 12px; color: var(--qd-muted); }
.qd-c-a:empty { display: none; }
.qd-row.is-attn .qd-c-a { color: #fbbf24; font-weight: 500; }

/* the thinking orb is drawn dark-on-light; flip it for the dark window */
.qd-ai-orb { filter: invert(1) hue-rotate(180deg); }
