kitbash Sign in Connect agent
Components

Situation and answer

A two-tone headline beside a chat panel that plays a short exchange: an orange question, typing dots, a grey answer and an input with an orange send.

Part of the style

Peach Haze Prompt Deck

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --paper: #251a1a;
  --paper-warm: #291e1e;
  --card: #211616;
  --ink: #fbf4ee;
  --ink-soft: #a9a19b;
  --ink-faint: #89817a;
  --ink-ghost: #564a4a;
  --line: rgba(251, 244, 238, 0.08);
  --chip: rgba(251, 244, 238, 0.05);
  --haze-b: #2f2323;
  --on-dark: #2f2424;
  --on-dark-soft: rgba(47, 36, 36, 0.6);
  --on-dark-chip: rgba(33, 22, 22, 0.16);
  --jewel-coal: #ede6e0;
  --scrim: rgba(255, 255, 254, 0.55);
  --glass: rgba(33, 22, 22, 0.18);
  --accent: #87645e;
  --accent-deep: #96746e;
  --accent-glow: rgba(135, 100, 94, 0.35);
  --haze-a: #706462;
  --jewel-wine: #080202;
  --tint-wine: #806661;
  --jewel-forest: #87645e;
  --jewel-plum: #87645e;
  --jewel-slate: #87645e;
}
</style>

<section class="chat">
  <div class="chat__inner">
    <div class="chat__copy">
      <p class="chat__eyebrow">How it works</p>
      <h2 class="chat__title">Describe the job.<br /><span class="chat__title-two">Hear how they did it.</span></h2>
      <p class="chat__body">Find people whose work matches what you are stuck on. Each answer comes from their own notes, jobs and mistakes, not from a manual.</p>
      <p class="chat__body">Ask why, ask for the next step, or ask how it applies to your bench and your budget.</p>
      <a class="chat__cta" href="#">Ask your first question</a>
    </div>

    <div class="chat__panel">
      <div class="chat__who">
        <img class="chat__avatar" src="assets/sitter-e.jpg" alt="Painted portrait of a man in a grey hat" width="40" height="40" />
        <span class="chat__who-text">
          <span class="chat__who-name">Pieter Holm</span>
          <span class="chat__who-role">Bookbinder · answers from 30 years of jobs</span>
        </span>
      </div>

      <div class="chat__log" aria-live="polite">
        <p class="chat__bubble chat__bubble--me">I've taken in more repair work than I can finish and the shelf keeps growing</p>
        <p class="chat__typing" aria-hidden="true"><span></span><span></span><span></span></p>
        <div class="chat__bubble chat__bubble--them">
          <p>That's the queue problem every small bench hits. Stop quoting finish dates and quote a start date instead. Then price the fast jobs higher, not lower: they are the ones that break your week.</p>
          <span class="chat__source">From his workshop notes, 2019</span>
        </div>
        <p class="chat__suggest-label">Suggested</p>
        <button class="chat__suggest" type="button">How did you say no to a regular customer without losing them?</button>
      </div>

      <form class="chat__form" action="#" onsubmit="return false">
        <label class="chat__label" for="chat-input">Ask Pieter anything</label>
        <input class="chat__input" id="chat-input" type="text" placeholder="Ask Pieter anything…" />
        <button class="chat__send" type="submit" aria-label="Send">
          <svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" /></svg>
        </button>
      </form>
    </div>
  </div>
</section>

<style>
  .chat {
    padding: var(--section-space) var(--edge);
  }
  .chat__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
    max-width: var(--max);
    margin: 0 auto;
  }
  .chat__eyebrow {
    margin: 0 0 var(--space-m);
    color: var(--ink-faint);
    font-size: var(--text-s);
  }
  .chat__title {
    margin: 0 0 var(--space-l);
    font-family: var(--font-display);
    font-size: var(--display-m);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: var(--track-tight);
  }
  .chat__title-two {
    color: var(--ink-soft);
  }
  .chat__body {
    max-width: 30em;
    margin: 0 0 var(--space-m);
    color: var(--ink-soft);
    font-size: var(--text-l);
    line-height: 1.6;
  }
  .chat__cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: var(--space-s);
    padding: 0 20px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--card);
    font-size: var(--text-m);
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--quick) var(--ease), transform var(--quick) var(--ease);
  }
  .chat__cta:hover,
  .chat__cta:focus-visible {
    background: var(--accent-deep);
  }
  .chat__cta:active {
    transform: scale(0.97);
  }

  .chat__panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    padding: 16px;
    border-radius: var(--radius-field);
    background: var(--card);
    box-shadow: var(--shadow-field);
  }
  .chat__who {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: var(--hairline) solid var(--line);
  }
  .chat__avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-s);
    object-fit: cover;
    object-position: 50% 25%;
  }
  .chat__who-text {
    display: grid;
  }
  .chat__who-name {
    font-family: var(--font-display);
    font-size: var(--display-s);
    line-height: 1.1;
    letter-spacing: var(--track-tight);
  }
  .chat__who-role {
    color: var(--ink-faint);
    font-size: var(--text-s);
  }
  .chat__log {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 300px;
  }
  .chat__bubble {
    max-width: 86%;
    margin: 0;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: var(--text-m);
    line-height: 1.5;
    transition: opacity var(--slide) var(--ease-out), transform var(--slide) var(--ease-out);
  }
  .chat__bubble p {
    margin: 0;
  }
  .chat__bubble--me {
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    background: var(--accent);
    color: var(--card);
  }
  .chat__bubble--them {
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    background: var(--paper-warm);
    color: var(--ink);
  }
  .chat__source {
    display: inline-flex;
    margin-top: 8px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: var(--card);
    box-shadow: 0 0 0 var(--hairline) var(--line);
    color: var(--ink-faint);
    font-size: var(--text-xs);
  }
  .chat__typing {
    display: none;
    align-self: flex-start;
    gap: 4px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--paper-warm);
  }
  .chat__typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink-faint);
    animation: chat-dot 1s var(--ease) infinite;
  }
  .chat__typing span:nth-child(2) { animation-delay: 0.15s; }
  .chat__typing span:nth-child(3) { animation-delay: 0.3s; }
  @keyframes chat-dot {
    50% { opacity: 0.3; transform: translateY(-3px); }
  }
  .chat__suggest-label {
    margin: 6px 0 0;
    color: var(--ink-faint);
    font-size: var(--text-xs);
  }
  .chat__suggest {
    align-self: flex-start;
    min-height: 44px;
    padding: 8px 14px;
    border: 0;
    border-radius: 14px;
    background: var(--chip);
    color: var(--ink);
    font: 500 var(--text-s) / 1.4 var(--font-body);
    text-align: left;
    cursor: pointer;
    transition: background-color var(--quick) var(--ease), opacity var(--slide) var(--ease-out);
  }
  .chat__suggest:hover,
  .chat__suggest:focus-visible {
    background: rgba(33, 32, 28, 0.09);
  }

  /* Playback: the script resets the log, then brings each line back in turn. */
  .chat.is-waiting .chat__bubble--me,
  .chat.is-waiting .chat__bubble--them,
  .chat.is-asking .chat__bubble--them,
  .chat.is-waiting .chat__suggest,
  .chat.is-asking .chat__suggest,
  .chat.is-waiting .chat__suggest-label,
  .chat.is-asking .chat__suggest-label {
    opacity: 0;
    transform: translateY(10px);
  }
  .chat.is-asking .chat__typing {
    display: flex;
  }
  .chat.is-asking .chat__bubble--them {
    display: none;
  }

  .chat__form {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    padding: 4px 4px 4px 16px;
    border-radius: var(--radius-pill);
    box-shadow: 0 0 0 var(--hairline) var(--line);
    transition: box-shadow var(--quick) var(--ease);
  }
  .chat__form:focus-within {
    box-shadow: 0 0 0 2px var(--accent-glow);
  }
  .chat__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .chat__input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: 400 var(--text-m) var(--font-body);
    outline: none;
  }
  .chat__input::placeholder {
    color: var(--ink-faint);
  }
  .chat__send {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: var(--card);
    cursor: pointer;
    transition: background-color var(--quick) var(--ease), transform var(--quick) var(--ease);
  }
  .chat__send:hover,
  .chat__send:focus-visible {
    background: var(--accent-deep);
  }
  .chat__send:active {
    transform: scale(0.92);
  }
  .chat a:focus-visible,
  .chat button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  @media (max-width: 820px) {
    .chat__inner {
      grid-template-columns: minmax(0, 1fr);
    }
    .chat__log {
      min-height: 0;
    }
  }
</style>

<script>
  (() => {
    const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
    document.querySelectorAll(".chat").forEach((chat) => {
      let timers = [];
      const play = () => {
        if (reduce) return;
        timers.forEach(clearTimeout);
        chat.classList.remove("is-asking");
        chat.classList.add("is-waiting");
        timers = [
          setTimeout(() => { chat.classList.remove("is-waiting"); chat.classList.add("is-asking"); }, 250),
          setTimeout(() => chat.classList.remove("is-asking"), 1400),
        ];
      };
      const seen = new IntersectionObserver(([entry]) => {
        if (entry.isIntersecting) { seen.disconnect(); play(); }
      }, { threshold: 0.4 });
      seen.observe(chat.querySelector(".chat__panel"));
      chat.querySelector(".chat__form").addEventListener("submit", play);
      chat.querySelector(".chat__suggest").addEventListener("click", play);
    });
  })();
</script>

Similar components

Matted diff feature

Matted diff feature

Privacy panel

Privacy panel

Filling statement

Filling statement

Statement with pills

Statement with pills

Published page

Published page

Dark ask panel

Dark ask panel

Filling statement

Filling statement

About banner

About banner