/* Conversation strip + Live Q&A answer cards. Mobile-first. */

/* ---- conversation (phone: compact strip; tap the title to expand) ------------------------ */
.transcript-pane { flex: 0 0 auto; border-bottom: 1px solid var(--line); background: rgb(18 22 28 / 0.7); }
.pane-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 2px; }
.pane-title {
  min-height: 32px; padding: 0; text-align: left;
  font: 600 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint);
}
.pane-title::after { content: " ▾"; }
.transcript-pane.expanded .pane-title::after { content: " ▴"; }
.pane-head .status { margin-right: auto; }
.call-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 10px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--text-dim); font-size: 0.8rem;
}
.call-btn:hover { color: var(--text); border-color: var(--line-strong); }
.call-btn.on { color: var(--violet); border-color: #4c3d80; background: #1e1b3a; }

.transcript-scroll { max-height: 92px; overflow-y: auto; padding: 0 6px 4px; overscroll-behavior: contain; }
.transcript-pane.expanded .transcript-scroll { max-height: 45vh; }
#transcript { list-style: none; margin: 0; padding: 0; }
.line {
  display: flex; gap: 8px; align-items: flex-start; padding: 4px 6px; border-radius: var(--radius-s);
  border-left: 2px solid transparent; font: 0.88rem/1.45 var(--font-mono); color: var(--text-dim);
}
.line .text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.line .who {
  flex-shrink: 0; min-width: 34px; margin-top: 1px; padding: 0 6px; border-radius: 4px;
  font: 700 0.62rem/1.6 var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--surface-3); color: var(--text-faint);
}
.line[data-speaker="interviewer"] .who { background: #1e1b3a; color: var(--violet); }
.line[data-speaker="you"] .who { background: var(--surface-2); color: var(--text-dim); }
.line[data-speaker="you"] .text { color: var(--text-faint); }
.line.echo .text::after { content: " · reading the answer"; font-style: italic; color: var(--text-faint); }
.line .ask-line {
  flex-shrink: 0; min-height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid #1f4d47;
  font: 600 0.72rem var(--font-ui); color: var(--live);
}
.line.checking { border-left-color: var(--busy); }
.line.question { border-left-color: var(--live); }
.line.question .text { color: var(--text); }
.line.coding { border-left-color: var(--violet); }
.line.not-question { opacity: 0.75; }
.interim { padding: 4px 10px; font: italic 0.88rem/1.45 var(--font-mono); color: var(--text-faint); border-left: 2px dashed var(--line); }

.ask { display: flex; gap: 8px; padding: 6px 8px 8px; }
.ask input { flex: 1; min-width: 0; }

/* ---- answers ------------------------------------------------------------------------- */
.answers-pane { flex: 1; overflow-y: auto; padding: 10px 8px 24px; overscroll-behavior: contain; }
#answers { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }

.empty { margin: 2vh 0 0; padding: 0 6px; color: var(--text-dim); }
.empty h2 { margin: 0 0 8px; color: var(--text); font: 650 1.4rem/1.2 var(--font-read); }
.empty ol { padding-left: 20px; line-height: 1.85; }

.card { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); animation: enter 260ms var(--ease); }
.card-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0 12px; }
.card .q { flex: 1; min-width: 0; margin: 0; font: 600 0.98rem/1.35 var(--font-read); color: var(--text-dim); }
.actions { display: flex; flex-shrink: 0; }
.actions .icon-btn { min-width: 40px; min-height: 36px; font-size: 0.82rem; }
.card:not(.streaming) .stop { display: none; }
.card.streaming :is(.deeper, .copy) { display: none; }
.card.latest { border-color: #1f4d47; box-shadow: var(--shadow); }
.card.latest.streaming { border-color: var(--live); }

.activity { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; }
.activity:empty { display: none; }
.chip.tool { color: var(--busy); border-color: #4a3a17; }
.chip.tool i { color: var(--text-dim); }

/* SAY: the one thing to read out loud. Large, high contrast, always in the same spot. */
.say {
  margin: 8px 8px 0; padding: 10px 12px; border-radius: var(--radius-m);
  background: var(--say-bg); border-left: 4px solid var(--live);
  font: 500 var(--text-say)/1.45 var(--font-read); color: #f2fffd;
}
.say p { margin: 0; }
.say p + p { margin-top: 6px; }
.say strong { color: #ffffff; }

/* KEY POINTS: scan, then keep talking. */
.points { padding: 8px 14px 2px 10px; font: var(--text-body)/1.5 var(--font-read); }
.points:empty { display: none; }
.points ul, .points ol { margin: 0; padding-left: 20px; }
.points li { margin: 3px 0; }

/* DETAILS: deeper explanation, collapsed by default. */
.more, .thinking { margin: 4px 8px 10px; border-radius: var(--radius-m); }
.more { border: 1px solid var(--line); background: var(--bg); }
.more > summary, .thinking > summary {
  min-height: 36px; padding: 8px 12px; cursor: pointer; list-style: none;
  font: 600 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim);
}
.more > summary::before, .thinking > summary::before { content: "▸ "; }
.more[open] > summary::before, .thinking[open] > summary::before { content: "▾ "; }
.details { padding: 0 12px 12px; font: 0.95rem/1.55 var(--font-read); color: #cfd8e3; }
.thinking { border: 1px dashed #4a3a17; }
.thinking > summary { color: var(--busy); }
.thinking-text { max-height: 200px; overflow-y: auto; padding: 0 12px 10px; white-space: pre-wrap; color: var(--text-faint); font-size: 0.85rem; }

.sources { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.sources:empty { display: none; }
.chip.note b { color: var(--live); font-family: var(--font-mono); }
.chip.web { color: var(--link); }

/* Older cards: question + say line only, tap to expand. */
.card.older .say { margin-bottom: 10px; padding: 8px 10px; border-left-width: 3px; background: var(--surface-2); color: var(--text-dim); font-size: 1rem; }
.card.older .say p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.older:not(.expanded) :is(.points, .more, .thinking, .activity, .sources) { display: none; }
.card.older .card-head { cursor: pointer; }
.card.older.expanded .say { color: var(--text); }
.card.older.expanded .say p { display: block; }

.skeleton {
  height: 1.4em; border-radius: var(--radius-s);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- shared markdown --------------------------------------------------------------------- */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 4px 0 8px; padding-left: 20px; }
.md li::marker { color: var(--live); }
.md strong { color: #ffffff; font-weight: 650; }
.md h3, .md h4, .md h5, .md h6 { margin: 14px 0 6px; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.md code { font-size: 0.88em; padding: 1px 5px; border-radius: 4px; background: var(--surface-3); color: #fde68a; }
.md pre {
  position: relative; margin: 8px 0; padding: 12px 14px; border-radius: var(--radius-m);
  background: #07090c; border: 1px solid var(--line); overflow-x: auto;
}
.md pre code { padding: 0; background: none; color: #d6e2f0; font-size: 0.86em; line-height: 1.55; }
.md table { display: block; overflow-x: auto; border-collapse: collapse; margin: 8px 0; font-size: 0.92em; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); }
.md a { color: var(--link); }
.md .placeholder { margin: 0; color: var(--text-faint); font-style: italic; font-size: 0.92em; }
.cite {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; margin-left: 2px;
  border-radius: 4px; background: #12302c; color: var(--live); font: 700 0.62rem var(--font-mono); vertical-align: super;
}

/* ---- wide screens ------------------------------------------------------------------------ */
@media (min-width: 960px) {
  .transcript-pane { flex: initial; border-bottom: 0; border-right: 1px solid var(--line); }
  .pane-head { padding: 12px 14px 6px; }
  .pane-title { cursor: default; pointer-events: none; }
  .pane-title::after, .transcript-pane.expanded .pane-title::after { content: ""; }
  .transcript-scroll, .transcript-pane.expanded .transcript-scroll { flex: 1; max-height: none; padding: 0 8px 10px; }
  .line { padding: 6px 8px; font-size: 0.92rem; }
  .line .ask-line { opacity: 0; transition: opacity var(--fast); }
  .line:hover { background: var(--surface-2); }
  .line:hover .ask-line, .line .ask-line:focus-visible { opacity: 1; }
  .ask { padding: 10px; border-top: 1px solid var(--line); }
  .answers-pane { padding: 16px 22px 40px; }
  .card-head { padding: 12px 14px 0 16px; }
  .say { margin: 10px 12px 0; padding: 12px 16px; }
  .points { padding: 10px 18px 4px 16px; }
  .more, .thinking { margin-left: 12px; margin-right: 12px; }
  .empty { margin-top: 7vh; max-width: 560px; }
}
