/* =========================================================================
   Stulworth — AI Founder Assessment
   Chat shell styles. Uses the existing design tokens only.
   ========================================================================= */

.assess-shell {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--s-7);
  align-items: start;
}

@media (max-width: 960px) {
  .assess-shell { grid-template-columns: 1fr; }
}

/* Left column ---------------------------------------------------------- */
.assess-side h3 { font-size: var(--fs-h3); margin-bottom: var(--s-5); }

.assess-points { list-style: none; padding: 0; margin: 0 0 var(--s-5); display: grid; gap: var(--s-4); }
.assess-points li { display: flex; gap: var(--s-4); align-items: flex-start; }
.assess-ico {
  flex: none; width: 38px; height: 38px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent-deep);
  font-weight: 800; font-size: .82rem;
}
.assess-points b { display: block; margin-bottom: 2px; }
.assess-points p { color: var(--muted); font-size: .95rem; margin: 0; }

.assess-note { color: var(--muted); font-size: .9rem; line-height: 1.6; margin-bottom: var(--s-4); }
.assess-restart { font-size: .9rem; }

/* Chat panel ----------------------------------------------------------- */
.assess-chat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; overflow: hidden;
  min-height: 560px; max-height: 78vh;
}

.assess-log {
  flex: 1; overflow-y: auto; padding: var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-4);
  scroll-behavior: smooth;
}

.msg { max-width: 82%; padding: 12px 16px; border-radius: var(--r-md); line-height: 1.55; font-size: .98rem; }
.msg .msg-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; opacity: .7; }
.msg p { margin: 0 0 .6em; }
.msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { margin: .3em 0 .6em; padding-left: 1.2em; }
.msg li { margin-bottom: .25em; }
.msg b, .msg strong { font-weight: 700; }

.msg--ai {
  align-self: flex-start;
  background: var(--surface-2); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.msg--user {
  align-self: flex-end;
  background: var(--ink); color: #fff;
}
.msg--user .msg-label { color: rgba(255,255,255,.7); }

.msg--error {
  align-self: center; max-width: 92%; text-align: center;
  background: #fff5f5; border: 1px solid rgba(180,40,40,.25); color:#8a2323;
}

/* typing indicator */
.msg--typing { display: inline-flex; align-items:center; gap: 5px; }
.msg--typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2);
  animation: assess-bounce 1.1s infinite ease-in-out;
}
.msg--typing span:nth-child(2) { animation-delay: .15s; }
.msg--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes assess-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* streaming caret */
.assess-caret::after {
  content: ''; display:inline-block; width: 2px; height: 1em;
  background: var(--accent-deep); margin-left: 2px; vertical-align: -2px;
  animation: assess-blink 1s steps(2, start) infinite;
}
@keyframes assess-blink { to { visibility: hidden; } }

/* Input row ------------------------------------------------------------ */
.assess-inputrow {
  display: flex; gap: var(--s-3); align-items: flex-end;
  padding: var(--s-4); border-top: 1px solid var(--line); background: var(--surface);
}
.assess-input {
  flex: 1; resize: none; font: inherit; font-size: 1rem;
  padding: 12px 14px; border: 1px solid var(--line-strong);
  border-radius: var(--r-md); background: var(--bg); color: var(--ink);
  max-height: 160px; outline: none;
  transition: border-color var(--dur-fast);
}
.assess-input:focus { border-color: var(--accent); }
.assess-send { flex: none; }

.assess-quick { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0 var(--s-4) var(--s-4); }
.assess-quick:empty { display: none; }
.chip-quick {
  font: inherit; font-size: .85rem; cursor: pointer;
  padding: 7px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-soft);
  transition: all var(--dur-fast);
}
.chip-quick:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-tint); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 640px) {
  .assess-chat { min-height: 480px; max-height: 70vh; }
  .assess-log { padding: var(--s-4); }
  .msg { max-width: 92%; }
}
