/* The chat tools (Money Message Creator, Carol, Olivia, Lilly, Sales Page Writer, Story Sales), in the same look as the Offer Analyzer. */
.chat { max-width: 820px; margin: 0 auto; padding: 36px 24px 0; }
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.chat-head h1 { margin-bottom: 4px; }
.usage { font-size: 12.5px; color: var(--mid); }
.btn.small { padding: 9px 16px; font-size: 13px; white-space: nowrap; }

.messages { display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; }
.msg.user { align-items: flex-end; }
.msg .bubble { border-radius: 14px; padding: 14px 18px; font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; max-width: 100%; }
.msg.user .bubble { background: var(--dark); color: #fff; max-width: 85%; border-bottom-right-radius: 4px; }
.msg.assistant .bubble { background: #fff; border: 1.5px solid var(--cream); border-bottom-left-radius: 4px; }

.md p, .md ul, .md ol, .md blockquote, .md .table-wrap, .md pre { margin: 0 0 10px; }
.md > :last-child { margin-bottom: 0; }
.md ul, .md ol { padding-left: 22px; }
.md li { margin: 3px 0; }
.md li > ul, .md li > ol { margin: 4px 0 0; }
.md h3, .md h4, .md h5 { font-family: "DM Serif Display", Georgia, serif; font-weight: normal; line-height: 1.3; margin: 16px 0 6px; }
.md > h3:first-child, .md > h4:first-child, .md > h5:first-child { margin-top: 0; }
.md h3 { font-size: 21px; }
.md h4 { font-size: 18px; }
.md h5 { font-size: 16px; }
.md hr { border: none; border-top: 1.5px solid var(--cream); margin: 14px 0; }
.md blockquote { border-left: 3px solid var(--peach); padding-left: 12px; color: var(--mid); }
.md code { background: var(--sand); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.md pre { background: var(--sand); border-radius: 8px; padding: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.table-wrap { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.md th, .md td { border: 1px solid var(--cream); padding: 8px 10px; text-align: left; vertical-align: top; min-width: 9em; overflow-wrap: normal; }
.md th:first-child, .md td:first-child { min-width: 0; }
.md th { background: var(--sand); font-family: "Lato", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); }

.thinking { color: var(--mid); font-style: italic; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

.msg-actions button {
  background: none; border: none; color: var(--mid); font: inherit; font-size: 12px; cursor: pointer;
  text-decoration: underline; padding: 6px 2px 0;
}
.msg-note { font-size: 12.5px; color: var(--mid); margin-top: 6px; }
.msg-note.sample { color: #7A5A20; }

.composer-wrap { position: sticky; bottom: 0; background: linear-gradient(to bottom, rgba(251, 246, 238, 0), var(--sand) 18px); padding: 18px 0 16px; }
.composer-wrap .notice { margin: 0 0 12px; }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 52px; max-height: 40vh; resize: none; }
.fine { font-size: 11.5px; color: var(--mid); margin-top: 8px; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) { .thinking { animation: none; } }
@media (max-width: 640px) {
  .chat { padding: 24px 16px 0; }
  .msg.user .bubble { max-width: 92%; }
  .msg .bubble { padding: 12px 14px; }
  .composer .btn { padding: 14px 18px; }
}

/* Olivia: "Analyze this offer" next to "New chat" (16 Oct 2026) */
.chat-head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* "＋ File" for transcripts and workbooks (Sales Page Writer, Story Sales, 18 Oct 2026) */
.attach { align-self: stretch; background: white; border: 1.5px solid var(--peach); border-radius: 8px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--mid); cursor: pointer; white-space: nowrap; }
.attach:hover { border-color: var(--fire); color: var(--fire); }

/* Lilly: her graphic next to the login and above the chat (18 Oct 2026) */
.login-split { max-width: 1120px; margin: 0 auto; padding: 48px 24px 64px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; align-items: center; }
.login-split[hidden] { display: none; }
.login-graphic { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 18px 40px rgba(51,10,10,0.18); display: block; }
.login-split .login-box { max-width: none; }
.chat-banner { display: block; width: 100%; height: auto; border-radius: 14px; margin-bottom: 22px; }
@media (max-width: 820px) { .login-split { grid-template-columns: 1fr; gap: 28px; padding: 24px 16px 48px; } }
@media (max-width: 640px) { .attach { padding: 0 10px; } }
