/* ---------- Hero (initial state) ---------- */
.page-ask { display: flex; flex-direction: column; }
.hero {
  position: relative; overflow: hidden; flex: 1; display: grid; place-items: center;
  padding: 48px 24px 40px; min-height: calc(100vh - var(--topbar-h) - 140px);
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(215, 180, 200, 0.35), transparent 70%),
    radial-gradient(ellipse 50% 60% at 15% 85%, rgba(185, 164, 232, 0.18), transparent 70%),
    linear-gradient(180deg, #fbefee 0%, var(--cream) 60%);
}
/* Soft architectural arches (decorative). Drop a photo at assets/images/hero.jpg and set --hero-image to use it. */
.hero-arches { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; gap: 4%;
  pointer-events: none; opacity: 0.9; }
.hero-arches span {
  width: 22%; max-width: 260px; height: 78%; border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 244, 240, 0.35));
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.35), 0 30px 60px rgba(184, 92, 133, 0.10);
  border: 1px solid rgba(215, 180, 200, 0.45);
}
.hero-arches span:nth-child(2) { height: 88%; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: var(--hero-image, none);
  background-size: cover; background-position: center; opacity: 0.55; pointer-events: none; }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(184, 92, 133, 0.07) 30%, rgba(184, 92, 133, 0.07) 34%, transparent 34%),
              linear-gradient(115deg, transparent 52%, rgba(184, 92, 133, 0.05) 52%, rgba(184, 92, 133, 0.05) 57%, transparent 57%); }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 720px; text-align: center; }
.hero h1 { font-size: var(--fs-hero); margin: 18px 0 6px; color: var(--plum); font-weight: 800; }
.hero .subtitle { color: var(--text); font-size: var(--fs-lg); margin-bottom: 28px; }

/* ---------- Composer ---------- */
.composer {
  display: flex; align-items: flex-end; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-xl); padding: 10px 10px 10px 12px; box-shadow: var(--shadow-md); text-align: start;
}
.composer:focus-within { border-color: var(--rose); box-shadow: var(--shadow-md), var(--focus); }
.composer textarea {
  flex: 1; border: 0; outline: none; resize: none; background: transparent; padding: 10px 8px;
  min-height: 48px; max-height: 220px; line-height: 1.7; font-size: var(--fs-md); color: var(--ink);
}
.composer textarea::placeholder { color: #9b8592; }
.composer textarea:focus-visible, .verify-form textarea:focus-visible { box-shadow: none; }
.send-btn { width: 52px; height: 52px; border-radius: var(--r-lg); border: 0; background: var(--rose-600); color: #fff;
  display: grid; place-items: center; flex: none; transition: background 0.15s; }
.send-btn:hover { background: var(--rose-700); }
.send-btn:disabled { background: var(--mauve); }
.send-btn .icon { width: 22px; height: 22px; }
[dir="rtl"] .send-btn .icon { transform: scaleX(-1); }
.composer-hint { font-size: var(--fs-xs); color: var(--muted); margin: 8px 4px 0; text-align: start; }
.char-count { font-size: var(--fs-xs); color: var(--muted); align-self: center; white-space: nowrap; }
.char-count.is-over { color: var(--danger); }

/* ---------- Suggestions ---------- */
.suggestions { margin-top: 26px; text-align: start; }
.suggestions-title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text); margin: 0 4px 10px; }
.suggestions-title .icon { color: var(--rose-700); width: 16px; height: 16px; }
.suggestion-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; }
/* five cards: a row of three, then a row of two */
.suggestion-list li { grid-column: span 2; }
.suggestion-list li:nth-child(n+4) { grid-column: span 3; }
.suggestion {
  width: 100%; height: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; text-align: start;
  padding: 14px; border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.82); border: 1px solid var(--line);
  color: var(--plum); font-weight: 500; font-size: var(--fs-sm); box-shadow: var(--shadow-sm);
}
.suggestion:hover { border-color: var(--mauve); background: #fff; }
.suggestion .icon { color: var(--rose-700); width: 16px; height: 16px; margin-top: 4px; }

/* ---------- Chat thread ---------- */
.chat { flex: 1; display: flex; flex-direction: column; }
.thread { flex: 1; width: 100%; max-width: var(--content-w); margin-inline: auto; padding: 28px 24px 12px;
  display: flex; flex-direction: column; gap: 26px; }
.chat-composer-wrap { position: sticky; bottom: 0; z-index: 5; padding: 12px 24px 18px;
  background: linear-gradient(180deg, rgba(255, 248, 245, 0), var(--cream) 40%); }
.chat-composer-wrap > * { max-width: var(--content-w); margin-inline: auto; }

.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg-user { justify-content: flex-start; flex-direction: row-reverse; }
.msg-user .bubble {
  max-width: min(78%, 640px); background: var(--rose-100); color: var(--plum); font-weight: 600;
  padding: 12px 18px; border-radius: var(--r-lg); border-start-end-radius: 6px; overflow-wrap: anywhere; white-space: pre-wrap;
}
.msg-time { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.avatar img { width: 28px; height: 28px; }
.avatar-user { background: var(--rose-100); color: var(--plum); border-color: var(--rose-100); }

.answer { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.answer-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.answer-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 8px; }
.answer-label .icon { width: 14px; height: 14px; color: var(--lavender); }
.answer-text { color: var(--ink); line-height: 2; overflow-wrap: anywhere; }
.answer-text p:last-child { margin-bottom: 0; }
.answer-text .quote { color: var(--plum); font-weight: 600; background: var(--rose-50); border-radius: 4px; padding: 0 3px; }
.answer-message { color: var(--text); margin: 0; }
.answer-status { display: flex; gap: 10px; align-items: flex-start; }
.answer-status .icon { margin-top: 4px; color: var(--rose-700); }
.answer-status.is-insufficient .icon { color: var(--warn); }
.answer-status.is-error .icon { color: var(--danger); }

.answer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.answer-actions .btn { min-height: 40px; }

.sources-block h3 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); margin-bottom: 10px; }
.sources-block h3 .icon { color: var(--rose-700); }
.disclosure { font-size: var(--fs-xs); color: var(--muted); margin: 0; }
.retry-row { margin-top: 10px; }
