/* ── Hero window ────────────────────────────────────────────
   The scripted product in the hero (views/landing-window.js): scenario tabs
   and an app window with what the AI knows on the left and the conversation
   on the right. Mirrors the real chat: the user in a bubble, the AI as plain
   text, numbered citations under the answer. Monochrome and flat. */

/* ── Window ─────────────────────────────────────────────── */

.lp-win {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  background: var(--lp-panel);
  box-shadow: var(--lp-shadow);
  text-align: left;
}

.lp-win-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 16px;
  background: var(--lp-panel-side);
  border-bottom: 1px solid var(--lp-hair);
}

.lp-win-dots { display: flex; gap: 7px; }
.lp-win-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--lp-chip); box-shadow: inset 0 0 0 1px var(--lp-hair); }

.lp-win-url {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 16px;
  border-radius: 8px;
  background: var(--lp-chip);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.lp-win-url svg { width: 11px; height: 11px; color: var(--subtle); }
.lp-win-url span { overflow: hidden; text-overflow: ellipsis; }

.lp-win-live {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--good);
}

.lp-win-body {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  height: 488px;
}

/* ── Sidebar: who it is, what it knows, who can ask ─────── */

.lp-win-side {
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  background: var(--lp-panel-side);
  border-right: 1px solid var(--lp-hair);
  min-width: 0;
}

.lp-win-id { display: flex; flex-direction: column; gap: 2px; padding: 0 8px 22px; }
.lp-win-id .lp-av { margin-bottom: 12px; }
.lp-win-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.lp-win-role { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lp-win-label {
  margin: 18px 8px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.lp-win-files { display: flex; flex-direction: column; gap: 2px; }

.lp-win-file, .lp-win-access {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
}

.lp-win-file span, .lp-win-access span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-win-file svg, .lp-win-access svg { width: 15px; height: 15px; color: var(--subtle); }
.lp-win-access { color: var(--text); background: var(--lp-chip); }

/* Avatars: the persona's line portrait on a light tile. The art is black on
   white, so the tile stays light in both themes rather than inverting. */
.lp-av {
  display: block;
  flex: none;
  border-radius: 50%;
  background: #efefef;
  object-fit: cover;
}

.lp-av--sm { width: 28px; height: 28px; }
.lp-av--lg { width: 48px; height: 48px; }

/* ── Conversation ───────────────────────────────────────── */

.lp-win-main { display: flex; flex-direction: column; min-width: 0; }
.lp-win-mhead { display: none; }

.lp-win-thread {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 40px 16px;
}

.lp-win-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; }

.lp-win-ai {
  padding-top: 3px;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--text);
  max-width: 62ch;
}

.lp-win-user {
  align-self: flex-end;
  max-width: 72%;
  padding: 10px 17px;
  border-radius: 20px;
  background: var(--lp-chip);
  box-shadow: inset 0 0 0 1px var(--lp-hair);
  font-size: 15.5px;
  line-height: 1.5;
}

/* Citation marker: a small numbered tab, like the real chat's. Lifted with
   position rather than vertical-align so it never stretches the line box,
   and a plain inline box (not inline-block) so the line can never break
   between a word and its marker. */
.lp-cite {
  position: relative;
  top: -0.4em;
  display: inline;
  margin: 0 1px 0 3px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--lp-chip-hi);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  vertical-align: baseline;
}

.lp-win-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 42px; }

.lp-win-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 5px 11px 5px 5px;
  border-radius: 10px;
  background: var(--lp-chip);
  box-shadow: inset 0 0 0 1px var(--lp-hair);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.lp-win-source > svg { width: 13px; height: 13px; color: var(--subtle); }
.lp-win-source-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.lp-win-source-where { color: var(--subtle); }

.lp-win-source-n {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--lp-chip-hi);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
}

.lp-win-typing { display: inline-flex; gap: 5px; padding-top: 8px; }

.lp-win-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--subtle);
  animation: lp-typing 1.1s ease-in-out infinite;
}

.lp-win-typing i:nth-child(2) { animation-delay: 0.15s; }
.lp-win-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes lp-typing { 0%, 100% { opacity: 0.3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

/* ── Input ──────────────────────────────────────────────── */

.lp-win-input {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 54px;
  margin: 0 32px 26px;
  padding: 0 8px 0 20px;
  border-radius: 27px;
  background: var(--lp-panel-side);
  box-shadow: inset 0 0 0 1px var(--lp-hair);
}

.lp-win-input-line {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
}

.lp-win-placeholder { color: var(--subtle); }
.lp-win-input-text { overflow: hidden; text-overflow: ellipsis; }

.lp-win-caret {
  width: 1.5px;
  height: 18px;
  margin-left: 1px;
  background: var(--text);
  flex: none;
  animation: lp-caret 1.05s steps(1) infinite;
}

@keyframes lp-caret { 50% { opacity: 0; } }

.lp-win-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--muted);
}

.lp-win-btn svg { width: 18px; height: 18px; }
.lp-win-btn--send { background: var(--accent); color: var(--on-accent); }
.lp-win-btn--send svg { width: 16px; height: 16px; }

/* ── Small screens ──────────────────────────────────────── */

@media (max-width: 860px) {
  .lp-win-body { grid-template-columns: 1fr; height: 470px; }
  .lp-win-side { display: none; }

  .lp-win-mhead {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 11px;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid var(--lp-hair);
  }

  .lp-win-mhead .lp-av { grid-row: span 2; }
  .lp-win-mhead .lp-win-name { font-size: 14px; line-height: 1.3; }
  .lp-win-mhead .lp-win-role { font-size: 12px; line-height: 1.3; }
}

@media (max-width: 600px) {
  .lp-win { border-radius: 14px 14px 0 0; }
  .lp-win-bar { grid-template-columns: auto minmax(0, 1fr) auto; height: 42px; padding: 0 12px; }
  .lp-win-dots span { width: 9px; height: 9px; }
  .lp-win-url { justify-self: center; padding: 4px 10px; font-size: 11.5px; }
  .lp-win-body { height: 460px; }
  .lp-win-thread { padding: 20px 16px 10px; gap: 16px; }
  .lp-win-row { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
  .lp-win-row .lp-av--sm { width: 24px; height: 24px; }
  .lp-win-ai, .lp-win-user { font-size: 14px; }
  .lp-win-user { max-width: 86%; padding: 9px 14px; }
  .lp-win-sources { margin-left: 34px; }
  .lp-win-input { height: 48px; margin: 0 12px 14px; padding-left: 16px; }
  .lp-win-input-line { font-size: 14px; }
  .lp-win-btn { width: 34px; height: 34px; }
}
