/* Herald: the homepage chat (index.html #herald). Uses the tokens from styles.css. */

.herald { max-width: 640px; margin: 18px auto 0; text-align: left; background: var(--panel); border: 2px solid var(--rust-dark); border-radius: 10px; padding: 14px; box-shadow: 0 0 30px rgba(255, 215, 106, 0.08); }
.herald-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.herald-orb { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; color: #1a1a18; background: radial-gradient(circle at 35% 30%, #fff3cf, #ffd76a 45%, #b8790f); box-shadow: 0 0 14px rgba(255, 215, 106, 0.35); }
.herald-title { margin: 0; font-size: 1.25rem; line-height: 1.1; }
.herald-clear { margin-left: auto; font: inherit; font-size: 0.8rem; background: transparent; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.herald-clear:hover { color: var(--ink); border-color: var(--rust-dark); }

.ak-log { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; }
.ak-msg { max-width: 90%; border-radius: 8px; padding: 9px 12px; border: 1px solid var(--line); font-size: 0.95rem; }
.ak-herald-msg { align-self: flex-start; background: linear-gradient(100deg, #2c2a26, #33261c); border-left: 3px solid #ffd76a; }
.ak-user-msg { align-self: flex-end; background: var(--card); }
.ak-error { border-left-color: #b8423a; }
.ak-body p { margin: 0 0 8px; line-height: 1.55; }
.ak-body p:last-child, .ak-body ul:last-child, .ak-body ol:last-child, .ak-body pre:last-child { margin-bottom: 0; }
.ak-body ul, .ak-body ol { margin: 0 0 8px; padding-left: 22px; line-height: 1.5; }
.ak-body code { font-family: "IBM Plex Mono", Menlo, monospace; font-size: 0.88em; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }
.ak-body pre { margin: 0 0 8px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 5px; overflow-x: auto; }
.ak-body pre code { border: 0; padding: 0; background: none; white-space: pre; }

.ak-form { display: flex; gap: 8px; align-items: flex-end; }
#ak-q, #qp-q { flex: 1; min-width: 0; box-sizing: border-box; font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 6px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); resize: none; overflow-y: hidden; line-height: 1.4; }
#ak-q:focus, #qp-q:focus { outline: none; border-color: var(--rust-dark); }
.ak-btn { flex: none; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 6px; border: 2px solid var(--rust-dark); background: var(--rust); color: #fff; cursor: pointer; }
.ak-btn:hover { background: var(--rust-dark); }
.ak-btn:disabled { opacity: 0.65; cursor: wait; }

.herald-note { margin: 10px 0 0; font-size: 0.75rem; color: var(--ink-soft); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) { .herald { padding: 12px; } .ak-msg { max-width: 100%; } }

/* Full-page Herald on the homepage (home.html) */
.herald-full { max-width: 760px; }
.herald-full .ak-log { max-height: max(300px, calc(100vh - 420px)); min-height: 220px; }
.hero .herald-elsewhere { text-align: center;  max-width: 760px; margin: 14px auto 0; font-size: 0.85rem; color: var(--ink-soft); }
