/* ============================================================
   Demos page: the shared "Try it" window.

   One frame, seven demos. Each demo lives in its own script and
   registers a widget factory into TryItWindow (see scripts/demos/
   try-it.js). When a visitor opens a demo detail page, the matching
   widget is mounted inside this frame, in the empty .dv-space the
   detail layout reserves for it.

   Design is a quiet white card on the detail page's near-white
   background: title row, "Sample data" tag, Reset button, optional
   suggestion chips, body area. Black/white/grey only, Switzer type,
   ease-out motion. Keep this file demo-wide only; demo-specific
   bits (chat bubbles for 01, quote card for 02, calendar for 04)
   live inside each widget's own stylesheet or inline module.
   ============================================================ */

/* The outer card. Sits in .dv-space. Flexes to the content inside. */
.try-it {
  --tiw-radius: 24px;
  --tiw-pad-x: clamp(20px, 2.4vw, 36px);
  --tiw-pad-y: clamp(20px, 2.2vw, 32px);
  --tiw-line: rgba(11, 11, 12, 0.1);
  --tiw-line-strong: rgba(11, 11, 12, 0.16);
  --tiw-muted: #6E6B63;
  --tiw-ink: #141311;
  --tiw-surface: #ffffff;
  --tiw-chip-bg: #F3F3F2;
  --tiw-chip-bg-hover: #E8E6E0;

  position: relative;
  max-width: 1192px;
  margin: 0 auto;
  background: var(--tiw-surface);
  border-radius: var(--tiw-radius);
  border: 1px solid var(--tiw-line);
  box-shadow: 0 24px 60px -32px rgba(11, 11, 12, 0.25),
              0 8px 20px -14px rgba(11, 11, 12, 0.12);
  overflow: hidden;
  /* Fade-up on first mount so it does not just pop into view */
  opacity: 0; transform: translateY(14px);
  transition: opacity 520ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 620ms cubic-bezier(0.23, 1, 0.32, 1);
}
.try-it.is-ready { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .try-it { opacity: 1; transform: none; transition: none; }
}

/* --- Header row: eyebrow + title + reset button --- */
.try-it-head {
  padding: var(--tiw-pad-y) var(--tiw-pad-x) 0;
  display: flex; flex-direction: column; gap: 12px;
}
.try-it-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--tiw-muted);
}
.try-it-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; /* the one allowed non-ink colour: a live-call style dot */
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  animation: tiw-pulse 1.8s ease-in-out infinite;
}
@keyframes tiw-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08); }
}
@media (prefers-reduced-motion: reduce) { .try-it-dot { animation: none; } }

.try-it-eyebrow .try-it-label { font-weight: 600; color: var(--tiw-ink); letter-spacing: 0.14em; }
.try-it-tag {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body, 'Switzer', -apple-system, system-ui, sans-serif);
  font-size: 12px;
  color: var(--tiw-muted);
}
.try-it-tag::before { content: "·"; margin-right: 10px; opacity: 0.5; }

.try-it-title-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
}
.try-it-title {
  margin: 0;
  font-family: var(--font-display, 'Switzer', sans-serif);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.02em;
  color: var(--tiw-ink);
}
.try-it-reset {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--tiw-chip-bg);
  border: 1px solid var(--tiw-line);
  border-radius: 999px;
  color: var(--tiw-ink);
  font-family: inherit; font-size: 13px; font-weight: 500; letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.try-it-reset:hover { background: var(--tiw-chip-bg-hover); }
.try-it-reset:active { transform: scale(0.97); }
.try-it-reset:focus-visible { outline: 2px solid var(--tiw-ink); outline-offset: 2px; }
.try-it-reset svg { width: 14px; height: 14px; }

/* --- Suggestion chips: tap-to-try prompts, horizontally scrollable on narrow screens --- */
.try-it-chips {
  padding: 18px var(--tiw-pad-x) 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.try-it-chip {
  background: var(--tiw-chip-bg);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--tiw-ink);
  font-family: inherit; font-size: 13px; letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.try-it-chip:hover { background: var(--tiw-chip-bg-hover); border-color: var(--tiw-line); }
.try-it-chip:active { transform: scale(0.97); }
.try-it-chip:focus-visible { outline: 2px solid var(--tiw-ink); outline-offset: 2px; }
.try-it-chips:empty { display: none; }

/* --- Body: the demo-specific content area --- */
.try-it-body {
  padding: var(--tiw-pad-y) var(--tiw-pad-x);
  min-height: 320px;
  color: var(--tiw-ink);
  font-family: var(--font-body, 'Switzer', sans-serif);
}
.try-it-body:empty::before {
  /* while a demo widget is being wired, show a quiet placeholder so the frame
     still looks intentional. Each demo widget replaces this on mount. */
  content: 'Loading the demo…';
  display: block;
  color: var(--tiw-muted);
  font-size: 14px;
  text-align: center;
  padding: 48px 0;
}

/* ============================================================
   01 AI Receptionist widget
   Chat column on the left (fake phone call), captured-info card
   on the right. The visitor plays the caller: types a line, the
   receptionist answers, and the side card fills in what it caught.
   ============================================================ */
.rcp {
  --rcp-bg: #F7F7F5;
  --rcp-panel: #ffffff;
  --rcp-ink: #141311;
  --rcp-muted: #6E6B63;
  --rcp-line: rgba(11, 11, 12, 0.1);
  --rcp-bubble-me: #141311;
  --rcp-bubble-them: #ECEDEF;
  --rcp-accent: #22c55e; /* only used for the live-call status dot */

  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  min-height: 560px;
}
@media (max-width: 820px) {
  .rcp { grid-template-columns: 1fr; }
}

/* --- Left column: the chat / call panel --- */
.rcp-chat {
  background: var(--rcp-panel);
  border: 1px solid var(--rcp-line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rcp-call-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--rcp-ink);
  color: #fff;
}
.rcp-call-left { display: flex; align-items: center; gap: 12px; }
.rcp-call-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #262523; color: #fff;
  display: inline-grid; place-items: center;
  font-family: var(--font-display, 'Switzer', sans-serif);
  font-size: 13px; font-weight: 600; letter-spacing: -0.02em;
}
.rcp-call-biz { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.rcp-call-status {
  margin: 2px 0 0;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px; letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex; align-items: center; gap: 8px;
}
.rcp-call-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rcp-accent);
  animation: tiw-pulse 1.8s ease-in-out infinite;
}
.rcp-hangup {
  width: 36px; height: 36px; border-radius: 50%;
  background: #DC2626; color: #fff; border: 0;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1), background 220ms ease;
}
.rcp-hangup:hover { transform: rotate(135deg); background: #B91C1C; }
.rcp-hangup:active { transform: rotate(135deg) scale(0.95); }
.rcp-hangup svg { width: 16px; height: 16px; }

.rcp-messages {
  flex: 1;
  padding: 20px 18px;
  background: var(--rcp-bg);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.rcp-msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px; line-height: 1.45; letter-spacing: -0.005em;
  animation: rcp-rise 420ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes rcp-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .rcp-msg { animation: none; } }

.rcp-msg-them {
  align-self: flex-start;
  background: var(--rcp-bubble-them);
  color: var(--rcp-ink);
  border-top-left-radius: 6px;
}
.rcp-msg-me {
  align-self: flex-end;
  background: var(--rcp-bubble-me);
  color: #fff;
  border-top-right-radius: 6px;
}
.rcp-msg-note {
  align-self: center;
  background: transparent;
  color: var(--rcp-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 4px 10px;
}
.rcp-typing {
  align-self: flex-start;
  background: var(--rcp-bubble-them);
  padding: 12px 14px;
  border-radius: 16px;
  border-top-left-radius: 6px;
  display: inline-flex; gap: 4px;
}
.rcp-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--rcp-muted);
  opacity: 0.55;
  animation: rcp-blink 1.1s ease-in-out infinite;
}
.rcp-typing span:nth-child(2) { animation-delay: 0.15s; }
.rcp-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes rcp-blink {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40%           { transform: translateY(-2px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .rcp-typing span { animation: none; opacity: 0.7; } }

.rcp-compose {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--rcp-panel);
  border-top: 1px solid var(--rcp-line);
}
.rcp-input {
  flex: 1; min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--rcp-line);
  border-radius: 999px;
  background: var(--rcp-bg);
  color: var(--rcp-ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 220ms ease, background 220ms ease;
}
.rcp-input:focus { border-color: var(--rcp-ink); background: #fff; }
.rcp-input:disabled { opacity: 0.6; cursor: not-allowed; }

.rcp-mic, .rcp-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--rcp-bg);
  border: 1px solid var(--rcp-line);
  color: var(--rcp-ink);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.rcp-mic:hover, .rcp-send:hover { background: #E8E6E0; }
.rcp-mic:active, .rcp-send:active { transform: scale(0.95); }
.rcp-send { background: var(--rcp-ink); color: #fff; border-color: var(--rcp-ink); }
.rcp-send:hover { background: #000; }
.rcp-mic.is-listening {
  background: #DC2626; color: #fff; border-color: #DC2626;
  animation: rcp-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes rcp-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35); }
  50%      { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}
.rcp-mic svg, .rcp-send svg { width: 16px; height: 16px; }
.rcp-mic[hidden], .rcp-send[hidden] { display: none; }

/* --- Right column: captured info --- */
.rcp-side {
  background: var(--rcp-panel);
  border: 1px solid var(--rcp-line);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.rcp-side-eyebrow {
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--rcp-muted);
}
.rcp-fields { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }
.rcp-fields li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rcp-line);
  font-size: 14px;
}
.rcp-fields li:last-child { border-bottom: 0; }
.rcp-fields li span { color: var(--rcp-muted); letter-spacing: -0.005em; }
.rcp-fields li strong {
  color: var(--rcp-ink);
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  transition: color 220ms ease;
}
.rcp-fields li strong.is-empty { color: #BFBDB6; font-weight: 400; }
.rcp-fields li strong.just-filled { animation: rcp-fill 1.2s ease-out; }
@keyframes rcp-fill {
  0%   { background: rgba(34, 197, 94, 0.18); }
  100% { background: transparent; }
}

.rcp-handoff {
  margin-top: 4px;
  padding: 14px;
  background: var(--rcp-bg);
  border: 1px dashed var(--rcp-line);
  border-radius: 12px;
}
.rcp-handoff-note {
  margin: 8px 0 0;
  font-size: 13px; line-height: 1.5;
  color: var(--rcp-ink);
  white-space: pre-wrap;
}
.rcp-handoff[hidden] { display: none; }

/* ============================================================
   02 Instant Quotes widget
   One-shot input: visitor types the job plus the car. The AI reads
   it and tags the matching service id; the price is computed in
   code from the Harbour Garage price list and shown as a quote card.
   ============================================================ */
.iq {
  --iq-ink: #141311;
  --iq-muted: #6E6B63;
  --iq-line: rgba(11, 11, 12, 0.1);
  --iq-panel: #ffffff;
  --iq-bg: #F7F7F5;
  display: flex; flex-direction: column; gap: 18px; min-height: 520px;
}
.iq-input-row {
  display: flex; gap: 10px;
  padding: 14px;
  background: var(--iq-bg);
  border: 1px solid var(--iq-line);
  border-radius: 14px;
}
.iq-input {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--iq-line);
  border-radius: 10px;
  background: #fff;
  color: var(--iq-ink);
  font-family: inherit; font-size: 15px; letter-spacing: -0.005em;
  outline: none;
  transition: border-color 220ms ease;
}
.iq-input:focus { border-color: var(--iq-ink); }
.iq-input::placeholder { color: #BFBDB6; }
.iq-go {
  padding: 0 20px;
  background: var(--iq-ink); color: #fff; border: 0;
  border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
}
.iq-go:hover { background: #000; }
.iq-go:active { transform: scale(0.97); }
.iq-go:disabled { opacity: 0.55; cursor: not-allowed; }

/* --- the result area --- */
.iq-result { min-height: 320px; display: block; }
.iq-result:empty::before {
  content: 'A quote appears here once you ask.';
  display: block;
  color: var(--iq-muted);
  font-size: 14px;
  text-align: center;
  padding: 72px 0;
}

.iq-thinking {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  color: var(--iq-muted);
  font-size: 14px;
}
.iq-thinking .iq-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(11, 11, 12, 0.15);
  border-top-color: var(--iq-ink);
  animation: iq-spin 1s linear infinite;
}
@keyframes iq-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .iq-thinking .iq-spinner { animation: none; } }

/* --- the quote card --- */
.iq-card {
  background: var(--iq-panel);
  border: 1px solid var(--iq-line);
  border-radius: 16px;
  padding: 22px 24px;
  animation: iq-rise 480ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes iq-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .iq-card { animation: none; } }

.iq-card-eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-mono, monospace);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--iq-muted);
}
.iq-card-title {
  margin: 0 0 2px;
  font-family: var(--font-display, 'Switzer', sans-serif);
  font-size: 20px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--iq-ink);
}
.iq-card-car { margin: 0 0 14px; font-size: 13px; color: var(--iq-muted); }

.iq-lines { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }
.iq-lines li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--iq-line);
  font-size: 14px;
}
.iq-lines li span { color: var(--iq-muted); }
.iq-lines li strong { color: var(--iq-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.iq-sub, .iq-tax {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 8px 0; font-size: 13px; color: var(--iq-muted);
}
.iq-sub strong, .iq-tax strong { color: var(--iq-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.iq-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 14px 0 10px;
  border-top: 1px solid var(--iq-ink);
  font-family: var(--font-display, 'Switzer', sans-serif);
  font-size: 20px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--iq-ink);
}
.iq-total strong { font-variant-numeric: tabular-nums; }

.iq-notes { margin: 10px 0 16px; font-size: 13px; color: var(--iq-muted); line-height: 1.5; }

.iq-book {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  background: var(--iq-ink); color: #fff;
  border: 0; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.iq-book:hover { background: #000; }
.iq-book:active { transform: scale(0.97); }
.iq-book svg { width: 14px; height: 14px; }

.iq-booked {
  margin-top: 14px;
  padding: 14px;
  background: var(--iq-bg);
  border: 1px dashed var(--iq-line);
  border-radius: 12px;
  font-size: 13px; color: var(--iq-ink); line-height: 1.5;
}
.iq-booked[hidden] { display: none; }
.iq-booked strong { font-weight: 500; }

/* --- out-of-scope / needs-more-info notes --- */
.iq-note {
  padding: 22px 24px;
  background: var(--iq-bg);
  border: 1px solid var(--iq-line);
  border-radius: 16px;
  font-size: 15px; color: var(--iq-ink); line-height: 1.5;
  animation: iq-rise 480ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.iq-note p { margin: 0 0 6px; }
.iq-note p:last-child { margin-bottom: 0; }
.iq-note-small { color: var(--iq-muted); font-size: 13px; }

/* ============================================================
   04 Appointment Booking widget
   Left: three steps (service, day, time). Right: the booking
   summary, then after confirming, the day's calendar with the
   slot taken. Same quiet black/white/grey system as 01 and 02.
   ============================================================ */
.apb {
  --apb-ink: #141311;
  --apb-muted: #6E6B63;
  --apb-line: rgba(11, 11, 12, 0.1);
  --apb-bg: #F7F7F5;
  --apb-chip: #F3F3F2;
  min-height: 460px;
}
.apb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .apb-grid { grid-template-columns: 1fr; } }

.apb-steps { display: flex; flex-direction: column; gap: 10px; }
.apb-step-title {
  margin: 8px 0 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em; color: var(--apb-ink);
}
.apb-step-title span {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--apb-ink); color: #fff;
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 500;
}
.apb-hint { margin: 0; font-size: 13px; color: var(--apb-muted); line-height: 1.5; }

.apb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.apb-pill {
  padding: 8px 14px;
  background: var(--apb-chip);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--apb-ink);
  font-family: inherit; font-size: 13px; letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.apb-pill:hover { background: #E8E6E0; border-color: var(--apb-line); }
.apb-pill:active { transform: scale(0.97); }
.apb-pill:focus-visible, .apb-time:focus-visible, .apb-confirm:focus-visible { outline: 2px solid var(--apb-ink); outline-offset: 2px; }
.apb-pill.is-on { background: var(--apb-ink); color: #fff; }
.apb-pill:disabled { opacity: 0.45; cursor: not-allowed; }
.apb-day { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; border-radius: 14px; }
.apb-day strong { font-weight: 500; }
.apb-day small { font-size: 11px; opacity: 0.65; }

.apb-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.apb-time {
  padding: 10px 8px;
  background: #fff;
  border: 1px solid var(--apb-line);
  border-radius: 10px;
  color: var(--apb-ink);
  font-family: inherit; font-size: 13px; font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.apb-time:hover { border-color: var(--apb-ink); }
.apb-time:active { transform: scale(0.97); }
.apb-time.is-on { background: var(--apb-ink); color: #fff; border-color: var(--apb-ink); }
.apb-time.is-taken, .apb-time:disabled {
  background: var(--apb-bg); color: #B5B2AA; border-color: transparent;
  text-decoration: line-through; cursor: not-allowed;
}

/* --- side card --- */
.apb-side {
  background: #fff;
  border: 1px solid var(--apb-line);
  border-radius: 18px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  align-self: start;
}
.apb-eyebrow {
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--apb-muted);
}
.apb-summary { margin: 0; padding: 0; list-style: none; }
.apb-summary li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--apb-line); font-size: 14px;
}
.apb-summary li:last-child { border-bottom: 0; }
.apb-summary span { color: var(--apb-muted); }
.apb-summary strong { font-weight: 500; text-align: right; max-width: 62%; }
.apb-summary strong.is-empty { color: #BFBDB6; font-weight: 400; }

.apb-confirm {
  padding: 13px 22px;
  background: var(--apb-ink); color: #fff;
  border: 0; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1), opacity 220ms ease;
}
.apb-confirm:hover { background: #000; }
.apb-confirm:active { transform: scale(0.97); }
.apb-confirm:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- after confirming --- */
.apb-done .apb-steps { gap: 14px; }
.apb-ok { display: flex; align-items: center; gap: 14px; }
.apb-ok-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--apb-ink); color: #fff;
  display: inline-grid; place-items: center; flex: none;
  animation: apb-pop 520ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.apb-ok-mark svg { width: 18px; height: 18px; }
@keyframes apb-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.apb-ok-title { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.apb-ok-sub { margin: 2px 0 0; font-size: 13px; color: var(--apb-muted); }

.apb-sms {
  background: var(--apb-bg);
  border: 1px solid var(--apb-line);
  border-radius: 16px;
  border-top-left-radius: 6px;
  padding: 12px 14px;
  max-width: 460px;
  animation: apb-rise 480ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.apb-sms:nth-of-type(2) { animation-delay: 120ms; }
.apb-sms p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; }
.apb-sms-when {
  font-family: var(--font-mono, monospace);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--apb-muted);
}
@keyframes apb-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.apb-actions { margin-top: 4px; }

.apb-cal { margin: 0; padding: 0; list-style: none; max-height: 340px; overflow-y: auto; }
.apb-cal li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border-bottom: 1px solid var(--apb-line);
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.apb-cal li em { font-style: normal; color: var(--apb-muted); }
.apb-cal li.is-taken { color: #B5B2AA; }
.apb-cal li.is-mine { background: var(--apb-ink); color: #fff; border-radius: 8px; border-bottom-color: transparent; }
.apb-cal li.is-mine em { color: rgba(255, 255, 255, 0.75); }

@media (prefers-reduced-motion: reduce) {
  .apb-ok-mark, .apb-sms { animation: none; }
}

/* ============================================================
   07 Workflow Automation widget
   A booking comes in, four steps run in order, each has a switch.
   Switched-off steps land in a "Left to do by hand" list. Counts
   steps, never minutes. Same black/white/grey system.
   ============================================================ */
.wfa {
  --wfa-ink: #141311;
  --wfa-muted: #6E6B63;
  --wfa-line: rgba(11, 11, 12, 0.1);
  --wfa-bg: #F7F7F5;
  min-height: 460px;
}
.wfa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .wfa-grid { grid-template-columns: 1fr; } }
.wfa-main { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

.wfa-eyebrow {
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--wfa-muted);
}
.wfa-eyebrow-gap { margin-top: 16px; }

.wfa-incoming {
  width: 100%; box-sizing: border-box;
  background: var(--wfa-bg);
  border: 1px solid var(--wfa-line);
  border-radius: 16px;
  padding: 16px 18px;
}
.wfa-incoming-title { margin: 6px 0 2px; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.wfa-incoming-sub { margin: 0; font-size: 13px; color: var(--wfa-muted); line-height: 1.5; }

.wfa-go {
  padding: 13px 22px;
  background: var(--wfa-ink); color: #fff;
  border: 0; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1), opacity 220ms ease;
}
.wfa-go:hover { background: #000; }
.wfa-go:active { transform: scale(0.97); }
.wfa-go:disabled { opacity: 0.45; cursor: not-allowed; }
.wfa-go:focus-visible, .wfa-switch:focus-visible { outline: 2px solid var(--wfa-ink); outline-offset: 2px; }

.wfa-steps { width: 100%; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.wfa-step {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--wfa-line);
  border-radius: 14px;
  transition: border-color 260ms ease, background 260ms ease, opacity 260ms ease;
}
.wfa-step.is-running { border-color: var(--wfa-ink); }
.wfa-step.is-done { background: var(--wfa-bg); }
.wfa-step.is-off, .wfa-step.is-skipped { opacity: 0.6; }
.wfa-num {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--wfa-bg); color: var(--wfa-ink);
  border: 1px solid var(--wfa-line);
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 500;
  transition: background 260ms ease, color 260ms ease;
}
.wfa-step.is-running .wfa-num { border-color: var(--wfa-ink); animation: wfa-pulse 1s ease-in-out infinite; }
.wfa-step.is-done .wfa-num { background: var(--wfa-ink); color: #fff; border-color: var(--wfa-ink); }
@keyframes wfa-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(20, 19, 17, 0.25); } 50% { box-shadow: 0 0 0 6px rgba(20, 19, 17, 0); } }
.wfa-step-body { flex: 1; min-width: 0; }
.wfa-step-title { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.wfa-step-line { margin: 2px 0 0; font-size: 13px; color: var(--wfa-muted); line-height: 1.45; }

.wfa-switch {
  flex: none; position: relative;
  width: 40px; height: 24px; padding: 0;
  background: #D9D7D0; border: 0; border-radius: 999px;
  cursor: pointer;
  transition: background 220ms ease;
}
.wfa-switch.is-on { background: var(--wfa-ink); }
.wfa-switch:disabled { opacity: 0.5; cursor: not-allowed; }
.wfa-knob {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.wfa-switch.is-on .wfa-knob { transform: translateX(16px); }

.wfa-result {
  background: #fff;
  border: 1px solid var(--wfa-line);
  border-radius: 18px;
  padding: 20px;
  align-self: start;
  display: flex; flex-direction: column; gap: 8px;
}
.wfa-hint { margin: 0; font-size: 13px; color: var(--wfa-muted); line-height: 1.5; }
.wfa-tally { margin: 0; font-size: 15px; color: var(--wfa-ink); }
.wfa-tally strong { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin-right: 4px; }
.wfa-hand { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.45; }

@media (prefers-reduced-motion: reduce) {
  .wfa-step.is-running .wfa-num { animation: none; }
  .wfa-knob, .wfa-switch, .wfa-step { transition: none; }
}

/* ============================================================
   05 Lead Capture widget
   Send an enquiry in through a channel; it lands in the inbox,
   gets a hot / warm / cold tag with a one-line reason, a named
   owner, and a row in the CRM list. Hot, warm and cold are shown
   as a filled, half filled and empty dot plus the word, because
   the design system allows no accent colour.
   ============================================================ */
.lcp {
  --lcp-ink: #141311;
  --lcp-muted: #6E6B63;
  --lcp-line: rgba(11, 11, 12, 0.1);
  --lcp-bg: #F7F7F5;
  min-height: 460px;
}
.lcp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .lcp-grid { grid-template-columns: 1fr; } }
.lcp-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.lcp-eyebrow {
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--lcp-muted);
}
.lcp-gap { margin-top: 8px; }

.lcp-chans { display: flex; flex-wrap: wrap; gap: 8px; }
.lcp-chan {
  padding: 8px 14px;
  background: #F3F3F2; color: var(--lcp-ink);
  border: 1px solid transparent; border-radius: 999px;
  font-family: inherit; font-size: 13px; letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.lcp-chan:hover { background: #E8E6E0; }
.lcp-chan:active { transform: scale(0.97); }
.lcp-chan.is-on { background: var(--lcp-ink); color: #fff; }
.lcp-chan:focus-visible, .lcp-send:focus-visible, .lcp-input:focus-visible { outline: 2px solid var(--lcp-ink); outline-offset: 2px; }

.lcp-compose { display: flex; gap: 8px; }
.lcp-input {
  flex: 1; min-width: 0;
  padding: 11px 14px;
  background: #fff; color: var(--lcp-ink);
  border: 1px solid var(--lcp-line); border-radius: 12px;
  font-family: inherit; font-size: 14px;
}
.lcp-input:focus { border-color: var(--lcp-ink); outline: none; }
.lcp-send {
  padding: 0 18px;
  background: var(--lcp-ink); color: #fff;
  border: 0; border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 500; white-space: nowrap;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.lcp-send:hover { background: #000; }
.lcp-send:active { transform: scale(0.97); }

.lcp-inbox { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; }
.lcp-item {
  background: #fff;
  border: 1px solid var(--lcp-line);
  border-radius: 14px;
  padding: 12px 14px;
}
.lcp-item.is-fresh { animation: lcp-rise 480ms cubic-bezier(0.23, 1, 0.32, 1) both; border-color: var(--lcp-ink); }
@keyframes lcp-rise { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.lcp-item-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lcp-channel {
  font-family: var(--font-mono, monospace);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lcp-muted);
}
.lcp-sorting { font-size: 12px; color: var(--lcp-muted); }
.lcp-name { margin: 6px 0 0; font-size: 14px; font-weight: 500; }
.lcp-msg { margin: 2px 0 0; font-size: 13px; color: var(--lcp-ink); line-height: 1.45; }
.lcp-reason { margin: 8px 0 0; font-size: 12px; color: var(--lcp-muted); line-height: 1.45; }
.lcp-route { margin: 4px 0 0; font-size: 12px; color: var(--lcp-muted); }
.lcp-route strong { color: var(--lcp-ink); font-weight: 500; }

.lcp-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--lcp-ink);
}
.lcp-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--lcp-ink); box-sizing: border-box;
}
.lcp-hot .lcp-dot { background: var(--lcp-ink); }
.lcp-warm .lcp-dot { background: linear-gradient(90deg, var(--lcp-ink) 50%, transparent 50%); }
.lcp-cold .lcp-dot { background: transparent; }

.lcp-side {
  background: #fff;
  border: 1px solid var(--lcp-line);
  border-radius: 18px;
  padding: 20px;
  align-self: start;
  display: flex; flex-direction: column; gap: 8px;
}
.lcp-count { margin: 0; font-size: 15px; }
.lcp-count strong { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin-right: 4px; }
.lcp-crm { margin: 6px 0 0; padding: 0; list-style: none; max-height: 340px; overflow-y: auto; }
.lcp-crm li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--lcp-line); font-size: 13px;
}
.lcp-crm li:last-child { border-bottom: 0; }
.lcp-crm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcp-crm em { font-style: normal; color: var(--lcp-muted); min-width: 44px; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  .lcp-item.is-fresh { animation: none; }
}

/* ============================================================
   03 Smart CRM widget
   Customer list and "Ask your CRM" on the left; the record on the
   right (summary, follow-up, log a conversation, timeline). Same
   black/white/grey system as the other demos.
   ============================================================ */
.crm {
  --crm-ink: #141311;
  --crm-muted: #6E6B63;
  --crm-line: rgba(11, 11, 12, 0.1);
  --crm-bg: #F7F7F5;
  min-height: 520px;
}
.crm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 20px;
}
@media (max-width: 820px) { .crm-grid { grid-template-columns: 1fr; } }
.crm-left, .crm-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.crm-eyebrow {
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--crm-muted);
}
.crm-gap { margin-top: 10px; }

.crm-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.crm-cust {
  width: 100%; text-align: left;
  display: flex; flex-direction: column; gap: 1px;
  padding: 10px 12px;
  background: #fff; color: var(--crm-ink);
  border: 1px solid var(--crm-line); border-radius: 12px;
  font-family: inherit; cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.crm-cust:hover { border-color: var(--crm-ink); }
.crm-cust:active { transform: scale(0.98); }
.crm-cust.is-on { background: var(--crm-ink); color: #fff; border-color: var(--crm-ink); }
.crm-cust strong { font-size: 14px; font-weight: 500; }
.crm-cust small { font-size: 12px; opacity: 0.65; }
.crm-cust em { font-style: normal; font-size: 11px; margin-top: 2px; opacity: 0.8; }
.crm-cust:focus-visible, .crm-btn:focus-visible, .crm-type:focus-visible, .crm-chip:focus-visible,
.crm-input:focus-visible, .crm-text:focus-visible { outline: 2px solid var(--crm-ink); outline-offset: 2px; }

.crm-ask { display: flex; gap: 8px; }
.crm-input, .crm-text {
  flex: 1; min-width: 0; box-sizing: border-box;
  padding: 10px 12px;
  background: #fff; color: var(--crm-ink);
  border: 1px solid var(--crm-line); border-radius: 12px;
  font-family: inherit; font-size: 14px;
}
.crm-text { width: 100%; resize: vertical; line-height: 1.45; }
.crm-input:focus, .crm-text:focus { border-color: var(--crm-ink); outline: none; }
.crm-btn {
  padding: 10px 16px;
  background: var(--crm-ink); color: #fff;
  border: 0; border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 500; white-space: nowrap;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.crm-btn:hover { background: #000; }
.crm-btn:active { transform: scale(0.97); }
.crm-asks { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-chip {
  padding: 6px 10px;
  background: #F3F3F2; color: var(--crm-ink);
  border: 1px solid transparent; border-radius: 999px;
  font-family: inherit; font-size: 12px; cursor: pointer;
  transition: background 220ms ease;
}
.crm-chip:hover { background: #E8E6E0; }
.crm-answer {
  background: var(--crm-bg);
  border: 1px solid var(--crm-line);
  border-radius: 14px;
  padding: 12px 14px;
  animation: crm-rise 420ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.crm-answer p { margin: 0; }
.crm-answer-q { font-size: 12px; color: var(--crm-muted); }
.crm-answer-a { font-size: 14px; line-height: 1.5; margin-top: 4px !important; }
.crm-answer-src { font-size: 11px; color: var(--crm-muted); margin-top: 6px !important; }
@keyframes crm-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.crm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.crm-name { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.crm-contact { margin: 2px 0 0; font-size: 13px; color: var(--crm-muted); }
.crm-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.crm-tags span {
  padding: 4px 10px; background: #F3F3F2; border-radius: 999px; font-size: 12px;
}

.crm-block {
  background: var(--crm-bg);
  border: 1px solid var(--crm-line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.crm-reminder.is-set { background: #fff; border-color: var(--crm-ink); }
.crm-summary { margin: 0; font-size: 14px; line-height: 1.55; }
.crm-hint { margin: 0; font-size: 13px; color: var(--crm-muted); line-height: 1.5; }

.crm-log { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.crm-types { display: flex; gap: 6px; }
.crm-type {
  padding: 6px 14px;
  background: #F3F3F2; color: var(--crm-ink);
  border: 1px solid transparent; border-radius: 999px;
  font-family: inherit; font-size: 13px; cursor: pointer;
  transition: background 220ms ease, color 220ms ease;
}
.crm-type:hover { background: #E8E6E0; }
.crm-type.is-on { background: var(--crm-ink); color: #fff; }

.crm-timeline { margin: 0; padding: 0; list-style: none; max-height: 300px; overflow-y: auto; }
.crm-timeline li {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 10px 0; border-bottom: 1px solid var(--crm-line);
}
.crm-timeline li.is-fresh { animation: crm-rise 480ms cubic-bezier(0.23, 1, 0.32, 1) both; }
.crm-kind {
  font-family: var(--font-mono, monospace);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--crm-muted);
  padding-top: 3px;
}
.crm-tl-title { margin: 0; font-size: 14px; font-weight: 500; }
.crm-tl-note { margin: 2px 0 0; font-size: 13px; color: var(--crm-muted); line-height: 1.45; }
.crm-timeline time { font-size: 12px; color: var(--crm-muted); white-space: nowrap; padding-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  .crm-answer, .crm-timeline li.is-fresh { animation: none; }
}

/* ============================================================
   06 Knowledge Assistant widget
   Documents on the left (open any to read it), questions and
   cited answers on the right. Same black/white/grey system.
   ============================================================ */
.kba {
  --kba-ink: #141311;
  --kba-muted: #6E6B63;
  --kba-line: rgba(11, 11, 12, 0.1);
  --kba-bg: #F7F7F5;
  min-height: 460px;
}
.kba-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 20px;
}
@media (max-width: 820px) { .kba-grid { grid-template-columns: 1fr; } }
.kba-eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-mono, monospace);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--kba-muted);
}
.kba-docs { display: flex; flex-direction: column; gap: 8px; align-content: start; }
.kba-doc {
  background: #fff;
  border: 1px solid var(--kba-line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 260ms ease, background 260ms ease;
}
.kba-doc.is-open { background: var(--kba-bg); }
.kba-doc.is-flash { border-color: var(--kba-ink); animation: kba-flash 1.4s ease-out; }
@keyframes kba-flash { 0% { background: #E8E6E0; } 100% { background: var(--kba-bg); } }
.kba-doc-btn {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: transparent; color: var(--kba-ink); border: 0;
  font-family: inherit; font-size: 14px; font-weight: 500; text-align: left;
  cursor: pointer;
}
.kba-doc-btn i { font-style: normal; color: var(--kba-muted); font-size: 18px; line-height: 1; }
.kba-doc-btn:focus-visible, .kba-cite:focus-visible, .kba-send:focus-visible, .kba-input:focus-visible { outline: 2px solid var(--kba-ink); outline-offset: 2px; }
.kba-doc-body { margin: 0; padding: 0 14px 14px; font-size: 13px; line-height: 1.55; color: var(--kba-ink); }

.kba-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kba-thread {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 300px; max-height: 420px; overflow-y: auto;
  padding: 14px;
  background: var(--kba-bg);
  border: 1px solid var(--kba-line);
  border-radius: 16px;
}
.kba-hint { margin: auto; max-width: 380px; text-align: center; font-size: 13px; line-height: 1.55; color: var(--kba-muted); }
.kba-q {
  align-self: flex-end; max-width: 80%;
  background: var(--kba-ink); color: #fff;
  padding: 9px 14px; border-radius: 16px; border-top-right-radius: 6px;
  font-size: 14px; line-height: 1.45;
}
.kba-a {
  align-self: flex-start; max-width: 88%;
  background: #fff;
  border: 1px solid var(--kba-line);
  padding: 10px 14px; border-radius: 16px; border-top-left-radius: 6px;
  animation: kba-rise 420ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.kba-a p { margin: 0; font-size: 14px; line-height: 1.5; }
.kba-a.is-pending { color: var(--kba-muted); font-size: 14px; }
.kba-a.is-declined { background: transparent; border-style: dashed; }
@keyframes kba-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.kba-cites {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--kba-line);
  font-size: 12px; color: var(--kba-muted);
}
.kba-cite {
  padding: 3px 10px;
  background: #F3F3F2; color: var(--kba-ink);
  border: 1px solid var(--kba-line); border-radius: 999px;
  font-family: inherit; font-size: 12px; cursor: pointer;
  transition: background 220ms ease;
}
.kba-cite:hover { background: #E8E6E0; }

.kba-form { display: flex; gap: 8px; }
.kba-input {
  flex: 1; min-width: 0;
  padding: 11px 14px;
  background: #fff; color: var(--kba-ink);
  border: 1px solid var(--kba-line); border-radius: 12px;
  font-family: inherit; font-size: 14px;
}
.kba-input:focus { border-color: var(--kba-ink); outline: none; }
.kba-send {
  padding: 0 20px;
  background: var(--kba-ink); color: #fff; border: 0; border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1), opacity 220ms ease;
}
.kba-send:hover { background: #000; }
.kba-send:active { transform: scale(0.97); }
.kba-send:disabled { opacity: 0.45; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  .kba-a, .kba-doc.is-flash { animation: none; }
}
