/* The "needs you" pill (needs-you.js): small, yellow like the question cards, centred at the top of the main
   column. It sits under the floating chat and canvas (z-index 39 and 40) and never near the chat box or tabs. */
.needs-you-pill { position: fixed; top: 14px; left: 248px; right: 0; margin: 0 auto; width: max-content; max-width: calc(100vw - 280px); z-index: 35; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--butter); color: var(--on-butter); font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 0 rgba(58, 42, 0, .06), 0 14px 26px -16px rgba(58, 42, 0, .6); animation: needs-you-in .3s var(--ease) both; }
.needs-you-pill[hidden] { display: none; }
.needs-you-pill:hover { background: var(--butter-hover); }
.needs-you-pill:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.needs-you-arrow { font-size: 16px; line-height: 1; }
@keyframes needs-you-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* The card it brought into view glows once in the cards' yellow. */
.note.needs-you-spot { animation: needs-you-glow 1.6s var(--ease); }
@keyframes needs-you-glow { 0% { box-shadow: 0 0 0 0 rgba(255, 225, 122, 0); } 18% { box-shadow: 0 0 0 4px var(--butter), 0 0 0 12px rgba(255, 225, 122, .4); } 100% { box-shadow: 0 0 0 0 rgba(255, 225, 122, 0); } }

@media (max-width: 860px) {
  .needs-you-pill { top: calc(10px + env(safe-area-inset-top)); left: 0; max-width: calc(100vw - 32px); min-height: 44px; }
  /* Eased, so the page slides down to make room rather than jumping when the pill comes and goes. */
  .main { transition: padding-top .3s var(--ease); }
  /* Scrolled down, needs-you.js moves the page by the same amount at once, so nothing slides under his eyes. */
  .needs-you-hold .main { transition: none; }
  /* Too narrow to sit beside the date line, so while it shows the page starts just under it instead. */
  body:has(.needs-you-pill:not([hidden])) .main { padding-top: calc(64px + env(safe-area-inset-top)); }
}
/* Without motion the card still gets a plain ring for a moment, so he can see which one it is. */
@media (prefers-reduced-motion: reduce) {
  .note.needs-you-spot { outline: 3px solid var(--butter-ink); outline-offset: 4px; }
}

/* Momo's questions in the chat (app.js chatQuestion): the yellow card sits among the messages on Momo's side, kept
   straight so it reads as part of the conversation. Once answered it turns quiet and says what he picked. */
.chat-ask { align-self: flex-start; display: flex; flex-direction: column; width: min(520px, 92%); }
.chat-ask .note, .agent-ask .note { flex: none; transform: none; max-width: none; padding: 18px 18px 16px; }
.chat-ask .note:hover, .agent-ask .note:hover { transform: none; }
.chat-ask .note h3, .agent-ask .note h3 { font-size: 26px; }
.note.answered { background: var(--butter-soft); box-shadow: none; border: 1px solid rgba(58, 42, 0, .12); gap: 8px; padding: 14px 16px; }
.note.answered h3 { font-size: 22px; color: var(--ink-2); }
.note-answer { font-weight: 600; color: var(--butter-ink); }

/* Answered, skipped or closed in the chat (app.js answeredLine): one quiet line, question then answer; a tap opens it. */
.note.answered.line { position: relative; padding: 0; gap: 0; border-radius: 14px; overflow: hidden; }
.answered-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 12px 6px 10px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.answered-row:hover { background: rgba(58, 42, 0, .05); }
.answered-row:focus-visible { outline: 2px solid var(--pen); outline-offset: -2px; }
.answered-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; font-size: 14px; line-height: 1.4; }
.answered-q, .answered-text .note-answer { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.answered-q { flex: 1 1 auto; color: var(--ink-2); }
.answered-text .note-answer { flex: 0 0 auto; max-width: 60%; }
.answered-time { flex: none; font-size: 11px; color: var(--ink-3); }
.answered-chev { flex: none; display: inline-flex; color: var(--ink-3); transition: transform .2s var(--ease); }
.note.answered.line.open .answered-row { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.note.answered.line.open .answered-text { flex-direction: column; gap: 6px; }
.note.answered.line.open .answered-q, .note.answered.line.open .answered-text .note-answer { max-width: none; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.note.answered.line.open .answered-q { font-family: var(--hand); font-size: 22px; line-height: 1.1; color: var(--ink); }
.note.answered.line.open .answered-chev { transform: rotate(180deg); }

/* Agent mode: the same card, answered right in the thread. */
.agent-ask { align-self: flex-start; width: min(560px, 100%); }
.agent-ask.enter { animation: agent-turn-in .4s var(--ease) both; }

/* A task page's pointer to its question in the chat: one plain row, easy to tap. */
.ask-pointer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: 100%; min-height: 52px; padding: 10px 18px; border: 0; border-radius: 16px; background: var(--butter); color: var(--on-butter); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.ask-pointer:hover { background: var(--butter-hover); }
.ask-pointer:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.ask-pointer-go { font-weight: 700; white-space: nowrap; }
.ask-pointer-go::after { content: ' →'; }

/* On a phone the question takes the chat's full width, so its answer box has room for its words. */
@media (max-width: 860px) {
  .chat-ask { width: 100%; }
  /* Too narrow for both side by side: the question, then his answer under it, each cut to one line. */
  .answered-text { flex-direction: column; align-items: stretch; gap: 0; }
  .answered-text .note-answer { max-width: none; }
}
