:root {
  --primary: #1a2a3a;
  --primary-light: #2a3a4a;
  --accent: #4a90c2;
  --accent-light: #6aade0;
  --accent-dark: #3a7aa8;
  --success: #198754;
  --warning: #f59e0b;
  --danger: #dc3545;
  --light: #f4f8fc;
  --gray: #5a6a7a;
  --gray-light: #e4eaf0;
  --white: #ffffff;
  --black: #0a0a0a;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
}

* { box-sizing:border-box; }
body{
  margin:0;
  font-family: 'Montserrat', -apple-system, sans-serif;
  background: var(--white);
  color: var(--primary);
  line-height:1.6;
}

.chat{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap: 12px;
  background: var(--white);
  scrollbar-width: none;
}
.chat::-webkit-scrollbar { display: none; }

@media (max-width: 959px){
  .chat{ height: 50vh; }
}

.msg{
  max-width: 82%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--gray-light);
  background: var(--white);
}
.msg.bot{ align-self:flex-start; }
.msg.user{
  align-self:flex-end;
  background: rgba(74,144,194,0.10);
  border-color: rgba(74,144,194,0.25);
}
.msg .meta{
  font-size: 12px;
  color: var(--gray);
  font-weight: 700;
  margin-bottom: 6px;
}
.msg .text{ white-space: pre-wrap; line-height:1.35; }

.quoteCard{ border: 1px solid rgba(74,144,194,0.22); background: rgba(74,144,194,0.06); padding: 8px 10px; border-radius: 10px; line-height: 1.3; }
.qRangeLine{ font-weight: 800; font-size: 15px; margin: 0 0 4px 0; }
.qRangeVal{ font-weight: 900; }
.qHdr{ font-weight: 900; font-size: 12px; color: var(--primary); margin: 0 0 2px 0; }
.qList{ display: grid; gap: 1px; margin: 0 0 2px 0; }
.qRow{ display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--primary); opacity: 0.92; line-height: 1.25; margin: 0; padding: 0; }
.qLbl{ font-weight: 600; }
.qVal{ font-weight: 800; white-space: nowrap; }
.qRowSlash .qLbl{ opacity: 0.6; }
.qSlash{ text-decoration: line-through; opacity: 0.5; font-weight: 600; }
.qFree{ color: #1a7a3a; font-weight: 900; font-size: 12px; letter-spacing: 0.5px; }
.qSavings{ margin: 6px 0 2px 0; padding: 5px 0 0 0; border-top: 1px dashed rgba(74,144,194,0.25); font-size: 14px; font-weight: 700; color: #1a7a3a; }
.qSavings strong{ font-weight: 900; font-size: 15px; }
.qReply strong{ font-weight: 800; color: var(--primary); }
.qReply u{ text-decoration: underline; text-decoration-color: rgba(74,144,194,0.5); text-underline-offset: 2px; }
.qNotes{ font-size: 12px; color: var(--gray); line-height: 1.25; margin: 5px 0 0 0; }
.qNotes > div{ margin: 2px 0; }
.qNoteEmph{ font-weight: 600; color: var(--primary); opacity: 0.7; }
@media (max-height: 700px) { .qNotes > div:not(.qNoteEmph) { display: none; } .qNotes { margin: 3px 0 0 0; } }

.quickBtns{ display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 12px; }
.quickBtn{ background: var(--white); border: 1.5px solid rgba(74,144,194,0.35); color: var(--primary); font-family: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 20px; cursor: pointer; transition: all 0.15s ease; white-space: nowrap; }
.quickBtn:hover, .quickBtn:active{ background: rgba(74,144,194,0.1); border-color: rgba(74,144,194,0.6); }

.nudgeBar{ padding: 10px 12px; margin: 4px 8px; background: rgba(26,122,58,0.06); border: 1px solid rgba(26,122,58,0.2); border-radius: 10px; animation: fadeSlide 0.4s ease; box-sizing: border-box; overflow: hidden; }
@keyframes fadeSlide{ from{ opacity: 0; transform: translateY(8px); } to{ opacity: 1; transform: translateY(0); } }
.nudgeText{ font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.nudgeDone{ color: #1a7a3a; margin-bottom: 0; }
.nudgeForm{ display: flex; gap: 6px; min-width: 0; }
.nudgeInput{ flex: 1; min-width: 0; font-family: inherit; font-size: 14px; padding: 8px 10px; border: 1.5px solid rgba(74,144,194,0.3); border-radius: 8px; outline: none; box-sizing: border-box; }
.nudgeInput:focus{ border-color: rgba(74,144,194,0.6); }
.nudgeSendBtn{ font-family: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; background: #1a7a3a; color: white; border: none; border-radius: 8px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.nudgeSendBtn:active{ background: #156330; }