/* Ur Mortgage — full-page Lilly quote concierge. Depends on tokens.css + styles.css. */
.qpage { background:
    radial-gradient(60% 50% at 85% 0%, rgba(3,199,141,0.10), transparent 60%),
    radial-gradient(50% 50% at 5% 100%, rgba(65,162,237,0.08), transparent 60%),
    var(--paper-2);
  min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; }

.q-shell { flex: 1; width: 100%; max-width: 740px; margin-inline: auto; display: flex; flex-direction: column; padding: 0 var(--space-md); min-height: 0; }

/* header */
.q-head { display: flex; align-items: center; gap: 0.85rem; padding: var(--space-lg) var(--space-xs) var(--space-md); }
.q-head .av { position: relative; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-green), var(--brand-green-700)); color: #fff; display: grid; place-items: center; flex: 0 0 auto; box-shadow: var(--shadow-green); }
.q-head .av svg { width: 28px; height: 28px; }
.q-head .who b { font-family: var(--font-display); font-size: var(--text-xl); display: block; line-height: 1.1; }
.q-head .who span { font-size: var(--text-sm); color: var(--ink-soft); display: inline-flex; align-items: center; gap: 0.4rem; }
.q-head .who span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-green); box-shadow: 0 0 0 0 rgba(3,199,141,0.5); animation: q-live 2s infinite; }
@keyframes q-live { 0%{box-shadow:0 0 0 0 rgba(3,199,141,.5);} 70%{box-shadow:0 0 0 7px rgba(3,199,141,0);} 100%{box-shadow:0 0 0 0 rgba(3,199,141,0);} }
.q-progress { margin-left: auto; text-align: right; }
.q-progress .bar { width: 130px; height: 6px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.q-progress .bar i { display: block; height: 100%; width: 0%; background: var(--brand-green); border-radius: inherit; transition: width var(--dur-slow) var(--ease-out); }
.q-progress small { font-size: var(--text-xs); color: var(--ink-faint); font-family: var(--font-display); }
@media (max-width: 560px) { .q-progress .bar { width: 84px; } }

/* message stream */
.q-log { flex: 1; overflow-y: auto; padding: var(--space-md) var(--space-xs) var(--space-lg); display: flex; flex-direction: column; gap: 0.7rem; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { .q-log { scroll-behavior: auto; } }
.q-msg { max-width: 80%; padding: 0.85rem 1.05rem; border-radius: 18px; font-size: var(--text-base); line-height: 1.55; animation: q-in 280ms var(--ease-out); overflow-wrap: anywhere; }
@keyframes q-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .q-msg { animation: none; } }
.q-msg.bot { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; box-shadow: var(--shadow-sm); }
.q-msg.user { background: var(--brand-green); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.q-msg.bot a { color: var(--brand-green-700); text-decoration: underline; text-underline-offset: 2px; }
.q-msg .cite { display: block; margin-top: 0.4rem; font-size: var(--text-xs); color: var(--ink-faint); }
.q-typing { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 18px; border-bottom-left-radius: 6px; padding: 0.9rem 1.1rem; display: inline-flex; gap: 5px; }
.q-typing i { width: 8px; height: 8px; border-radius: 50%; background: #c2ccc9; animation: q-bounce 1.2s infinite; }
.q-typing i:nth-child(2){animation-delay:.15s;} .q-typing i:nth-child(3){animation-delay:.3s;}
@keyframes q-bounce { 0%,60%,100%{transform:translateY(0);opacity:.5;} 30%{transform:translateY(-6px);opacity:1;} }

/* quick replies */
.q-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; padding: 0 var(--space-xs) var(--space-sm); }
.q-chip { background: #fff; border: 1.5px solid var(--brand-green); color: var(--brand-green-700); border-radius: 999px; padding: 0.65rem 1.15rem; font-size: var(--text-base); font-family: var(--font-display); font-weight: 600; cursor: pointer; transition: background var(--dur-fast), transform var(--dur-fast); }
.q-chip:hover { background: var(--brand-green-050); transform: translateY(-1px); }
.q-chip:focus-visible { outline: 3px solid var(--brand-green-700); outline-offset: 2px; }

/* in-chat consent */
.q-consent { align-self: stretch; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: var(--space-md); }
.q-consent .body { max-height: 130px; overflow-y: auto; font-size: var(--text-xs); line-height: 1.6; color: var(--ink-soft); margin-bottom: var(--space-sm); }
.q-consent label { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; font-size: var(--text-sm); }
.q-consent input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--brand-green); flex: 0 0 auto; }
.q-consent a { color: var(--brand-green-700); text-decoration: underline; }
.q-consent .go { margin-top: var(--space-sm); width: 100%; background: var(--brand-green); color: #fff; border: none; border-radius: 12px; padding: 0.8rem; font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); cursor: pointer; opacity: 0.5; pointer-events: none; transition: opacity var(--dur-fast); }
.q-consent .go.on { opacity: 1; pointer-events: auto; }
.q-consent .go.on:hover { background: var(--brand-green-700); }

/* estimate card */
.q-estimate { align-self: stretch; background: linear-gradient(135deg, var(--brand-green-050), #eaf4fd); border: 1px solid var(--brand-green-300); border-radius: 18px; padding: var(--space-lg); text-align: center; }
.q-estimate .amt { font-family: var(--font-display); font-weight: 800; font-size: var(--text-4xl); color: var(--brand-ink); line-height: 1; }
.q-estimate .cap { color: var(--ink-soft); font-size: var(--text-sm); margin-top: 0.3rem; }
.q-estimate .bd { display: grid; gap: 0.35rem; margin-top: var(--space-md); text-align: left; }
.q-estimate .bd .r { display: flex; justify-content: space-between; font-size: var(--text-sm); padding: 0.3rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.q-estimate .bd .r:last-child { border-bottom: none; }
.q-estimate .fine { font-size: var(--text-xs); color: var(--ink-faint); margin-top: var(--space-sm); }

/* input bar */
.q-input { position: sticky; bottom: 0; display: flex; gap: 0.55rem; align-items: flex-end; padding: var(--space-md) var(--space-xs); background: linear-gradient(to top, var(--paper-2) 70%, transparent); }
.q-input textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 16px; padding: 0.85rem 1rem; font-family: inherit; font-size: var(--text-base); max-height: 120px; line-height: 1.4; background: #fff; }
.q-input textarea:focus { outline: none; border-color: var(--brand-green); box-shadow: 0 0 0 3px var(--brand-green-050); }
.q-send { flex: 0 0 auto; width: 50px; height: 50px; border-radius: 50%; background: var(--brand-green); color: #fff; border: none; cursor: pointer; display: grid; place-items: center; transition: background var(--dur-fast), transform var(--dur-fast); }
.q-send:hover { background: var(--brand-green-700); transform: translateY(-1px); }
.q-send:disabled { opacity: 0.5; cursor: not-allowed; }
.q-foot { text-align: center; font-size: var(--text-xs); color: var(--ink-faint); padding-bottom: var(--space-sm); }
.q-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
