/* Ask AI page (fin.ejiapi.com/chat, acc.ejiapi.com/chat). */
.chat { max-width: 820px; padding-top: 36px; padding-bottom: 24px; }
.chat h1 { font-size: var(--title); margin-bottom: 6px; }
.chat .lead { margin: 0 0 18px; }
.chat-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.chat-box textarea { width: 100%; min-height: 76px; resize: vertical; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.chat-box textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.chat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.chat-row .sp { flex: 1; }
.chat-left { font-size: 13.5px; color: var(--muted); }
.chat-try { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; align-items: center; }
.chat-try .lead { font-size: 13px; color: var(--muted); margin: 0 4px 0 0; }
.chat-try button { font: inherit; font-size: 14px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 6px 13px; cursor: pointer; text-align: left; }
.chat-try button:hover { border-color: var(--accent); color: var(--accent); }
.chat-out { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); }
.chat-out p { margin: 0 0 10px; }
.chat-log { margin-top: 22px; display: grid; gap: 16px; }
.chat-turn { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--surface); }
.chat-you { margin: 0 0 10px; font-weight: 650; }
.chat-text { margin: 0; white-space: pre-wrap; line-height: 1.6; }
.chat-wait { margin: 0; color: var(--muted); }
.chat-err { margin: 0; color: var(--bad); }
.chat-src { margin-top: 10px; font-size: 13px; color: var(--muted); }
.chat-src summary { cursor: pointer; }
.chat-src ul { margin: 6px 0 0; padding-left: 18px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; word-break: break-all; }
.chat-note { font-size: 13px; color: var(--muted); margin-top: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Stitch "Ask AI" screen: a centred head, then one panel holding the conversation, the composer and the suggestions */
.chat { max-width: 900px; }
.chat-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.chat-head .kicker.chip { display: inline-flex; gap: 6px; } .chat-head .kicker .i { width: 14px; height: 14px; }
.chat-head .lead { max-width: 640px; font-size: var(--intro); }
.chat-head .factchips { justify-content: center; margin-top: 4px; }
.chat-panel { margin-top: 26px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.chat-hello, .chat-turn .chat-ai { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 14px 18px; max-width: 86%; box-shadow: 0 1px 2px rgba(17,21,28,.04); }
.chat-hello p { margin: 0; }
.who { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.chat-hello .who { display: flex; }
.who .i, .chat-turn .who::before { width: 24px; height: 24px; }
.who .i { padding: 4px; border-radius: 50%; background: var(--accent); color: #fff; }
.chat-turn .who::before { content: ""; border-radius: 50%; background: var(--accent) url("/assets/bot.svg") center / 14px no-repeat; }
.chat-log { margin-top: 18px; gap: 18px; }
.chat-turn { border: 0; background: none; padding: 0; display: flex; flex-direction: column; }
.chat-you { align-self: flex-end; max-width: 80%; margin: 0 0 14px; padding: 12px 18px; border-radius: 16px 4px 16px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.chat-src { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-src .lbl { font: 600 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chat-src code { font-size: 12px; color: var(--accent); background: var(--accent-soft); word-break: break-all; }
.chat-panel .chat-box { margin-top: 20px; box-shadow: none; padding: 14px; border-radius: 16px; }
.chat-panel .chat-box textarea { background: var(--surface); border: 0; padding: 6px 4px; min-height: 64px; }
.chat-panel .chat-box textarea:focus { outline: none; }
.chat-panel .chat-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.chat-left { font-family: var(--mono); font-size: 12.5px; }
.chat-panel .chat-try { margin-top: 14px; }
.chat-panel .chat-try .lead { font: 600 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.chat-panel .chat-try button { background: var(--surface); }
.chat-panel .chat-note { text-align: center; margin: 18px auto 0; max-width: 680px; }
