/* Product page, section 06 (AI assistant), 10-07. Replaces the old live-site PNG with the app's own
   chat panel: three turns in the real chrome (Chats / New chat, grey user bubble, plain step lines,
   source chips, the approval card with Approve / Extend / Reject). The three turns loop while the
   section is on screen; no tabs and no pause control (founder 10-08). */
.pf-ai { margin: 0; min-width: 0; }
.pf-ai__win { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); overflow: hidden; }
.pf-ai__win .chat__top { background: var(--card); }
.pf-ai__body { display: grid; padding: 18px; }
.pf-ai__chat { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pf-ai__chat.is-off { visibility: hidden; }
.pf-ai__chat .msg-user { align-self: flex-end; }
.pf-ai__chat .msg-user.is-typing::after { content: ''; display: inline-block; width: 6px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--purple); animation: dmcaret 1s steps(1) infinite; }
.pf-ai__status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.pf-ai__status .turn__mark { flex: none; }
.pf-ai__turn.is-working .turn__mark { border-color: var(--purple); border-top-color: transparent; animation: pfai-spin .9s linear infinite; }
.pf-ai__turn.is-done .turn__mark { background: var(--purple); }
@keyframes pfai-spin { to { transform: rotate(360deg); } }
.pf-ai__chat .turn { margin-top: 0; }
.pf-ai__chat .turn__steps { margin-top: 8px; }
/* styles.css folds a finished turn's steps on the homepage; here they stay in view. */
.pf-ai__turn.is-done .turn__steps { display: flex; }
.pf-ai__chat .turn__step.is-done { color: var(--ink-2); }
.pf-ai__chat .turn__step b { font-weight: 500; color: var(--ink); }
.pf-ai__chat .msg-answer { margin-top: 10px; }
/* Source chips: the record each answer came from. Entry, task and plasmid, as in the app. */
.pf-ai__srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pf-ai__src { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid var(--rule); border-radius: 7px; background: var(--card); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.pf-ai__src svg { flex: none; width: 12px; height: 12px; color: var(--purple); }
.pf-ai__src em { font-style: normal; color: var(--muted); }
.pf-ai__table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; }
.pf-ai__table th { padding: 6px 8px; border-bottom: 1px solid var(--ink); text-align: left; font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted); }
.pf-ai__table td { padding: 6px 8px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.pf-ai__table td:first-child { font-family: var(--mono); font-size: 12.5px; }
/* The approval card, after PendingActionCard.tsx: badge, action name, the protocol's title and
   steps, then Approve / Extend / Reject. */
.pf-ai__card { margin-top: 12px; padding: 14px 14px 12px; border: 1px solid #D9D3F3; border-radius: 10px; background: #F8F7FD; }
.pf-ai__card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--purple); text-transform: uppercase; letter-spacing: .04em; }
.pf-ai__card-top i { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); }
.pf-ai__card-title { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.pf-ai__card-desc { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.pf-ai__card-proto { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); }
.pf-ai__card-proto b { display: block; font-size: 13.5px; font-weight: 500; }
.pf-ai__card-proto ol { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.pf-ai__card-acts { display: flex; gap: 8px; margin-top: 12px; }
.pf-ai__card-acts span { padding: 6px 14px; border: 1px solid var(--rule); border-radius: 8px; font-size: 13px; color: var(--ink-2); }
.pf-ai__card-acts .is-primary { border-color: var(--purple); background: var(--purple); color: #fff; }
.pf-ai__card-acts .is-danger { color: #B3261E; }
.pf-ai__win .app__ask { margin: 0 14px 14px; }
/* Motion: while a tab plays, its bits rise in; still frames show everything. */
.pf-ai.is-live .pf-ai__chat [data-at] { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.pf-ai.is-live .pf-ai__chat [data-at].is-in { opacity: 1; transform: none; }
.pf-ai .figcap { max-width: none; }
@media (max-width: 700px) {
  .pf-ai__body { padding: 14px; }
}
