/* ============================================================
   ASK — conversational layer for "The Lift"
   Styled strictly with worldcup tokens (tokens.css). Museum/
   editorial: warm paper, hairline rules, gold accents, serif
   body, mono labels. Subtle. Honours prefers-reduced-motion.
   ============================================================ */

.ask { padding-bottom: var(--sp-5); }

/* The card sits like a quiet exhibit on the paper wall. */
.ask-card {
  max-width: 52rem;
  margin: var(--sp-3) auto 0;
  background: rgba(24, 27, 34, 0.7);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--paper-3), 0 24px 48px -28px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* ---- Transcript ------------------------------------------ */
.ask-transcript {
  padding: var(--sp-3) var(--sp-3) var(--sp-2);
  max-height: 26rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}
.ask-transcript::-webkit-scrollbar { width: 6px; }
.ask-transcript::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }

.ask-row { display: flex; margin-bottom: var(--sp-3); }
.ask-row--user { justify-content: flex-end; }
.ask-row--ai { justify-content: flex-start; }

.ask-bubble { max-width: 90%; }

/* Reader's question — quiet, right-aligned, mono-ish. */
.ask-bubble--user {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  line-height: 1.45;
  color: var(--ink-2);
}

/* thinkread's answer — serif body, the voice of the piece. */
.ask-bubble--ai {
  border-left: 2px solid var(--gold);
  padding: 0.1rem 0 0.1rem 0.95rem;
}
.ask-ai-label {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.35rem;
}
.ask-ai-text {
  font-family: var(--font-serif);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
.ask-source {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--gold-soft);
  background: color-mix(in srgb, var(--gold-soft) 45%, var(--paper));
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* Empty-state seed line so the transcript never looks broken. */
.ask-seed {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-3);
  font-size: var(--t-small);
  margin: 0 0 var(--sp-2);
}

/* ---- Chips ----------------------------------------------- */
.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 var(--sp-3) var(--sp-2);
}
.ask-chip {
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  background: var(--paper-3);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.ask-chip:hover { background: var(--gold-soft); color: var(--ink); border-color: var(--gold); }
.ask-chip:focus-visible { outline: 2px dashed var(--gold-deep); outline-offset: 2px; }

/* ---- Composer -------------------------------------------- */
.ask-form {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
}
.ask-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-serif);
  font-size: var(--t-body);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ask-input::placeholder { color: var(--ink-3); }
.ask-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-soft) 70%, transparent);
}
.ask-send {
  flex: 0 0 auto;
  border: 1px solid var(--gold-deep);
  background: var(--gold-deep);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.1s var(--ease);
}
.ask-send:hover { background: var(--ink); border-color: var(--ink); }
.ask-send:active { transform: translateY(1px); }
.ask-send:focus-visible { outline: 2px dashed var(--gold-deep); outline-offset: 2px; }

/* ---- Honest footnote ------------------------------------- */
.ask-foot {
  max-width: 52rem;
  margin: var(--sp-2) auto 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---- Motion (suppressed under reduced-motion) ------------ */
.ask-in { animation: askIn 0.36s var(--ease) both; }
@keyframes askIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ask-in { animation: none; }
  .ask-transcript { scroll-behavior: auto; }
}

/* ---- Responsive ------------------------------------------ */
@media (max-width: 480px) {
  .ask-bubble { max-width: 95%; }
  .ask-form { flex-wrap: wrap; }
  .ask-send { width: 100%; padding: 0.65rem; }
}
