/* AI fee calculator widget. Same design as the MCP demo (pr-ai-assistants/public/shared/chat.css), fixed 880 × 680 px:
   embed it with an iframe of height 720 px (680 + room for the shadow). Calculator additions are at the end. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

#chat {
  --purple: #6849c7;
  --purple-2: #876be0;
  --purple-tint: #f3f0fc;
  --purple-line: #d9cff5;
  --text: #29253b;
  --text-2: #555064;
  --muted: #716d80;
  --faint: #898597;
  --placeholder: #898597;
  --line: #e8e4f0;
  --line-2: #f0edf5;
  --fill: #faf9fc;
  --green: #267d62;
  --error: #a93850;
  --white: #fff;
  --widget-w: 880px;
  --widget-h: 680px;
  --radius: 18px;
}

html, body { margin: 0; background: #fff; }

#chat, #chat * { box-sizing: border-box; }
#chat {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.prc-stage { box-sizing: border-box; min-height: 100dvh; display: grid; place-items: center; padding: 12px; }
#chat {
  position: relative;
  width: min(var(--widget-w), 100%);
  height: min(var(--widget-h), calc(100dvh - 24px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: visible;
}

@media (max-width: 680px) {
  .prc-stage { padding: 8px; }
}

.prc-status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .01em; color: #534c68; background: #fbfaff; border: 1px solid #e9e3f4; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.prc-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(35, 138, 105, .12); }
.prc-account { flex: none; display: flex; justify-content: center; padding: 11px 0 0; }

/* Messages occupy the only elastic region; the prompt shelf below always keeps its footprint. */
.prc-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 12px 16px; position: relative; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #d7cee9 transparent; }
.prc-empty { min-height: 100%; display: grid; align-content: center; justify-items: center; gap: 15px; text-align: center; color: var(--muted); max-width: 540px; margin: 0 auto; padding: 12px 12px 20px; }
.prc-empty p { margin: 0; font-family: Manrope, "DM Sans", sans-serif; font-size: clamp(19px, 2.7vw, 25px); line-height: 1.35; letter-spacing: -.035em; font-weight: 650; color: #302b45; }
.prc-empty > span:last-child { color: #6e697d; font-size: 13px; }
.prc-empty-icon { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: #fff; background: radial-gradient(circle at 31% 24%, #fff 0%, #f1e8ff 23%, #c2a9f4 50%, #9872df 70%, #e8dcfb 93%); box-shadow: inset 2px 3px 5px rgba(255, 255, 255, .9), inset -3px -4px 8px rgba(95, 58, 166, .2), 0 0 0 5px #f9f6ff, 0 8px 24px rgba(104, 73, 199, .16); }
.prc-empty-icon svg { width: 26px; height: 26px; visibility: hidden; }
.prc-empty-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 52%; height: 58%; transform: translate(-50%, -50%); background: url("/assets/white-p.png") center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(37, 21, 83, .2)); }
.prc-msg { display: flex; margin: 0 0 12px; }
.prc-msg.user { justify-content: flex-end; }
.prc-bubble { max-width: min(660px, 90%); padding: 11px 15px; border-radius: 15px; overflow-x: auto; font-size: 14px; }
.prc-msg.user .prc-bubble { background: #6849c7; color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 4px 12px rgba(88, 62, 165, .15); }
.prc-msg.bot .prc-bubble { background: #fbfaff; border: 1px solid #e9e4f1; color: var(--text); border-bottom-left-radius: 5px; }
.prc-msg.error .prc-bubble { background: #fff5f5; border: 1px solid #f0d4da; color: var(--error); }
.prc-msg.error > .prc-bubble {
  width: min(100%, 520px);
  max-width: min(520px, 96%);
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 17px 18px 15px;
  overflow: visible;
  border: 1px solid #e5dcf1;
  border-left: 3px solid #8068bd;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff 0%, #faf8ff 100%);
  color: #413a51;
  box-shadow: 0 5px 16px rgba(72, 54, 119, .07);
}
.prc-error-title {
  margin: 0;
  color: #3d3452;
  font-family: Manrope, "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.prc-error-description {
  margin: 0;
  max-width: 54ch;
  color: #575165;
  font-size: 13px;
  line-height: 1.6;
}
.prc-error-refresh {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  padding: 0 15px;
  border: 1px solid #5e43b4;
  border-radius: 10px;
  background: #6849c7;
  color: #fff;
  font: 700 13px/1 "DM Sans", sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(82, 58, 125, .12);
  transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.prc-error-refresh::before {
  content: "↻";
  font-size: 17px;
  line-height: 1;
}
.prc-error-refresh:hover {
  background: #573bab;
  box-shadow: 0 3px 8px rgba(82, 58, 125, .2);
  transform: translateY(-1px);
}
.prc-error-refresh:active { transform: translateY(0); }
.prc-error-refresh:focus-visible {
  outline: 3px solid #c3b3e8;
  outline-offset: 3px;
}
.prc-error-note {
  max-width: 56ch;
  color: #5b5365;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}
.prc-error-reference {
  max-width: 100%;
  color: #716b7a;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.prc-bubble p { margin: 0 0 8px; }
.prc-bubble p:last-child { margin-bottom: 0; }
.prc-bubble ul, .prc-bubble ol { margin: 4px 0 8px; padding-left: 18px; }
.prc-bubble li { margin: 2px 0; }
.prc-bubble strong { font-weight: 700; }
.prc-bubble code { background: #f0ebfb; color: #5138a7; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.prc-bubble a { color: #5138a7; font-weight: 700; text-underline-offset: 2px; }
.prc-bubble table { border-collapse: collapse; margin: 8px 0; font-size: 13px; min-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.prc-bubble th, .prc-bubble td { padding: 6px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
.prc-bubble th { background: #f5f2fb; color: #5f5872; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.prc-bubble tr:last-child td { border-bottom: 0; }
.prc-bubble tbody tr:hover { background: #faf8fe; }
.prc-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.prc-tool { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #533ca5; background: #f0ebfb; border: 1px solid #e4dcf5; border-radius: 999px; padding: 2px 9px; }
.prc-typing { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.prc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); animation: prc-blink 1s infinite; }
.prc-typing i:nth-child(2) { animation-delay: .2s; }
.prc-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes prc-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.prc-suggest {
  flex: 0 0 108px;
  min-height: 108px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: 7px 10px;
  padding: 7px 10px;
  overflow: hidden;
  border-bottom: 1px solid transparent;
  background: #fff;
}
#chat.prc-results-scrollable .prc-suggest { border-bottom-color: #f0edf5; }
.prc-chip {
  min-width: 0;
  width: auto;
  max-width: none;
  min-height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #544e64;
  font-family: "DM Sans", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(68, 52, 105, .09), 0 1px 2px rgba(68, 52, 105, .045);
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.prc-chip::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background-color: #9b86ce;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 1.4 9.35 6.65 14.6 8l-5.25 1.35L8 14.6 6.65 9.35 1.4 8l5.25-1.35L8 1.4Z' fill='%23000'/%3E%3Cpath d='m12.65 1 .55 2.05 2.05.55-2.05.55-.55 2.05-.55-2.05-2.05-.55 2.05-.55L12.65 1Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 1.4 9.35 6.65 14.6 8l-5.25 1.35L8 14.6 6.65 9.35 1.4 8l5.25-1.35L8 1.4Z' fill='%23000'/%3E%3Cpath d='m12.65 1 .55 2.05 2.05.55-2.05.55-.55 2.05-.55-2.05-2.05-.55 2.05-.55L12.65 1Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prc-chip svg { display: none; }
.prc-chip span { min-width: 0; }
.prc-chip:hover { color: #493785; background: #fff; box-shadow: 0 3px 10px rgba(74, 54, 126, .14), 0 1px 3px rgba(74, 54, 126, .07); transform: translateY(-1px); }
.prc-chip:hover::before, .prc-chip:focus-visible::before { background-color: #775bc0; }
.prc-chip:focus-visible { outline: 2px solid #b9a9e2; outline-offset: 3px; color: #493785; }
.prc-chip:disabled { opacity: .5; cursor: default; transform: none; }

#turnstile { flex: none; }
.prc-input {
  flex: none;
  display: flex;
  gap: 9px;
  margin-inline: 12px;
  min-height: 63px;
  padding: 7px;
  align-items: flex-end;
  border: 1px solid #e7e1ef;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(79, 57, 132, .05), 0 0 13px rgba(132, 103, 204, .09), 0 0 18px rgba(177, 161, 217, .07);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.prc-input:focus-within {
  border-color: #c9b9ec;
  box-shadow: 0 5px 16px rgba(79, 57, 132, .07), 0 0 15px rgba(132, 103, 204, .12), 0 0 18px rgba(177, 161, 217, .09);
}
.prc-input textarea { flex: 1; min-width: 0; font: inherit; font-size: 14px; resize: none; height: 45px; max-height: 96px; padding: 11px 12px; border: 0; border-radius: 12px; outline: none; background: transparent; color: var(--text); line-height: 1.5; }
.prc-input textarea::placeholder { color: #777286; }
.prc-input textarea:focus-visible { box-shadow: none; background: transparent; }
.prc-input button[type="submit"] { flex: none; min-width: 84px; height: 44px; padding: 0 15px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #8763df, #6240ba); color: #fff; font-family: Manrope, sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .28), 0 3px 8px rgba(65, 43, 133, .2); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.prc-input button[type="submit"]:hover { background: linear-gradient(135deg, #7953d1, #573bab); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .28), 0 4px 9px rgba(65, 43, 133, .22); }
.prc-input button[type="submit"]:active { transform: translateY(1px); }
.prc-input button[type="submit"]:focus-visible { outline: 3px solid rgba(104, 73, 199, .32); outline-offset: 2px; }
.prc-input button[type="submit"]:disabled { opacity: .42; cursor: not-allowed; }
.prc-foot { flex: none; margin: 0; padding: 10px 4px 2px; font-size: 10.5px; line-height: 1.45; color: #6e697d; text-align: center; }
.prc-foot a { color: #523a9e; text-underline-offset: 2px; }
.prc-foot a:hover { color: #392579; }
.prc-foot a:focus-visible { outline: 2px solid #8f76d6; outline-offset: 2px; border-radius: 2px; }

.prc-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(57, 46, 81, .2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: prc-fade .2s ease-out; }
.prc-modal-card { position: relative; width: min(380px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 26px 24px 20px; border-radius: 20px; background: linear-gradient(145deg, #fff 0%, #fcfaff 100%); border: 1px solid #e6def2; box-shadow: 0 24px 64px rgba(56, 42, 94, .18), 0 3px 10px rgba(56, 42, 94, .06); text-align: center; }
.prc-modal-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #62558a; margin-bottom: 6px; }
.prc-modal-card h3 { margin: 0 0 8px; color: #302b45; font-family: Manrope, sans-serif; font-size: 20px; font-weight: 650; line-height: 1.3; }
.prc-modal-text { margin: 0 0 18px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.prc-modal-actions { display: grid; gap: 6px; }
.prc-modal-cta { display: block; padding: 11px 18px; border-radius: 12px; background: linear-gradient(105deg, #6042bb, #795dd0); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 4px 12px rgba(88, 62, 165, .18); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.prc-modal-cta:hover, .prc-modal-cta:focus-visible { background: linear-gradient(105deg, #5135a8, #6849c0); transform: translateY(-1px); outline: none; box-shadow: 0 0 0 3px var(--purple-line), 0 5px 13px rgba(88, 62, 165, .2); }
.prc-modal-later { font: inherit; font-size: 13px; padding: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.prc-modal-later:hover { color: #4d369d; }
.prc-modal-later:focus-visible, .prc-modal-close:focus-visible { outline: 3px solid rgba(104, 73, 199, .3); outline-offset: 2px; }
.prc-modal-close { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; font-size: 20px; line-height: 1; color: var(--faint); cursor: pointer; }
.prc-modal-close:hover { background: #f2eef9; color: var(--text); }
@keyframes prc-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 680px) {
  .prc-stage { padding: 8px; }
  #chat { height: min(var(--widget-h), calc(100dvh - 16px)); }
  .prc-status { font-size: 10px; padding: 4px 8px; gap: 6px; }
  .prc-log { padding: 8px 4px 12px; }
  .prc-empty { gap: 12px; }
  .prc-empty-icon { width: 49px; height: 49px; border-radius: 50%; }
  .prc-suggest { flex-basis: 188px; min-height: 188px; gap: 7px 8px; padding: 7px 8px 11px; }
  .prc-chip { min-height: 32px; gap: 5px; padding: 4px 9px 4px 8px; font-size: 11px; }
  .prc-chip::before { width: 12px; height: 12px; flex-basis: 12px; }
  .prc-input { min-height: 59px; padding: 6px; gap: 6px; border-radius: 999px; }
  .prc-input textarea { height: 43px; font-size: 16px; padding: 10px; }
  .prc-input button[type="submit"] { min-width: 72px; height: 42px; padding: 0 12px; border-radius: 999px; }
  .prc-foot { padding: 8px 2px 1px; font-size: 10px; }
  .prc-bubble { max-width: 96%; }
}
@media (max-width: 390px) {
  .prc-suggest { gap: 6px 7px; padding-inline: 5px; }
  .prc-chip { min-height: 30px; gap: 4px; padding-inline: 7px; font-size: 10.5px; }
}
@media (max-height: 520px) {
  .prc-suggest { flex-basis: 144px; min-height: 144px; gap: 5px 8px; }
  .prc-chip { min-height: 28px; font-size: 10.5px; }
  .prc-empty { gap: 8px; }
  .prc-empty-icon { width: 40px; height: 40px; border-radius: 50%; }
  .prc-empty-icon svg { width: 22px; height: 22px; }
  .prc-empty p { font-size: 18px; }
  .prc-foot { padding-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 360px) {
  .prc-suggest { flex-basis: 252px; min-height: 252px; gap: 6px 7px; padding: 7px 5px 11px; }
}

/* ── calculator additions ── */

/* never wider than the screen: wide fee tables scroll inside their bubble instead of stretching the widget */
#chat, .prc-log, .prc-msg { min-width: 0; max-width: 100%; }
.prc-msg.bot .prc-bubble { max-width: min(700px, 96%); }

/* fee tables: text columns wrap, amounts and dates stay on one line (right-aligned); too wide = scroll sideways */
.prc-table { margin: 8px 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; scrollbar-width: thin; }
.prc-table table { margin: 0; border: 0; border-radius: 0; min-width: 100%; }
.prc-table td { white-space: normal; min-width: 72px; }
.prc-table td.n { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.prc-table th.n { text-align: right; }
.prc-table.prc-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }

/* once the chat has started, the prompts shrink to their own height (short labels: one row), leaving room for answers */
#chat.prc-started .prc-suggest { flex: 0 0 auto; min-height: 0; flex-wrap: wrap; justify-content: center; overflow: visible; padding: 10px 12px; }
#chat.prc-started .prc-suggest:empty { padding: 0; }

/* starting prompts: real questions, wrapping onto as many lines as they need (never cut); phones show four */
#chat:not(.prc-started) .prc-suggest { flex-basis: auto; min-height: 0; padding: 14px 10px 6px; }
.prc-chip { max-width: 100%; }
.prc-chip span { white-space: normal; text-align: left; }
@media (max-width: 680px) {
  #chat:not(.prc-started) .prc-chip:nth-child(n+5) { display: none; }
}

/* Mobile viewport + safe-area handling. The visible-viewport value is updated by
   chat.js while virtual keyboards and browser chrome change the available height. */
.prc-stage {
  height: var(--prc-viewport-height, 100dvh);
  min-height: var(--prc-viewport-height, 100dvh);
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}
#chat {
  height: min(var(--widget-h), calc(var(--prc-viewport-height, 100dvh) - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))));
}

/* 📎 portfolio upload button in the input pill, and the highlight while dragging a file onto the chat */
.prc-attach { flex: none; align-self: flex-end; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #7a6aa8; cursor: pointer; transition: background-color .16s ease, color .16s ease; }
.prc-attach svg { width: 21px; height: 21px; }
.prc-attach:hover { background: #f3f0fc; color: #5138a7; }
.prc-attach:focus-visible { outline: 3px solid rgba(104, 73, 199, .32); outline-offset: 1px; }
.prc-attach:disabled { opacity: .4; cursor: not-allowed; }
.prc-input .prc-attach + input + textarea { padding-left: 4px; }
#chat.prc-drop::after { content: "Drop your portfolio spreadsheet (.xlsx or .csv)"; position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; border: 2px dashed #b9a9e2; border-radius: var(--radius); background: rgba(250, 248, 255, .92); color: #5138a7; font-family: Manrope, "DM Sans", sans-serif; font-size: 16px; font-weight: 700; }
.prc-empty a { color: #5138a7; font-weight: 600; text-underline-offset: 2px; }

/* a question of several lines: a rounded box instead of a pill */
.prc-input.prc-multi { border-radius: 26px; }

/* email form card, inside the chat (same HubSpot form as the previous calculator) */
.prc-lead { position: relative; overflow: hidden; margin: 2px 0 14px; padding: 18px 20px 16px; max-width: min(700px, 100%); border: 1px solid #e3daf3; border-radius: 18px; background: linear-gradient(145deg, #fff 0%, #faf7ff 100%); box-shadow: 0 10px 30px rgba(72, 54, 119, .09), 0 2px 6px rgba(72, 54, 119, .04); }
.prc-lead::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: 18px 18px 0 0; background: linear-gradient(90deg, #8763df, #6240ba, #b39af0); }
.prc-lead-label { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #62558a; margin-bottom: 6px; }
.prc-lead-label::before { content: ""; width: 12px; height: 12px; background-color: #9b86ce; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.4 9.35 6.65 14.6 8l-5.25 1.35L8 14.6 6.65 9.35 1.4 8l5.25-1.35L8 1.4Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.4 9.35 6.65 14.6 8l-5.25 1.35L8 14.6 6.65 9.35 1.4 8l5.25-1.35L8 1.4Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.prc-lead h3 { margin: 0 0 4px; font-family: Manrope, "DM Sans", sans-serif; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: #302b45; }
.prc-lead-text { margin: 0 0 14px; font-size: 13px; color: var(--text-2); }
.prc-lead-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.prc-lead input[type="email"], .prc-lead input[type="text"] { width: 100%; font: inherit; font-size: 14px; padding: 10px 14px; border: 1px solid #e7e1ef; border-radius: 999px; background: #fff; color: var(--text); outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.prc-lead input:focus { border-color: #c9b9ec; box-shadow: 0 0 0 3px rgba(132, 103, 204, .12); }
.prc-lead input::placeholder { color: #8a8599; }
.prc-lead-check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.prc-lead-check input { margin-top: 3px; accent-color: #6849c7; }
.prc-lead-error { margin: 8px 0 0; font-size: 12.5px; color: var(--error); }
.prc-lead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.prc-lead-submit { min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #8763df, #6240ba); color: #fff; font-family: Manrope, sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .28), 0 3px 8px rgba(65, 43, 133, .2); transition: background .18s ease, transform .18s ease; }
.prc-lead-submit:hover { background: linear-gradient(135deg, #7953d1, #573bab); }
.prc-lead-submit:active { transform: translateY(1px); }
.prc-lead-submit:focus-visible { outline: 3px solid rgba(104, 73, 199, .32); outline-offset: 2px; }
.prc-lead-submit:disabled { opacity: .5; cursor: wait; }
.prc-lead-gdpr { margin: 0; font-size: 11px; color: var(--faint); }
.prc-lead-done { margin: 2px 0 14px; padding: 13px 16px; max-width: min(700px, 100%); border: 1px solid #e3daf3; border-left: 3px solid #8068bd; border-radius: 15px; background: #faf8ff; color: #413a51; font-size: 13.5px; }

/* hidden field that only bots fill in */
.prc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* gate mode: answers with fee results stay blurred until the visitor leaves an email */
.prc-gated .prc-bubble { position: relative; min-width: min(400px, 100%); }
.prc-gated .prc-bubble > div:last-child { filter: blur(6px); user-select: none; pointer-events: none; }
.prc-gated .prc-bubble::after { content: "Enter your email below to see the full breakdown"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid #e3daf3; color: #5138a7; font-size: 12px; font-weight: 700; width: max-content; max-width: 88%; text-align: center; box-shadow: 0 6px 18px rgba(72, 54, 119, .12); }

@media (max-width: 680px) {
  .prc-lead { padding: 16px 14px 14px; }
  .prc-lead-fields { grid-template-columns: 1fr; }
  .prc-lead input[type="email"], .prc-lead input[type="text"] { font-size: 16px; }
}

/* Keep message content inside its scroll region, including long filenames and
   unbroken identifiers returned by the calculator. */
.prc-msg,
.prc-bubble,
.prc-bubble > div {
  min-width: 0;
}
.prc-bubble {
  overflow-wrap: anywhere;
}
.prc-bubble code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prc-table {
  width: 100%;
  min-width: 0;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.prc-table th,
.prc-table td {
  overflow-wrap: anywhere;
}
.prc-table td.n,
.prc-table th.n {
  overflow-wrap: normal;
}
.prc-lead,
.prc-lead-text,
.prc-lead-gdpr,
.prc-lead-check,
.prc-error-description,
.prc-error-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .prc-stage {
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }
  #chat {
    height: min(var(--widget-h), calc(var(--prc-viewport-height, 100dvh) - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom))));
  }
  .prc-input {
    flex-wrap: nowrap;
    margin-inline: 6px;
  }
  .prc-input textarea {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .prc-lead-row {
    align-items: stretch;
  }
  .prc-lead-submit {
    min-height: 44px;
  }
  .prc-error-refresh {
    min-height: 44px;
  }
  .prc-modal {
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }
  .prc-modal-card {
    max-height: calc(var(--prc-viewport-height, 100dvh) - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    padding: 24px 18px 18px;
  }
  .prc-modal-close {
    width: 44px;
    height: 44px;
    top: 4px;
    right: 4px;
  }
  .prc-modal-later {
    min-height: 44px;
  }
}

@media (max-height: 520px) {
  .prc-stage { place-items: stretch center; }
  #chat { align-self: stretch; }
  #chat.prc-started .prc-suggest,
  #chat:not(.prc-started) .prc-suggest {
    flex: 0 1 auto;
    min-height: 0;
    max-height: min(144px, 26dvh);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
}

/* Keyboard opening can reduce the visual viewport without changing media-query
   height on iOS. chat.js applies this class using that actual visible height. */
#chat.prc-compact .prc-suggest {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(144px, calc(var(--prc-viewport-height, 100dvh) * .26));
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

@media (pointer: coarse) {
  .prc-chip { min-height: 44px; }
  .prc-attach { width: 44px; height: 44px; }
  .prc-input button[type="submit"] { min-height: 44px; }
  .prc-lead-check { min-height: 44px; align-items: center; }
  .prc-lead-check input { flex: none; width: 18px; height: 18px; margin-top: 0; }
  .prc-input textarea,
  .prc-lead input[type="email"],
  .prc-lead input[type="text"] { font-size: 16px; }
}
