/* Conversation motion keeps the active question legible and history reachable. */
#discover .discovery-panel { max-width: 1060px; }
.conversation-save { min-height: 20px; margin: 12px 0; color: var(--teal); font-size: 13px; }
.conversation-save:empty { display: none; }
.conversation-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin: 20px 0 10px; }
.conversation-heading .discovery-progress { margin: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.conversation-heading > span { color: var(--ink-soft); font-size: 13px; }
#conversation-progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 8px; overflow: hidden; accent-color: var(--teal); margin-bottom: 24px; }
#conversation-progress::-webkit-progress-bar { background: rgba(70,55,46,.12); }
#conversation-progress::-webkit-progress-value { background: var(--teal); transition: width 220ms ease-out; }
.conversation-deck { position: relative; perspective: 1200px; isolation: isolate; padding: 10px 38px 20px; }
.conversation-card { position: relative; z-index: 2; min-width: 0; border: 2px solid var(--outline); border-radius: 22px; background: var(--card); box-shadow: 0 7px 0 rgba(70,55,46,.14); padding: 28px; transform-origin: center; }
.conversation-card .discovery-question { font-size: 1.6rem; line-height: 1.28; margin-bottom: 12px; max-width: 32ch; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; margin-bottom: 16px; }
.card-caption { margin: 0; color: var(--teal); font-size: 13px; font-weight: 700; }
.conversation-card .discovery-copy { font-size: 14px; line-height: 1.5; margin-bottom: 24px; }
.conversation-peek { position: absolute; z-index: 1; top: 30px; bottom: 38px; width: 65%; border: 1.5px solid var(--outline); border-radius: 20px; background: var(--mint, #dce9d0); color: var(--ink-soft); padding: 25px; text-align: left; font: inherit; cursor: pointer; opacity: .7; overflow: hidden; transition: transform 220ms cubic-bezier(.23,1,.32,1), opacity 180ms ease-out; }
.conversation-peek b { display: block; max-width: 30ch; font-size: 15px; margin-bottom: 12px; }
.conversation-peek span { display: block; font-size: 13px; line-height: 1.5; }
.peek-previous { left: 0; transform: rotateY(12deg) scale(.94); transform-origin: left center; }
.peek-next { right: 0; transform: rotateY(-12deg) scale(.94); transform-origin: right center; background: var(--blue, #d1e4ef); }
.conversation-peek:disabled { visibility: hidden; }
.conversation-card.is-leaving { position: absolute; pointer-events: none; inset: 10px 38px auto; z-index: 3; }
.conversation-navigation { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 0; }
.conversation-back { font-family: inherit; font-weight: 600; color: var(--ink-soft); cursor: pointer; padding: 10px 0; }
.conversation-back:disabled { visibility: hidden; }
.conversation-back:hover { color: var(--ink); }
.conversation-navigation .composer-submit { min-width: 125px; }
.conversation-trail { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 0 0 24px; }
.conversation-trail button { min-width: 34px; height: 34px; padding: 0 9px; border: 1px solid rgba(70,55,46,.4); border-radius: 50%; color: var(--ink); background: transparent; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; }
.conversation-trail button[aria-current="step"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.conversation-draft-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid rgba(70,55,46,.2); }
.conversation-draft-action p { font-size: 13px; color: var(--ink-soft); margin: 0; max-width: 42ch; }
#discover .chat-composer { border-radius: 14px; background: #fff; }
#discover .chat-composer textarea.discovery-text { min-height: 170px; max-height: 48vh; height: auto; padding: 18px 20px; font-size: 18px; line-height: 1.65; resize: vertical; overflow-y: auto; }
#discover .chat-composer textarea::placeholder { color: #6e6259; }
#discover .composer-toolbar { position: static; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #e7e2dc; padding: 10px 12px; background: #faf9f6; }
.composer-submit { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 44px; border: 1.5px solid var(--outline); border-radius: 10px; background: var(--orange); color: white; padding: 10px 17px; font: 700 15px/1.2 "Avenir Next", Avenir, system-ui, sans-serif; cursor: pointer; transition: transform 120ms ease-out; }
.composer-submit:active { transform: scale(.97); }
.composer-submit:disabled { cursor: wait; opacity: .6; }
#discover .composer-toolbar .composer-mic { margin-left: auto; }
.composer-hint { font-size: 11px; color: var(--ink-soft); flex: 1; }
.card-answer-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.card-answer-footer .discovery-status { margin: 0; font-size: 12px; flex: 1; }
.text-button { border: 0; box-shadow: none; background: transparent; font-size: 13px; padding: 8px 0; min-height: 40px; }
.ai-thinking { display: inline-flex; flex: 0 0 28px; align-items: center; height: 20px; }
.thinking-dots { display: flex; align-items: center; gap: 4px; }
.thinking-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: thinking-dot 1200ms ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: 150ms; }
.thinking-dots i:nth-child(3) { animation-delay: 300ms; }
@keyframes thinking-dot { 0%, 70%, 100% { opacity: .3; transform: scale(.85); } 35% { opacity: 1; transform: scale(1); } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.conversation-recovery { padding: 16px 20px; border: 1.5px solid var(--outline); border-radius: 12px; background: var(--paper); margin: 16px 0; }
.conversation-recovery p { margin: 0 0 12px; }
.draft-facts { margin: 20px 0; border-top: 1px solid rgba(70,55,46,.2); padding-top: 16px; }
.draft-facts summary { cursor: pointer; font-weight: 700; }
#discovery-draft-map { margin: 24px 0; }
#discover [hidden] { display: none !important; }
@media (max-width: 600px) {
  .conversation-heading { align-items: start; gap: 12px; }
  .conversation-heading > span { font-size: 11px; max-width: 110px; text-align: right; }
  .conversation-deck { padding: 8px 10px 16px; margin: 0 -10px; }
  .conversation-card { padding: 20px 16px; border-radius: 17px; }
  .conversation-card .discovery-question { font-size: 1.3rem; }
  .conversation-card.is-leaving { inset: 8px 10px auto; }
  .conversation-peek { border-radius: 16px; top: 24px; bottom: 32px; }
  #discover .chat-composer textarea.discovery-text { font-size: 17px; padding: 14px; min-height: 165px; }
  .composer-hint { display: none; }
  .composer-submit { font-size: 14px; gap: 9px; }
  .conversation-draft-action .btn { width: 100%; }
  .conversation-trail { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .thinking-dots i { animation: none; opacity: .7; }
  .conversation-peek, .composer-submit, #conversation-progress::-webkit-progress-value { transition: none; }
}

/* Keep optional guidance together and the interview easy to find. */
#guide { align-items: center; margin-bottom: 22px; }
#guide h2 { font-size: clamp(1.15rem, 2.6vw, 1.6rem); }
.workflow-start { margin: 32px 0 18px; }
.workflow-start h2 { margin-bottom: 0; }
.combined-guide-example { margin-top: 28px; }
.combined-guide-example h3 { margin-bottom: 20px; }
#discovery-guide { padding-bottom: 12px; }

#workflow-uses { margin: 0 0 32px; }
.guide-steps-heading { margin: 0 0 14px; }
.guide-kitchen { margin: 0 0 24px; }
.guide-kitchen a { display: block; color: var(--ink-soft); font-size: 13px; }
.guide-kitchen img { display: block; width: 100%; height: auto; border-radius: 12px; }
.guide-kitchen span { display: block; margin-top: 8px; text-align: right; }
