/* /marius — the Individuals view as its own page: timeline on the left, chat on the right.
   Builds on styles.css (layout, timeline) and chat.css (messages, input). */

/* Start with the line already at the left edge: no slide, the timeline grows in straight away. */
.is-profile { --after-slide: 150ms; }
.is-profile .stage { --split: 0%; }
.is-profile .panel,
.is-profile .divider { transition: none; }
.is-profile .divider { margin-left: 0; }

.profile {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
}

.profile__timeline {
  min-height: 0;
  overflow-y: auto;
}

/* ---------- Chat panel ---------- */
.ask {
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  justify-self: center;
  padding: 28px 32px 24px;
  font-family: var(--font-body);
}

.ask__head { margin-bottom: 8px; }
.ask__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: var(--title-weight);
  font-style: var(--title-style);
  letter-spacing: var(--title-tracking);
}
.ask__note {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.ask__log {
  flex: 1;
  min-height: 0;
  padding: 16px 2px;
  font-size: 0.95rem;
}
.ask__log .chat__msg { max-width: 88%; padding: 10px 14px; }
.ask__intro { margin: auto 0 0; color: var(--muted); }
.has-started .ask__intro { display: none; }

/* Suggested questions: a grid of cards before the first question, then up to
   3 not-yet-asked ones as small chips above the input (chat.js hides the rest). */
.ask__suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.ask__q {
  appearance: none;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: 0.88rem/1.35 var(--font-body);
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
}
.ask__q:hover { border-color: var(--ink); }
.ask__q:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.is-busy .ask__q { opacity: 0.5; pointer-events: none; }

.has-started .ask__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.has-started .ask__q {
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ask__q[hidden] { display: none; }

.ask__form {
  padding: 0;
  border-top: 0;
}
.ask__form .chat__input {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
}
.ask__form .chat__send { padding: 0 20px; border-radius: 12px; font-size: 0.9rem; }

/* ---------- Narrower screens: timeline on top, chat below, the page scrolls ---------- */
@media (max-width: 860px) {
  .profile { display: block; overflow-y: auto; }
  .profile__timeline { overflow: visible; }
  .profile .timeline { min-height: 0; padding-bottom: 8px; }
  .ask {
    height: 88dvh;
    padding: 20px 16px 16px 20px;
    border-top: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  }
  .ask__suggestions { grid-template-columns: 1fr; }
}
