/* Test chat · design session. Two experiences on one route (data-mode on <main>):
   - "first" (setup not finished): a guided first try that sells the moment.
   - "tool"  (from the dashboard): a working tool to check answers, with cost and source per answer. */
html, body.tc-page { height: 100%; }
body.tc-page { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.tcx { flex: 1; min-height: 0; width: 100%; max-width: 680px; margin-inline: auto; display: flex; flex-direction: column; background: var(--paper); }

/* top bar: the bot is a contact in a chat app (our look, not any brand's) */
.tcx__bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.tcx__bar .iconbtn { background: transparent; }
.tcx__ava { width: 40px; height: 40px; flex: none; }
.tcx__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.tcx__who b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcx__presence { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1.4 var(--font); color: var(--leaf-ink); }
.tcx__presence .typing i { width: 5px; height: 5px; }
.tcx__presence.is-typing { color: var(--saffron-ink); }
.tcx__barbtn { min-height: 40px; padding: 0 12px; font-size: 13px; }

/* first try: steps + the three tries */
.tcx__head { padding: 12px 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.tcx__head .steps { justify-content: flex-start; }
.tcx__tasks { display: flex; gap: 8px; flex-wrap: wrap; }
.task { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: var(--r-pill); background: var(--card); color: var(--ink-2); font: 500 13px/1 var(--font); box-shadow: inset 0 0 0 1.5px var(--line); transition: background-color var(--t-quick), color var(--t-quick); }
.task::before { content: ""; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-input); flex: none; }
.task.is-done { background: var(--leaf-tint); color: var(--leaf-ink); box-shadow: none; }
.task.is-done::before { box-shadow: none; background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.task.is-done.pop { animation: drop var(--t-split) var(--ease-spring) both; }

.tcx__fake { margin: 8px 16px 0; }
.tcx__usage { margin: 8px 16px 0; font: var(--t-label); color: var(--ink-3); display: flex; justify-content: space-between; gap: 10px; }

/* the conversation */
.tcx__scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column-reverse; overscroll-behavior: contain; }
.tcx__log { padding: 14px 16px 18px; }
.tcx__intro { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.tcx__hero { width: 84px; height: 84px; align-self: center; margin: 4px 0 14px; }
.tcx__tip { align-self: center; text-align: center; max-width: 320px; font: var(--t-small); color: var(--ink-3); margin: 6px 0 10px; }

/* the "this is how your customers see it" line under the first answer */
.tcx__wow { align-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 6px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--leaf-tint); color: var(--leaf-ink); font: 600 13px/1.4 var(--font); }

/* tool: what each answer would cost and where it came from */
.tcx__meta { align-self: flex-end; max-width: 92%; display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; padding: 8px 12px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 400 12px/1.5 var(--font); color: var(--ink-2); }
.tcx__meta .row { gap: 6px; flex-wrap: wrap; }
.tcx__cost b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tcx__cost .coin { width: 22px; height: 22px; font-size: 9px; display: inline-grid; vertical-align: middle; margin-inline-end: 3px; }
.tcx__acts { display: flex; gap: 14px; flex-wrap: wrap; }
.tcx__acts a { font: 600 12px/1.4 var(--font); color: var(--saffron-ink); }

/* bottom dock */
.tcx__dock { background: var(--card); border-top: 1px solid var(--line); padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.tcx__quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding-inline: 12px; }
.tcx__quick::-webkit-scrollbar { display: none; }
.tcx__quick .chip { min-height: 40px; font-size: 14px; white-space: nowrap; }
.tcx__form { display: flex; gap: 8px; align-items: center; }
.tcx__form .input { border-radius: var(--r-pill); min-height: 48px; }
.tcx__send { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--saffron); color: #16161D; display: grid; place-items: center; transition: transform var(--t-press) var(--ease-out); }
.tcx__send:active { transform: scale(.92); }
.tcx__send:disabled { background: var(--line); color: var(--ink-3); }
.tcx__finish { animation: born var(--t-split) var(--ease-spring) both; }

/* photo + voice (media, 26 Nov): photo button before the box; the mic takes the send button's place while the box is empty */
.tcx__form { gap: 6px; }
.tcx__tool { width: 44px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); transition: transform var(--t-press) var(--ease-out), color var(--t-quick); }
.tcx__tool:active { transform: scale(.9); }
.tcx__tool:disabled { color: var(--line-input); }
.tcx__tool .ico { width: 24px; height: 24px; }
.tcx__att { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 18px; background: var(--card-2); animation: born var(--t-split) var(--ease-spring) both; }
.tcx__attimg { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 12px; background: var(--line); }
.tcx__atttext { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.45; }
.tcx__attx { width: 40px; height: 40px; background: var(--card); }
.tcx__rec { display: flex; align-items: center; gap: 10px; min-height: 48px; animation: born var(--t-base) var(--ease-out) both; }
.tcx__recx { background: transparent; color: var(--alarm); }
.tcx__recdot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--alarm); animation: breathe 1.1s ease-in-out infinite; }
.tcx__rectime { min-width: 42px; font: 600 16px/1 var(--font); }
.tcx__reclvl { flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.tcx__reclvl i { width: 3px; flex: none; height: 100%; border-radius: 2px; background: var(--ink); transform: scaleY(var(--h, .1)); transition: transform 90ms linear; }
.tcx__skip { font: 500 13px/1 var(--font); color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; padding: 0 6px; }

/* the test order (27 Nov): a strip under the bar, open while the order fills up */
.tcx__order { margin: 8px 16px 0; padding: 2px 12px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); max-height: 34vh; overflow-y: auto; animation: born var(--t-base) var(--ease-out) both; }
.tcx__ordsum { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 46px; font: 600 14px/1.3 var(--font); color: var(--ink); text-align: start; }
.tcx__ordsum > .ico:first-child { width: 20px; height: 20px; flex: none; color: var(--saffron-ink); }
.tcx__chev { width: 18px; height: 18px; flex: none; color: var(--ink-3); transition: transform var(--t-quick) var(--ease-out); }
.tcx__ordsum[aria-expanded="true"] .tcx__chev { transform: rotate(180deg); }
.tcx__ordsum[aria-expanded="true"] .tcx__ordchip { display: none; }
.tcx__ordcard { padding: 0 0 12px; }
.tcx__ordcard[hidden] { display: none; }

/* the reminder this answer would plan */
.tcx__nudge { display: flex; align-items: flex-start; gap: 6px; padding: 6px 8px; border-radius: 10px; background: var(--card-2); color: var(--ink-2); }
.tcx__nudge .ico { flex: none; margin-top: 2px; color: var(--saffron-ink); }
.tcx__nudge q { color: var(--ink); quotes: "«" "»"; }

/* try a comment */
.chip--cmt .ico { margin-inline-end: 2px; }
.tcx__cmt { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border-radius: 18px; border: 1.5px dashed var(--line-input); background: var(--paper); animation: born var(--t-base) var(--ease-out) both; }
.tcx__cmt[hidden] { display: none; }
.tcx__cmthead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcx__cmthead b { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1.4 var(--font); }
.tcx__cmthead .iconbtn { width: 40px; height: 40px; background: transparent; }
.tcx__cmt .input { min-height: 46px; }
.tcx__cmtmake { display: flex; flex-direction: column; gap: 6px; }
.tcx__cmtmake[hidden] { display: none; }
.tcx__cmtprods { display: flex; gap: 6px; flex-wrap: wrap; }
.tcx__cmtprods .chip { min-height: 38px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) { .task.is-done.pop, .tcx__finish, .tcx__att, .tcx__rec, .tcx__recdot, .tcx__order, .tcx__cmt { animation: none; } .tcx__reclvl i { transition: none; } }
