/* GENERATED by Tools/DesignBundle from design/src - do not edit this file.
   Edit the modules, then run: dotnet run --project Tools/DesignBundle
   (docs/internal/conversation-platform/designer-css-plan.md section 2.4; the layer order is design/contract.json's) */

@layer cv.locked, cv.reset, cv.tokens, cv.base, cv.layout, cv.components, cv.skin, cv.device, cv.theme, cv.design, cv.code, cv.host, cv.params;

/* -- design/src/shared/locked.css -- */
@layer cv.locked {
/* THE LOCKED LAYER (layer cv.locked) - designer-css-plan section 5.2. DECLARED FIRST, ON PURPOSE.

   CSS reverses the layer order for !important declarations, so an !important rule in this first layer beats every
   !important a later layer can write - a design (cv.design), a launch code's design (cv.code), a host stylesheet (cv.host)
   or the embed's options (cv.params). That is how the screens that carry a person's consent, confirmation, payment and
   sign-in stay honest whatever a design does.

   WHAT IS PROTECTED (design/contract.json "protected"): every element that carries data-cv-protected - the parts each face
   lists as protected wherever they are drawn (the RCS emulator's verified note; the AI Concierge's secure button, its
   secure sheet and Powered by; the web runner's identity screen), and the screens and moments that are protected as a
   whole (the runner's run page on its confirm, sign-in and payment screens, the staff sign-in, a signature / payment /
   action moment). A design may dress them in COLOURS through the tokens; it may never hide, fake or shrink them.

   WHEN IT BITES: while a design is worn (html.cv-dressed - set by design/face.js once a design's sheet has loaded). Our own
   default look never wears a design, so this layer never moves a pixel of it (Tests/Design/NoVisualChangeTests).

   WHAT CSS HOLDS HERE: visible, opaque, untransformed, unfiltered, unclipped, unmasked and unblended - on the protected
   element itself, and the clipping, masking, filtering and blending on everything inside it (a design that clips a button
   of a confirm screen is held exactly as one that clips the screen). WHAT ONLY THE GUARD CAN HOLD: the 14 px type floor
   and the 4.5 : 1 contrast floor (section 5.3) - CSS has no "at least" for a size or a contrast it does not know, and
   pinning a value here would move our own type and colours - and coverage (nothing slides over a protected part). The
   runtime guard (design/face.js) compares every protected part with the design and without it, and strips a design that
   spoiled one. Tests/Design/ProtectedPartsAreLockedTests holds every rule below in place; mutation-tested.

   THE HOLD: while a design's sheet is on its way (at most 1.5 s - design/face.js) the face is a neutral skeleton - nothing
   of the default look flashes before the design lands. */

html.cv-dressed [data-cv-protected] {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  translate: none !important;
  rotate: none !important;
  scale: none !important;
  filter: none !important;
  clip-path: none !important;
  -webkit-mask: none !important;
  mask: none !important;
  mix-blend-mode: normal !important;
}

html.cv-dressed [data-cv-protected] * {
  filter: none !important;
  clip-path: none !important;
  -webkit-mask: none !important;
  mask: none !important;
  mix-blend-mode: normal !important;
}

html.cv-hold {
  background-color: #f2f2f3 !important;
}

html.cv-hold[data-cv-theme="dark"] {
  background-color: #1f1f22 !important;
}

html.cv-hold body {
  visibility: hidden !important;
}
}

/* -- design/src/shared/a11y.css -- */
@layer cv.locked {
/* THE ACCESSIBILITY FLOOR (layer cv.locked) - designer-css-plan sections 5.3 and 9 (P0.5).

   What no design may take away from a person, locked beside the protected screens. The !important here is deliberate:
   in this FIRST layer it beats every !important a later layer can write - a design (cv.design), a launch code's design
   (cv.code), a host stylesheet (cv.host), the embed's options (cv.params) and every unlayered sheet - so no design can
   bring any of it back. Every rule is scoped to a customer face ([data-cv-face] - the shells set it on <html>), and this
   module is only ever bundled into the faces' own sheets (design/bundles.json): the Portal never loads it.

   P0.5 - THE IPHONE ZOOM, FIXED AT THE CAUSE. NEVER BY LOCKING THE VIEWPORT: `maximum-scale` / `user-scalable=no` would
   take pinch-zoom from the people who need it (WCAG 1.4.4), and Safari ignores them anyway
   (Tests/Design/ViewportIsNeverLockedTests). What made a page jump on an iPhone - in the RCS emulator's web overlay above
   all - was Safari zooming into any focused field whose text is under 16 px, and staying zoomed; and a quick double tap on
   a chip zooming the page. So:

   1. On a touch screen ((pointer: coarse) - a phone or a tablet, the only devices whose browsers zoom into a focused
      field), every field a person types into or picks from is at least 16 px - the size Safari leaves alone. A design
      that wants its fields larger sets --cv-field-font-size (a shared token, 16px by default); it can never go under 16.
      A mouse-and-keyboard screen keeps the face's own sizes, so nothing moves on a desktop (the shots hold it).
      Tick boxes, radios, sliders and buttons are not fields here: their text is not typed, and some size by 1em.
   2. touch-action: manipulation on the face's ROOT only (<html>): no double-tap zoom and no tap delay, while pinch-zoom
      and panning still work. Touch-action is not inherited, but the browser intersects an element's touch-action with
      every ancestor's - so the root's value reaches every element below it, and an element that asks for less (the
      signature pad's touch-action: none, a list that pans one way) keeps what it asked for. Never set on every element:
      an !important there would override exactly those.
   3. text-size-adjust: 100% on the root, so iOS never inflates the text when the phone turns.

   Tests/Design/InputsAreSixteenOnPhonesTests holds 1-3 by target on a touch window (every field the runner's markup can
   draw, and every field on the design tour's screens, in every frame); the desktop shots of
   Tests/Design/NoVisualChangeTests hold that a mouse screen did not move.

   P1 adds the rest of the floor here: :focus-visible kept, prefers-reduced-motion honoured, the minimum sizes kept. */

html[data-cv-face] {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  touch-action: manipulation !important;
}

@media (pointer: coarse) {
  [data-cv-face] :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"],
                                  [type="button"], [type="submit"], [type="reset"], [type="image"], [type="hidden"]),
                        textarea, select) {
    font-size: max(16px, var(--cv-field-font-size, 16px)) !important;
  }
}
}

/* -- design/src/shared/reset.css -- */
@layer cv.reset {
/* THE SHARED RESET (layer cv.reset) - designer-css-plan section 2.4.

   The rules every customer face already carried, word for word: the RCS emulator (rcs.css) and the AI Concierge (bot.css)
   both open with exactly these three. A face that adopts the shared modules deletes its own copy and nothing on screen
   moves - the no-visual-change shots (Tests/Design/NoVisualChangeTests) prove it.

   What does NOT belong here: anything only one face does (the concierge's `margin: 0; padding: 0` on every element stays
   in the concierge's own modules), and anything that changes a picture. A rule earns its place in the shared reset only
   when every face already says it. */

* { box-sizing: border-box; }

/* State beats layout: a class that sets `display` would otherwise outrank the hidden ATTRIBUTE's own rule (the RCS sheet's
   backdrop once dimmed the whole page while "hidden"; the concierge's close button once showed on the full page). In this
   early layer the !important also outranks every later layer's !important - no design can show what the shell hid. */
[hidden] { display: none !important; }

html, body { height: 100%; }
}

/* -- design/src/shared/tokens.css -- */
@layer cv.tokens {
/* THE TOKENS (layer cv.tokens) - designer-css-plan section 2.3: ONE vocabulary, --cv-*, for every customer face.

   Three tiers, so a designer can work as broadly or as finely as they like:

   - REFERENCE - the raw brand: colours, type, radius, space, shadow, motion. From P1 the workspace theme fills these
     (--theme-primary -> --cv-color-brand, and so on).
   - SEMANTIC - what things ARE: a surface and the ink on it, the accent and the ink on it, the muted line, the danger,
     the focus ring, the two bubbles. Each reads a reference token, so changing the brand moves everything at once.
   - COMPONENT - one part's own knobs (--cv-chip-bg, --cv-card-radius ...). They live in each face's own token module,
     declared on the face's scope with today's value as the default; the contract (design/contract.json) lists every
     one, per face.

   The values below are the PLATFORM's neutral fallback - what a part would wear if a face named no value of its own. Each
   face's token module redeclares what it needs on its own scope with exactly the value it shows today, which is why
   adopting this file moves nothing.

   ONLY --cv-* IS PUBLIC. The RCS emulator's and the AI Concierge's pre-design-system variable names were retired in P0
   (Kirk, 2026-10-29 - greenfield: no customer stylesheet to keep, and ours were migrated in the same change); the rename
   table for anyone moving a page is RCS-Emulator-Embed.md "Moving from the old names". Components read only --cv-*, and
   whoever sets a look - a host stylesheet, the workspace's brand, the embed's style options, a design - sets --cv-* on the
   face's own scope (Tests/Design/NoLegacyDesignTokensTests holds the old names out of the repository). */

:root {
  /* ── reference ─────────────────────────────────────────────────────────────────────────────────────────────── */
  --cv-color-brand: #1a73e8;
  --cv-color-ink: #1f1f1f;
  --cv-color-paper: #ffffff;
  --cv-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cv-font-display: var(--cv-font-body);
  --cv-radius-s: 8px;
  --cv-radius-m: 12px;
  --cv-radius-l: 18px;
  --cv-space-1: 4px;
  --cv-space-2: 8px;
  --cv-space-3: 12px;
  --cv-space-4: 16px;
  --cv-space-5: 24px;
  --cv-space-6: 32px;
  --cv-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.08);
  --cv-shadow-2: 0 4px 14px rgba(0, 0, 0, 0.12);
  --cv-shadow-3: 0 18px 50px rgba(0, 0, 0, 0.16);
  --cv-motion-fast: 120ms;
  --cv-motion-slow: 240ms;

  /* ── semantic ──────────────────────────────────────────────────────────────────────────────────────────────── */
  --cv-surface: var(--cv-color-paper);
  --cv-on-surface: var(--cv-color-ink);
  --cv-accent: var(--cv-color-brand);
  --cv-on-accent: #ffffff;
  --cv-muted: color-mix(in srgb, var(--cv-color-ink) 62%, var(--cv-color-paper));
  --cv-danger: #c5221f;
  --cv-focus: var(--cv-color-brand);
  --cv-bubble-me-bg: var(--cv-accent);
  --cv-bubble-me-ink: var(--cv-on-accent);
  --cv-bubble-them-bg: var(--cv-surface);
  --cv-bubble-them-ink: var(--cv-on-surface);
  /* The text size of every field a person types into or picks from. The accessibility floor (a11y.css, cv.locked) never
     lets it under 16 px - Safari zooms into a smaller field - so a design may raise it, never lower it. */
  --cv-field-font-size: 16px;
}
}

/* -- design/src/shared/base.css -- */
@layer cv.base {
/* THE SHARED BASE (layer cv.base) - designer-css-plan section 2.4.

   The face root's own type and colour, once every face reads the tokens: the root ([data-cv-face]) wears --cv-font-body
   and --cv-on-surface, links and focus read --cv-accent / --cv-focus. It holds NO rules in P0 on purpose: today each face
   sets its own body type and colour, and a shared rule here could only move a picture. The face lanes move their base
   rules in here as they converge - each move proven by the no-visual-change shots. */
}

/* -- design/src/bot/tokens.css -- */
@layer cv.tokens {
/* THE AI CONCIERGE'S TOKENS (layer cv.tokens) - designer-css-plan section 2.3, for the concierge's own look.

   Every value below is exactly what the concierge showed before the design system - the warm stone of our default - so
   adopting the tokens moved nothing (Tests/Design/NoVisualChangeTests holds it, shot for shot). Read top to bottom:

   - REFERENCE - the concierge's brand facts: its stone accent, its ink and paper, its two typefaces (Inter for words,
     Cormorant Garamond for its names and captions), its bubble radius and its card shadow.
   - SEMANTIC - what things ARE (the shared vocabulary of design/src/shared/tokens.css), each filled from the reference.
   - COMPONENT - one part's own knobs, named after the part (data-cv-part) they dress: --cv-chip-bg dresses
     [data-cv-part="chip"], --cv-composer-line the composer's outline, --cv-send-size the send button.

   ONLY --cv-* IS PUBLIC. The concierge's pre-design-system names - and the shell's own --brand / --surface, which the
   first starter published - were retired in P0 (Kirk, 2026-10-29 - greenfield, no customer stylesheet to keep; the rename
   table is RCS-Emulator-Embed.md "Moving from the old names"). Whoever sets the look - a host stylesheet, the workspace's
   brand, the embed's style options, a design - sets these tokens on :root themselves.

   THE WORKSPACE'S COLOUR IS THE REFERENCE. The accent follows --cv-color-brand. On every page but the web embed (the page,
   /bot/run, the builder's preview) bot.js paints the workspace's accent as an inline
   --cv-color-brand on <html>; in the embed the brand block sets it under the style source "tenant". A design that wants
   another accent sets --cv-accent, which an inline brand colour never overrides.

   THE DARK THEME (the embed's style.theme "dark", or "auto" on a dark device - html[data-theme="dark"], with
   data-cv-theme="dark" beside it for a designer) redeclares the tokens it darkens. */

:root {
  /* ── reference ─────────────────────────────────────────────────────────────────────────────────────────────── */
  --cv-color-brand: #8a7d6b;
  --cv-color-ink: #262019;
  --cv-color-paper: #ffffff;
  --cv-font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --cv-font-display: "Cormorant Garamond", Georgia, serif;
  --cv-radius-l: 18px;
  --cv-shadow-3: 0 18px 50px rgba(38, 32, 25, 0.16);

  /* ── semantic ──────────────────────────────────────────────────────────────────────────────────────────────── */
  --cv-accent: var(--cv-color-brand);
  --cv-on-accent: #ffffff;
  --cv-surface: var(--cv-color-paper);
  --cv-on-surface: var(--cv-color-ink);
  --cv-muted: #6e675d; /* 2026-11-05: was #8c8478 - 3.3:1 on a bubble; small text needs 4.5:1 (4.9 on #f1f1f1, 5.6 on white) */
  --cv-focus: var(--cv-accent);
  --cv-bubble-me-bg: color-mix(in srgb, var(--cv-accent) 14%, var(--cv-surface));
  --cv-bubble-me-ink: var(--cv-on-surface);
  --cv-bubble-them-bg: #ffffff;
  --cv-bubble-them-ink: var(--cv-on-surface);

  /* ── component: the page and the card ──────────────────────────────────────────────────────────────────────── */
  --cv-page-bg: #f3efe9;
  --cv-panel-bg: #faf8f4;
  --cv-stage-padding: 24px;
  --cv-panel-width: 420px;
  --cv-panel-height: 680px;
  --cv-panel-radius: 22px;
  --cv-panel-shadow: var(--cv-shadow-3);

  /* ── component: the header ─────────────────────────────────────────────────────────────────────────────────── */
  --cv-header-bg: color-mix(in srgb, var(--cv-accent) 7%, var(--cv-panel-bg));
  --cv-header-line: color-mix(in srgb, var(--cv-accent) 14%, transparent);
  --cv-header-title-size: 20px;
  --cv-header-subtitle-size: 12px;
  --cv-avatar-bg: var(--cv-accent);
  --cv-avatar-ink: var(--cv-on-accent);
  --cv-step-line-ink: var(--cv-accent);
  --cv-icon-button-bg: color-mix(in srgb, var(--cv-on-surface) 7%, transparent);
  --cv-icon-button-hover-bg: color-mix(in srgb, var(--cv-on-surface) 13%, transparent);
  --cv-icon-button-ink: var(--cv-on-surface);
  --cv-progress-bg: var(--cv-accent);
  --cv-progress-height: 2px;
  --cv-language-line: rgba(0, 0, 0, .12);
  --cv-language-line-hover: rgba(0, 0, 0, .26);
  --cv-topics-button-ink: var(--cv-accent);
  --cv-topics-button-line: color-mix(in srgb, var(--cv-accent) 45%, transparent);
  --cv-topics-button-hover-bg: color-mix(in srgb, var(--cv-accent) 10%, transparent);

  /* ── component: the thread and its bubbles ─────────────────────────────────────────────────────────────────── */
  --cv-bubble-radius: var(--cv-radius-l);
  --cv-bubble-tail-radius: 6px;
  --cv-bubble-font-size: 14px;
  --cv-bubble-them-shadow: 0 2px 10px rgba(38, 32, 25, 0.07);
  --cv-link-ink: var(--cv-accent);
  --cv-font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --cv-document-bg: color-mix(in srgb, var(--cv-accent) 6%, var(--cv-panel-bg));
  --cv-document-rule: color-mix(in srgb, var(--cv-accent) 55%, transparent);
  --cv-player-bg: #000;
  --cv-typing-dot: color-mix(in srgb, var(--cv-on-surface) 30%, transparent);
  --cv-waiting-line-ink: color-mix(in srgb, var(--cv-on-surface) 78%, transparent);
  --cv-done-line-ink: var(--cv-muted);
  --cv-done-line-rule: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);

  /* ── component: chips and cards ────────────────────────────────────────────────────────────────────────────── */
  --cv-chip-bg: var(--cv-surface);
  --cv-chip-ink: var(--cv-on-surface);
  --cv-chip-border: color-mix(in srgb, var(--cv-accent) 45%, transparent);
  --cv-chip-hover-bg: color-mix(in srgb, var(--cv-accent) 10%, var(--cv-surface));
  --cv-chip-radius: 999px;
  --cv-chip-font-size: 13px;
  --cv-card-width: 118px;
  --cv-card-radius: 14px;
  --cv-card-picture-bg: color-mix(in srgb, var(--cv-accent) 6%, var(--cv-surface));
  --cv-zoom-bg: rgba(0, 0, 0, 0.45);
  --cv-zoom-hover-bg: rgba(0, 0, 0, 0.65);
  --cv-zoom-ink: #ffffff;
  --cv-topics-card-line: color-mix(in srgb, var(--cv-accent) 22%, transparent);
  --cv-capture-bg: var(--cv-accent);
  --cv-capture-ink: var(--cv-on-accent);
  --cv-asset-picker-shadow: 0 6px 18px rgba(38, 32, 25, 0.09);

  /* ── component: the composer and the foot ──────────────────────────────────────────────────────────────────── */
  --cv-composer-bg: var(--cv-surface);
  --cv-composer-ink: var(--cv-on-surface);
  --cv-composer-placeholder-ink: var(--cv-muted);
  --cv-composer-line: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-composer-focus-line: color-mix(in srgb, var(--cv-accent) 55%, transparent);
  --cv-composer-focus-ring: color-mix(in srgb, var(--cv-accent) 14%, transparent);
  --cv-composer-radius: 999px;
  --cv-composer-font-size: 14px;
  --cv-send-bg: var(--cv-accent);
  --cv-send-ink: var(--cv-on-accent);
  --cv-send-size: 36px;
  --cv-attach-ink: var(--cv-muted);
  --cv-attach-hover-ink: var(--cv-accent);
  --cv-powered-by-ink: var(--cv-muted);
  --cv-continue-on-phone-ink: var(--cv-accent);

  /* ── component: what opens over the conversation ───────────────────────────────────────────────────────────── */
  --cv-overlay-bg: rgba(38, 32, 25, 0.55);
  --cv-secure-button-bg: var(--cv-accent);
  --cv-secure-button-ink: #ffffff;
  --cv-secure-header-bg: var(--cv-accent);
  --cv-secure-header-ink: var(--cv-on-accent);
  --cv-secure-close-hover-bg: rgba(255, 255, 255, 0.18);
  --cv-lightbox-bg: rgba(20, 16, 12, 0.82);
  --cv-lightbox-ink: #ffffff;
  --cv-lightbox-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  --cv-sheet-backdrop: color-mix(in srgb, var(--cv-on-surface) 38%, transparent);
  --cv-sheet-bg: var(--cv-panel-bg);
  --cv-sheet-radius: 18px;
  --cv-phone-send-bg: var(--cv-accent);
  --cv-phone-send-ink: #ffffff;

  /* ── component: ask before the chat - the consent card (2026-11-05) ──────────────────────────────────────────────
     The card a conversation can show before it starts (consent-card), its words (consent-text), Accept (consent-accept),
     Decline (consent-decline) and the words left after a Decline (consent-declined). Each defaults to the token the card has
     always read - a reply's colours, the chips' Decline, the accent's Accept - so a design that dresses those dresses the
     card too, and one that sets these dresses the card alone. The card and its buttons are PROTECTED: these tokens colour,
     shape and space them; nothing may hide them. */
  --cv-consent-bg: var(--cv-bubble-them-bg);
  --cv-consent-ink: var(--cv-bubble-them-ink);
  --cv-consent-border: var(--cv-topics-card-line);
  --cv-consent-radius: var(--cv-radius-l);
  --cv-consent-shadow: var(--cv-bubble-them-shadow);
  --cv-consent-padding: 18px 18px 16px;
  --cv-consent-link-ink: var(--cv-link-ink);
  --cv-consent-button-radius: var(--cv-chip-radius);
  --cv-consent-accept-bg: var(--cv-accent);
  --cv-consent-accept-ink: var(--cv-on-accent);
  --cv-consent-decline-bg: var(--cv-chip-bg);
  --cv-consent-decline-ink: var(--cv-chip-ink);
  --cv-consent-decline-border: var(--cv-chip-border);
  --cv-consent-decline-hover-bg: var(--cv-chip-hover-bg);
  --cv-consent-declined-ink: var(--cv-muted);

  /* ── component: related conversations and the wide card's rail (2026-11-05) ─────────────────────────────────────
     The strip under the header (related-strip, each a related-bubble - the chips' look), the rows of the rail and of the
     Topics sheet's related section (related-row), the marks ahead of the rail's rows (a speech bubble, a ring, the check on
     a done topic, the "You're here" pill), and the rail itself down the left of a wide card (related-side). */
  --cv-related-strip-bg: var(--cv-header-bg);
  --cv-related-strip-ink: var(--cv-muted);
  --cv-related-strip-line: var(--cv-header-line);
  --cv-related-bubble-bg: var(--cv-chip-bg);
  --cv-related-bubble-ink: var(--cv-chip-ink);
  --cv-related-bubble-border: var(--cv-chip-border);
  --cv-related-bubble-radius: var(--cv-chip-radius);
  --cv-related-bubble-hover-bg: var(--cv-chip-hover-bg);
  --cv-related-row-ink: var(--cv-on-surface);
  --cv-related-row-hover-bg: color-mix(in srgb, var(--cv-accent) 8%, transparent);
  --cv-related-mark-bg: color-mix(in srgb, var(--cv-accent) 14%, transparent);
  --cv-related-mark-ink: color-mix(in srgb, var(--cv-accent) 55%, var(--cv-on-surface));
  --cv-related-check-bg: var(--cv-accent);
  --cv-related-check-ink: var(--cv-on-accent);
  --cv-related-here-bg: color-mix(in srgb, var(--cv-accent) 16%, transparent);
  --cv-related-here-ink: color-mix(in srgb, var(--cv-accent) 55%, var(--cv-on-surface));
  --cv-rail-bg: var(--cv-header-bg);
  --cv-rail-border: var(--cv-header-line);
  --cv-rail-width: 264px;
  --cv-rail-heading-ink: var(--cv-muted);

  /* ── component: the heard and saved cards (docs/claude/BOT-CONCIERGE.md section 0k) ─────────────────────────────── */
  --cv-heard-bg: color-mix(in srgb, var(--cv-accent) 7%, var(--cv-panel-bg));
  --cv-heard-line: color-mix(in srgb, var(--cv-accent) 30%, transparent);
  --cv-heard-ink: var(--cv-on-surface);
  --cv-heard-title-ink: var(--cv-accent);
  --cv-heard-radius: 14px;
  --cv-heard-pill-bg: color-mix(in srgb, var(--cv-accent) 13%, var(--cv-panel-bg));
  --cv-heard-pill-bg-2: color-mix(in srgb, var(--cv-accent) 20%, var(--cv-panel-bg));
  --cv-heard-pill-bg-3: color-mix(in srgb, var(--cv-accent) 27%, var(--cv-panel-bg));
  --cv-heard-pill-ink: var(--cv-on-surface);
  --cv-heard-label-ink: var(--cv-muted);
  --cv-saved-mark: #a8741a;
  --cv-saved-bg: color-mix(in srgb, var(--cv-saved-mark) 9%, var(--cv-panel-bg));
  --cv-saved-line: color-mix(in srgb, var(--cv-saved-mark) 42%, transparent);
  --cv-saved-ink: var(--cv-on-surface);
  --cv-saved-muted: var(--cv-muted);
}

/* THE DARK THEME - darker defaults for the tokens it darkens. */
html[data-theme="dark"] {
  --cv-color-ink: #f2ede6;
  --cv-color-paper: #28241e;
  --cv-shadow-3: 0 18px 50px rgba(0, 0, 0, 0.5);
  --cv-muted: #a99f92;
  --cv-bubble-them-bg: #2b2721;
  --cv-page-bg: #15120e;
  --cv-panel-bg: #1c1915;
  --cv-bubble-them-shadow: none;
  --cv-language-line: rgba(255, 255, 255, 0.18);
  --cv-language-line-hover: rgba(255, 255, 255, 0.18);
  --cv-heard-pill-bg: color-mix(in srgb, var(--cv-accent) 30%, var(--cv-panel-bg));
  --cv-heard-pill-bg-2: color-mix(in srgb, var(--cv-accent) 40%, var(--cv-panel-bg));
  --cv-heard-pill-bg-3: color-mix(in srgb, var(--cv-accent) 50%, var(--cv-panel-bg));
}
}

/* -- design/src/bot/page.css -- */
@layer cv.layout {
/* THE AI CONCIERGE - THE PAGE (layer cv.layout). The page around the conversation ([data-cv-part="stage"]) and the
   conversation's card ([data-cv-part="panel"]) - on its own page (/bot/{code}, data-cv-mode="page") a card floating on
   the page's colour, and on a phone the card owns the whole viewport. The embed makes the frame the chrome
   (embed.css).

   The concierge clears every element's margin and padding (the shared reset carries only the box model, which both faces
   share); every part below sets its own. */

* { margin: 0; padding: 0; }

/* THE INTERFACE DOES NOT MOVE (2026-11-17 - the mobile pass): a tap shows the part's own pressed state, never the phone's grey
   flash; and where the conversation owns the screen - its own page, the floating panel, the chat's overlay - the page never
   bounces or pulls to refresh (the thread is the one thing that scrolls, and keeps its scroll to itself - thread.css). An
   inline embed and the builder's preview are part of someone else's page: a scroll there still carries on into that page. */
html[data-cv-face="bot"] { -webkit-tap-highlight-color: transparent; }

html[data-cv-face="bot"]:is([data-cv-mode="page"], [data-cv-mode="panel"], [data-cv-mode="overlay"]) { overscroll-behavior: none; }

body {
  font-family: var(--cv-font-body);
  background: var(--cv-page-bg);
  color: var(--cv-on-surface);
  -webkit-font-smoothing: antialiased;
}

.stage {
  height: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--cv-stage-padding);
}

.panel {
  width: min(var(--cv-panel-width), 100%);
  height: min(var(--cv-panel-height), 100%);
  background: var(--cv-panel-bg);
  border-radius: var(--cv-panel-radius);
  box-shadow: var(--cv-panel-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* A PHONE: the panel owns the viewport - a narrow screen, and since 2026-11-17 a touch screen this short too (a phone turned
   sideways, where a floating card would leave a sliver above the keyboard). The same two conditions dress the phone's own
   edges in header.css, thread.css and composer.css. */
@media (max-width: 520px), (pointer: coarse) and (max-height: 520px) {
  .stage { padding: 0; }
  .panel { width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
  html.bot-keyboard .panel { height: 100%; }
}

/* THE PAGE ENDS ABOVE THE KEYBOARD (2026-11-17 - bot.js followTheKeyboard). While a phone's keyboard covers part of the
   screen, the stage is pinned to the part that is visible (--bot-viewport-height / --bot-viewport-top, the visual viewport):
   the header stays at the top, the composer sits on the keyboard, and only the thread scrolls. bot.js sets it on a page of
   its own only (never in a frame), and only while a keyboard is up - with none, nothing here applies. */
html.bot-keyboard,
html.bot-keyboard body { overflow: hidden; }

html.bot-keyboard .stage {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--bot-viewport-top, 0px);
  height: var(--bot-viewport-height, 100dvh);
}
}

/* -- design/src/bot/components/header.css -- */
@layer cv.components {
/* THE HEADER (layer cv.components) - [data-cv-part="header"]: the brand's picture or initial (brand-logo), the assistant's
   name and the brand's name (name, brand-name), the experience's "Step 2 of 3" (step-line), and the controls on the right -
   Topics (topics-button), the language picker (language), Start over (restart) and close (close) - over the thin progress
   rail (progress, progress-bar). */

.head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 15px;
  background: var(--cv-header-bg);
  border-bottom: 1px solid var(--cv-header-line);
}

/* A PHONE'S OWN EDGES (2026-11-17 - the mobile pass): on the full-screen page the header's colour runs under a status bar the
   page shares (a page added to the home screen) and clears the notch when the phone is turned. env() is 0 everywhere else. */
@media (max-width: 520px), (pointer: coarse) and (max-height: 520px) {
  .head {
    padding-top: calc(14px + env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

.head-id { display: flex; align-items: center; gap: 11px; min-width: 0; }

.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cv-avatar-bg);
  color: var(--cv-avatar-ink);
  font-family: var(--cv-font-display);
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.bot-name {
  font-family: var(--cv-font-display);
  font-size: var(--cv-header-title-size);
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-sub { font-size: var(--cv-header-subtitle-size); color: var(--cv-muted); margin-top: 1px; }

/* An experience that flows on its own (R33): "Step 2 of 3 - Delivery details" while this
   conversation is one part of an experience. */
.stage-line {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cv-step-line-ink);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-line[hidden] { display: none; }

.icon-btn {
  border: 0;
  background: var(--cv-icon-button-bg);
  color: var(--cv-icon-button-ink);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover { background: var(--cv-icon-button-hover-bg); }

/* THE CLOSE STAYS ON THE SKELETON (2026-11-05): while the first paint is held (html.cv-hold - bot.js "THE FIRST PAINT IS THE
   CONVERSATION'S") the page is hidden, but a floating panel's close is not - on a phone that panel covers the page, and the
   close is the only way out. Only the button itself is shown; the header around it stays hidden. */
html.cv-hold .head-actions [data-cv-part="close"]:not([hidden]) { visibility: visible; }

/* THE EXPAND BUTTON (expand-button, 2026-11-05) - beside the close of a floating panel, only while the window has room for the
   wide panel: arrows out to go wide, arrows in (aria-pressed="true") to come back. */
.expand-btn .expand-narrow { display: none; }
.expand-btn[aria-pressed="true"] .expand-wide { display: none; }
.expand-btn[aria-pressed="true"] .expand-narrow { display: block; }

.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: var(--cv-progress-height);
  background: transparent;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--cv-progress-bg);
  border-radius: 2px;
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* THE LANGUAGE SELECTOR - a quiet control beside Start-over, not a feature shouting
   for attention. Hidden entirely when the tenant has one language, so a single-language
   bot looks exactly as it did before. */
/* One row, and the refresh button stays RIGHTMOST. .head-actions had no rule of its
   own, so adding a second control let it wrap and the refresh dropped below. */
/* THE CLOSE NEVER LEAVES THE SCREEN (2026-11-05): on a phone the panel IS the screen - it covers the launcher - so the close
   is the only way out. When the row is too wide (a 320 px phone with Topics, the language picker, Call and More) the
   pickers and the name shrink; the icon buttons - close among them, and the close stays rightmost - never do. Flex only
   shrinks an overflowing row, so a header that fits looks exactly as it did. THE BRAND GIVES WAY FIRST (the follow-up,
   same day): with an equal weight the brand (a wide wordmark) and the row shrank together and the row went below what its
   buttons need - the close still ran off a 320 px screen. The brand takes a far larger share; only then do the pickers
   shorten. (Not clipped: an `overflow: hidden` here cut the starters' own drawing at every size.) */
.head > .head-id { flex-shrink: 100; }
.head-actions {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  gap: .25rem;
}
.head-actions .icon-btn { flex: 0 0 auto; }
.head-actions .lang-sel { flex: 0 0 auto; }
.head-actions .topics-btn { flex: 0 1 auto; min-width: 2.5rem; }

/* THE LANGUAGE PICKER IS A GLOBE (2026-11-05, Kirk: "Language should use an icon and drop down"): a globe and the caret in
   a small pill - the native drop-down still opens (the phone's own picker on a phone), the language's name is not drawn
   (the text is transparent) and rides the picker's hover title (bot.js titleLanguage) and its screen-reader value. */
.lang-sel {
  appearance: none;
  border: 1px solid var(--cv-language-line);
  border-radius: 999px;
  background: transparent;
  color: transparent;
  font: inherit;
  font-size: .78rem;
  width: 2.9rem;
  height: 30px;
  padding: 0;
  margin-right: .35rem;
  cursor: pointer;
  overflow: hidden;
  /* The globe and the caret in ONE drawing (the shell ships no icon font, and our modules' inline pictures only go down). */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24'%3E%3Cg fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9s-1.3 6.3-3.8 9M12 3c-2.5 2.7-3.8 5.7-3.8 9s1.3 6.3 3.8 9'/%3E%3C/g%3E%3Cpath fill='%23888' d='M28 9.5h10L33 15.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 1rem;
}
/* The drop-down's own list stays readable - only the closed picker hides its text. */
.lang-sel option { color: CanvasText; background-color: Canvas; }
.lang-sel:hover { border-color: var(--cv-language-line-hover); }
.lang-sel:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.lang-sel[hidden] { display: none; }

/* ── TOPICS (experiences on the thread, L4) ───────────────────────────────────────────
   The header's Topics button (beside the language picker), the quiet divider when a
   conversation of the experience ends, the topic card in the transcript (its taps stay
   live in the history) and the "Other topics" sheet. Every colour is the shell's own. */
.topics-btn {
  border: 1px solid var(--cv-topics-button-line);
  border-radius: 999px;
  background: transparent;
  color: var(--cv-topics-button-ink);
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .7rem;
  margin-right: .35rem;
  cursor: pointer;
  max-width: 7.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topics-btn:hover { background: var(--cv-topics-button-hover-bg); }
.topics-btn:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }

/* ── THE WORKSPACE'S CONTACT DETAILS (2026-10-30) ─────────────────────────────────────
   Call (contact-call) dials the workspace's number and More (contact-more) opens a small
   menu under the header at the right (bot.js openContactMenu) - call, email, the brand's
   links and its places with directions (contact-item). Both buttons are icon-btns, hidden
   unless the brand block's contact holds something for them; the menu wears the surface. */
.contact-call svg, .contact-more svg { display: block; }
.contact-more[aria-expanded="true"] { background: var(--cv-icon-button-hover-bg); }
.contact-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 12px;
  z-index: 30;
  min-width: 210px;
  max-width: calc(100% - 24px);
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 0;
  background: var(--cv-surface);
  color: var(--cv-on-surface);
  border: 1px solid var(--cv-header-line);
  border-radius: 14px;
  box-shadow: var(--cv-shadow-3);
  font-family: var(--cv-font-body);
}
.contact-item {
  display: block;
  padding: 9px 14px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.contact-item:hover, .contact-item:focus-visible { background: var(--cv-chip-hover-bg); outline: none; }
.contact-item-title { display: block; font-weight: 600; }
.contact-item-detail { display: block; margin-top: 2px; font-size: 12.5px; color: var(--cv-muted); }
.contact-item-go { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--cv-link-ink); }

/* "NOT YOU?" (the people directory - people-directory-design.md section 29; BOT-CONCIERGE.md 0i): when an answer greets a person
   (a brand's launch token named them, or a page's hint) a line under the names says who this chat takes the visitor to be -
   "Hi Dana" (person) - with the "Not you?" chip right beside it (not-you - PROTECTED: a design dresses it in colours, never hides
   it). Drawn only while someone is greeted (bot.js applyPerson); it wraps under the name on a narrow header. */
.person-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 3px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--cv-muted);
}

.person-hi { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.not-you {
  flex: 0 0 auto;
  padding: 1px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.not-you:hover { background: color-mix(in srgb, currentColor 14%, transparent); }

.not-you:disabled { opacity: 0.6; cursor: default; }

/* START OVER ASKS FIRST (2026-11-21 - bot.js askRestart): one line under the header, in the face's own words and chips - "Start
   over? This clears the conversation." with Keep going (the focus) and Start over. Never a browser dialog. */
.restart-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--cv-header-bg);
  border-bottom: 1px solid var(--cv-header-line);
}

.restart-ask-text {
  flex: 1 1 12rem;
  font-size: 13px;
  line-height: 1.35;
  color: var(--cv-on-surface);
}
}

/* -- design/src/bot/components/thread.css -- */
@layer cv.components {
/* THE THREAD (layer cv.components) - [data-cv-part="thread"], the conversation itself: each reply with the assistant's
   small picture (avatar) and its bubble (bubble-them), each of the visitor's words in theirs (bubble-me). A bubble also says
   what it holds - data-cv-turn="text", "media" or "document", the kinds the embed's turn event reports. */

.thread {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

/* The thread keeps its scroll to itself (2026-11-17) where the conversation owns the screen - its own page, the floating panel,
   the chat's overlay: its end never drags the page behind along with it. An inline embed and the builder's preview keep the
   browser's own carry-on (page.css). */
html:is([data-cv-mode="page"], [data-cv-mode="panel"], [data-cv-mode="overlay"]) .thread { overscroll-behavior: contain; }

/* A PHONE TURNED SIDEWAYS (2026-11-17): the conversation clears the notch and the rounded corners. env() is 0 everywhere
   else, so nothing else moves. */
@media (max-width: 520px), (pointer: coarse) and (max-height: 520px) {
  .thread {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

.row { display: flex; align-items: flex-end; gap: 8px; }

.row.me { justify-content: flex-end; }

.row-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cv-avatar-bg);
  color: var(--cv-avatar-ink);
  font-family: var(--cv-font-display);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 2px;
}

.row-avatar img { width: 100%; height: 100%; object-fit: cover; }

.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: var(--cv-bubble-radius);
  font-size: var(--cv-bubble-font-size);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  animation: pop 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.row:not(.me) .bubble {
  background: var(--cv-bubble-them-bg);
  border-bottom-left-radius: var(--cv-bubble-tail-radius);
  box-shadow: var(--cv-bubble-them-shadow);
  color: var(--cv-bubble-them-ink);
}

.row.me .bubble {
  background: var(--cv-bubble-me-bg);
  color: var(--cv-bubble-me-ink);
  border-bottom-right-radius: var(--cv-bubble-tail-radius);
}

.bubble a { color: var(--cv-link-ink); font-weight: 500; }

@keyframes pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* WAITING TO SEND (2026-11-21 - bot.js queueTyped): words the visitor typed while a turn was on its way, shown at once as their
   bubble, quiet (bubble-me, data-cv-state="pending") with a small line under it, until they go as the next turn. */
.row.me.queued { flex-wrap: wrap; justify-content: flex-end; }
.row.me.queued .bubble { opacity: 0.6; }
.queued-note {
  flex-basis: 100%;
  text-align: right;
  font-size: 11.5px;
  color: var(--cv-muted);
}
}

/* -- design/src/bot/components/chips.css -- */
@layer cv.components {
/* THE CHOICES (layer cv.components) - under a reply, the moment's options to tap ([data-cv-part="chips"], each a
   [data-cv-part="chip"]), its link (link), the options with a picture or a detail line (card, its picture card-picture,
   the corner zoom zoom) and, once the conversation is done, Start over (start-over). */

/* quick-reply chips - the current step's options, one tap = one answer */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 2px 0 4px 34px;
  animation: pop 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chip {
  border: 1px solid var(--cv-chip-border);
  background: var(--cv-chip-bg);
  color: var(--cv-chip-ink);
  font: inherit;
  font-size: var(--cv-chip-font-size);
  padding: 7px 13px;
  border-radius: var(--cv-chip-radius);
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.chip:hover {
  background: var(--cv-chip-hover-bg);
}

.chip:active { transform: scale(0.96); }

/* THE MOMENT'S LINK beside the chips (a Choice moment's ctaUrl): it reads as a link, never as one of the answers - the
   brand's ink, underlined, no fill. It opens a new tab and sends nothing. */
.chip.chip-link {
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  color: var(--cv-link-ink);
  background: transparent;
  border-style: dashed;
}

.chip.chip-link:hover {
  background: color-mix(in srgb, var(--cv-accent) 6%, transparent);
}

/* The "opens elsewhere" arrow beside a link's words and the secure finish's (bot.js outArrow - a drawing, never the "↗"
   character an iPhone draws as an emoji), in the part's own ink. */
.out-arrow { flex: 0 0 auto; margin-left: 0.3em; vertical-align: -0.08em; }

/* picture chips - options carrying an authored card image render as tappable
   cards: thumbnail + label; the corner zoom opens the lightbox without answering.
   The card is a DIV holding two SIBLING buttons (select area + zoom) so touch
   browsers hit-test them independently - a zoom nested inside the select button
   retargets the whole tap to "pick" on iOS/Android. */
.chips-cards { gap: 9px; }

.chip-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  width: var(--cv-card-width);
  border-radius: var(--cv-card-radius);
  overflow: hidden;
  text-align: center;
  cursor: default;
}

.chip-card-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.chip-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--cv-card-picture-bg);
}

.chip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chip-zoom {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  color: var(--cv-zoom-ink);
  background: var(--cv-zoom-bg);
  cursor: zoom-in;
}

.chip-zoom:hover { background: var(--cv-zoom-hover-bg); }

.chip-label {
  display: block;
  padding: 6px 8px 7px;
  font-size: 12px;
  line-height: 1.25;
}

/* EACH CARD ITS OWN BUTTON (2026-11-08) - a row's own words ("Clip", "Buy", "Get it") as a small tag at the foot of its card, so a
   mixed shelf says what each tap does. The whole card stays the one button; the tag is words, never a second target. */
.chip-card-action {
  display: inline-block;
  align-self: center;
  margin: 2px 8px 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cv-accent);
  border: 1px solid color-mix(in srgb, var(--cv-accent) 45%, transparent);
  background: color-mix(in srgb, var(--cv-accent) 8%, transparent);
}

.chip-card-action.chip-detail-action {
  align-self: flex-start;
  margin: 4px 0 0;
}

/* a picture card's subtitle - the row's authored detailField, under the label */
.chip-card-sub {
  display: block;
  padding: 0 8px 8px;
  margin-top: -4px;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.62;
}

/* text CARDS - a bundle list whose rows carry a detail line but no picture
   (a product catalogue with prices). Wider than a pill, two lines, left-aligned:
   twenty of these read as a list you can shop, where twenty long pills read as a
   wall. They stay a single button - nothing nested, nothing to mis-hit. */
.chips-detail { gap: 8px; }

.chip-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1 1 210px;
  max-width: 100%;
  padding: 8px 12px 9px;
  border-radius: 13px;
  text-align: left;
}

.chip-detail-label {
  display: block;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}

.chip-detail-sub {
  display: block;
  font-size: 11.5px;
  line-height: 1.2;
  opacity: 0.62;
}
}

/* -- design/src/bot/components/secure.css -- */
@layer cv.components {
/* THE SECURE FINISH (layer cv.components) - the button that opens a payment or a signature ([data-cv-part="secure-button"])
   and the panel it opens over the conversation (secure-sheet). The words in them come from the server; from P1 the locked
   layer keeps them readable whatever a design does. */

/* the secure finish CTA (the web flip) - payment / signature hand-off */
.flip-row {
  padding: 2px 0 4px 34px;
  animation: pop 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.flip-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 11px 22px;
  border-radius: 14px;
  background: var(--cv-secure-button-bg);
  color: var(--cv-secure-button-ink);
  text-decoration: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--cv-accent) 35%, transparent);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.flip-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--cv-accent) 45%, transparent);
}

.flip-cta:active { transform: scale(0.97); }

.flip-cta-main {
  font-size: 14px;
  font-weight: 600;
}

.flip-cta-sub {
  font-size: 11.5px;
  opacity: 0.85;
}

/* THE SECURE PANEL - payment / signature, in a dialog over the conversation.
   Never a second window: a new tab loses the chat, trips popup blockers, and
   resolves the run id against whatever session that browser already had. */
.flip-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--cv-overlay-bg);
  animation: pop 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.flip-modal-panel {
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  height: min(680px, 100%);
  overflow: hidden;
  border-radius: var(--cv-radius-l);
  background: var(--cv-panel-bg);
  box-shadow: var(--cv-shadow-3);
}

.flip-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px 12px 16px;
  background: var(--cv-secure-header-bg);
  color: var(--cv-secure-header-ink);
}

.flip-modal-title {
  font-size: 14px;
  font-weight: 600;
}

.flip-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.flip-modal-close:hover { background: var(--cv-secure-close-hover-bg); }

/* The runner paints its own background; border:0 keeps the seam invisible. */
.flip-modal-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: var(--cv-panel-bg);
}
}

/* -- design/src/bot/components/documents.css -- */
@layer cv.components {
/* THE DOCUMENTS (layer cv.components) - a receipt, a bill, a cart, posted word for word in a reply's bubble
   (bubble-them with data-cv-turn="document"). */

/* A DOCUMENT BUBBLE - a receipt, a bill, a cart table. Posted verbatim, so it has
   to READ like a printed thing next to the bot's conversational bubbles: the
   author's own line breaks and column spacing ARE the layout, and a proportional
   font is exactly what destroys them. */
.bubble.bubble-doc {
  white-space: pre-wrap;
  font-family: var(--cv-font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  background: var(--cv-document-bg);
  border-left: 3px solid var(--cv-document-rule);
}

/* A RICH DOCUMENT - the same document from its Markdown (docs/claude/MARKDOWN.md): the author's table is a real
   table and their lists are lists, so the proportional reading font returns and the monospace column trick is not
   needed. A plain paragraph sits with no extra margin, so a plain receipt line reads as it always did. */
.bubble.bubble-doc.bubble-doc-rich {
  white-space: normal;
  font-family: var(--cv-font-body);
  font-size: 14px;
  line-height: 1.5;
}

.bubble-doc-rich > :first-child { margin-top: 0; }
.bubble-doc-rich > :last-child { margin-bottom: 0; }
.bubble-doc-rich p { margin: 0 0 0.55em; }
.bubble-doc-rich ul,
.bubble-doc-rich ol { margin: 0 0 0.55em; padding-left: 1.3em; }
.bubble-doc-rich h3,
.bubble-doc-rich h4,
.bubble-doc-rich h5,
.bubble-doc-rich h6 { margin: 0.7em 0 0.3em; font-family: var(--cv-font-display); font-size: 1em; }
.bubble-doc-rich blockquote {
  margin: 0 0 0.55em;
  padding-left: 0.7em;
  border-left: 2px solid color-mix(in srgb, var(--cv-accent) 35%, transparent);
  color: var(--cv-muted);
}
.bubble-doc-rich code,
.bubble-doc-rich pre {
  font-family: var(--cv-font-mono);
  font-size: 12.5px;
}
.bubble-doc-rich pre { margin: 0 0 0.55em; white-space: pre-wrap; }
.bubble-doc-rich table { width: 100%; margin: 0.2em 0 0.55em; border-collapse: collapse; font-size: 13px; }
.bubble-doc-rich th,
.bubble-doc-rich td {
  padding: 4px 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  text-align: left;
  vertical-align: top;
}
.bubble-doc-rich th { font-weight: 600; }
.bubble-doc-rich hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--cv-on-surface) 14%, transparent); margin: 0.6em 0; }
.bubble-doc-rich .doc-img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
}

/* -- design/src/bot/components/heard.css -- */
@layer cv.components {
/* THE HEARD AND SAVED CARDS (layer cv.components) - docs/claude/BOT-CONCIERGE.md section 0k. What the visitor's own typed words
   landed, as a card above the reply (heard-card - its title, then a heard-pill per answer: the moment, then the value), and the
   receipt under it when an Action moment finished or the conversation was saved (saved-receipt). bot.js draws them from the reply's
   own lines - an opening ✦ line and its "Label: Value" lines, a ✓ line and the line under it - the very text a phone reads. */

.heard,
.saved {
  max-width: min(88%, 340px);
  border-radius: var(--cv-heard-radius);
  font-family: var(--cv-font-body);
}

.heard {
  padding: 10px 12px 12px;
  border: 1px solid var(--cv-heard-line);
  background: var(--cv-heard-bg);
  color: var(--cv-heard-ink);
  animation: cv-heard-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.heard-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 9px;
  color: var(--cv-heard-title-ink);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.heard-title::before {
  content: "\2726";
  font-size: 13px;
  line-height: 1;
}

.heard-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.heard-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--cv-heard-pill-bg);
  color: var(--cv-heard-pill-ink);
  font-size: 13px;
  line-height: 1.35;
  animation: cv-heard-pill-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--heard-i, 0) * 70ms + 120ms);
}

.heard-pill:nth-child(3n + 2) { background: var(--cv-heard-pill-bg-2); }
.heard-pill:nth-child(3n) { background: var(--cv-heard-pill-bg-3); }

.heard-label {
  color: var(--cv-heard-label-ink);
  font-size: 12px;
}

.heard-value {
  font-weight: 650;
}

.saved {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: start;
  padding: 10px 14px 11px;
  border: 1px solid var(--cv-saved-line);
  background: var(--cv-saved-bg);
  color: var(--cv-saved-ink);
  animation: cv-heard-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.saved-mark {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.6px solid var(--cv-saved-mark);
  border-radius: 50%;
  color: var(--cv-saved-mark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.saved-title {
  font-size: 13.5px;
  font-weight: 650;
}

.saved-line {
  grid-column: 2;
  color: var(--cv-saved-muted);
  font-size: 12.5px;
}

@keyframes cv-heard-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes cv-heard-pill-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .heard,
  .heard-pill,
  .saved { animation: none; }
}
}

/* -- design/src/bot/components/lightbox.css -- */
@layer cv.components {
/* THE LIGHTBOX (layer cv.components) - [data-cv-part="lightbox"], a picture enlarged over everything. */

/* the tap-to-enlarge lightbox - any click closes it */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  background: var(--cv-lightbox-bg);
  cursor: zoom-out;
  animation: pop 160ms ease;
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: var(--cv-lightbox-shadow);
}

.lightbox-cap {
  color: var(--cv-lightbox-ink);
  font-size: 13.5px;
  text-align: center;
  max-width: 90%;
}
}

/* -- design/src/bot/components/typing.css -- */
@layer cv.components {
/* THE TYPING DOTS (layer cv.components) - [data-cv-part="typing"], and the line under them while something is still being
   worked on (waiting-line). */

/* typing dots */
.typing {
  display: inline-flex;
  gap: 5px;
  padding: 14px 16px;
}

.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cv-typing-dot);
  animation: blink 1.2s infinite;
}

.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }

/* the slow-turn heartbeat note: dots stay on row 1, the note wraps below */
.typing.with-note { flex-wrap: wrap; align-items: center; max-width: 78%; }
.typing-note {
  flex-basis: 100%;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--cv-waiting-line-ink);
  animation: notein 0.4s ease;
}

@keyframes notein {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}

@keyframes blink {
  0%, 70%, 100% { opacity: 0.25; transform: translateY(0); }
  32% { opacity: 1; transform: translateY(-3px); }
}
}

/* -- design/src/bot/components/composer.css -- */
@layer cv.components {
/* THE COMPOSER AND THE FOOT (layer cv.components) - the foot of the card ([data-cv-part="footer"]): the line when the
   assistant is not available (error), the box the visitor types in (composer - attach, input, send), a quiet note in the
   thread (system-note) and "Powered by Listrak Converse" (powered-by). */

.composer-wrap { padding: 10px 14px 10px; }

.offline {
  text-align: center;
  font-size: 13px;
  color: var(--cv-muted);
  padding: 10px 0 12px;
}

.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cv-composer-bg);
  border: 1px solid var(--cv-composer-line);
  border-radius: var(--cv-composer-radius);
  padding: 6px 6px 6px 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer:focus-within {
  border-color: var(--cv-composer-focus-line);
  box-shadow: 0 0 0 3px var(--cv-composer-focus-ring);
}

.input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: var(--cv-composer-font-size);
  background: transparent;
  color: var(--cv-composer-ink);
  min-width: 0;
}

.input::placeholder { color: var(--cv-composer-placeholder-ink); }

/* The caret is the conversation's accent, never the browser's own. */
.input { caret-color: var(--cv-accent); }

.send {
  width: var(--cv-send-size);
  height: var(--cv-send-size);
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--cv-send-bg);
  color: var(--cv-send-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, opacity 120ms ease;
}

.attach {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cv-attach-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
}

.attach:hover { color: var(--cv-attach-hover-ink); }

.attach:disabled { opacity: 0.4; cursor: default; }

/* a quiet centered system note (upload placements, restarts) */
.sysnote {
  align-self: center;
  font-size: 11.5px;
  color: var(--cv-muted);
  padding: 2px 10px;
  text-align: center;
}

.send:disabled { opacity: 0.45; cursor: default; }

.send:not(:disabled):active { transform: scale(0.92); }

.badge {
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--cv-powered-by-ink);
  padding-top: 8px;
}

.badge-mark { font-weight: 600; }

/* A PHONE'S OWN EDGES (2026-11-17 - the mobile pass): on the full-screen page the foot clears the home indicator and, turned
   sideways, the notch. While the keyboard is up (html.bot-keyboard - bot.js) the composer sits right on it: there is no home
   indicator under a keyboard. env() is 0 everywhere else (a computer, inside a frame), so nothing else moves. */
@media (max-width: 520px), (pointer: coarse) and (max-height: 520px) {
  .composer-wrap {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  html.bot-keyboard .composer-wrap { padding-bottom: 10px; }
}
}

/* -- design/src/bot/components/media.css -- */
@layer cv.components {
/* THE AUTHOR'S MEDIA (layer cv.components) - a picture, a video, a sound or a file in a reply's bubble (bubble-them with
   data-cv-turn="media"): the picture (picture), the player (player), the caption (caption) and a file as a card (document). */

/* ---- step media: the author's own attachments ---------------------------
   A menu PDF, this week's hero shot, a short video. These are the pieces of
   the brand the visitor actually came for, so they are presented as objects
   worth having rather than as links: full-bleed imagery inside the bubble's
   own radius, a serif caption in the brand voice, and documents as a card
   with a monogram tile and two unmistakable actions.
   Everything below rides the existing tokens - no new colours. */

.bubble.bubble-media {
  padding: 6px;
  background: var(--cv-bubble-them-bg);
  overflow: hidden;
}

.media-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--cv-radius-l) - 8px);
  cursor: zoom-in;
  /* The image carries its own weight; the inset keeps it from looking pasted
     onto the bubble on a light background. */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cv-on-surface) 8%, transparent);
}

.media-player {
  display: block;
  width: 100%;
  border-radius: calc(var(--cv-radius-l) - 8px);
  background: var(--cv-player-bg);
}

.media-cap {
  font-family: var(--cv-font-display);
  font-size: 15px;
  line-height: 1.35;
  color: var(--cv-muted);
  padding: 9px 10px 5px;
  letter-spacing: 0.01em;
}

.media-file {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 11px 12px 12px;
}

.media-file-tile {
  flex: 0 0 auto;
  width: 46px;
  height: 58px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cv-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--cv-on-accent);
  background: var(--cv-accent);
  /* the folded-corner hint - a document, read at a glance */
  clip-path: polygon(0 0, 72% 0, 100% 20%, 100% 100%, 0 100%);
}

.media-file-col { min-width: 0; flex: 1 1 auto; }

.media-file-name {
  font-family: var(--cv-font-display);
  font-size: 18px;
  line-height: 1.25;
  color: var(--cv-on-surface);
  word-break: break-word;
}

.media-file-sub {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--cv-muted);
  margin-top: 3px;
}

.media-file-acts { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }

.bubble .media-act {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--cv-on-surface);
  border: 1px solid color-mix(in srgb, var(--cv-on-surface) 16%, transparent);
  background: transparent;
  transition: background 120ms ease, border-color 120ms ease;
}

.bubble .media-act:hover { background: color-mix(in srgb, var(--cv-on-surface) 6%, transparent); }

.bubble .media-act-primary {
  color: var(--cv-on-accent);
  background: var(--cv-accent);
  border-color: var(--cv-accent);
}

.bubble .media-act-primary:hover {
  background: color-mix(in srgb, var(--cv-accent) 88%, #000);
  border-color: color-mix(in srgb, var(--cv-accent) 88%, #000);
}

/* THE SPECIFICITY NOTE, because this shipped invisible once: `.bubble a` (0-1-1)
   sets every in-bubble link to the brand colour, so a bare `.media-act-primary`
   (0-1-0) lost and the Read button rendered brand-on-brand - a solid pill with no
   readable text. The rules above are scoped under `.bubble` to outrank it. Any new
   in-bubble action needs the same scoping. */

.media-cap-sub {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--cv-muted);
  padding: 0 10px 8px;
}

/* ---- a contact card (2026-11-05) -----------------------------------------
   The business's card a moment shows: the moment's words over it, a monogram
   tile, the name in the brand serif, each phone / email / website as a link,
   and Add to contacts - a .vcf the phone or Outlook opens. It wears the
   document part, so a design that dresses documents dresses this card too. */

.media-contact { padding: 11px 12px 12px; }

.media-contact-lead {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cv-on-surface);
  margin-bottom: 4px;
}

.media-contact-about {
  font-size: 13px;
  line-height: 1.45;
  color: var(--cv-muted);
  margin-bottom: 8px;
}

.media-contact-who { display: flex; gap: 13px; align-items: center; margin-top: 6px; }

.media-file-tile.media-contact-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  clip-path: none;
  font-size: 18px;
  letter-spacing: 0;
}

.media-contact-lines { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }

.bubble .media-contact-line {
  font-size: 13px;
  line-height: 1.45;
  color: var(--cv-on-surface);
  word-break: break-word;
}

/* A link is a touch target: at least 24 px tall (WCAG 2.5.8), however short its words. */
.bubble a.media-contact-line {
  display: flex;
  align-items: center;
  min-height: 24px;
  color: var(--cv-accent);
  text-decoration: none;
}

.bubble a.media-contact-line:hover { text-decoration: underline; }
}

/* -- design/src/bot/components/topics.css -- */
@layer cv.components {
/* TOPICS (layer cv.components) - the line across the thread when one conversation of an experience is done
   ([data-cv-part="done-line"] - "Delivery details - done"), the topics card in the thread (topics-card) and the sheet of other
   topics (topics-sheet, each a topics-row). The hand-off's "Up next" is said in the reply itself (handoff-line is reserved). */

.topic-divider {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--cv-done-line-ink);
  margin: 4px 0;
}
.topic-divider::before,
.topic-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--cv-done-line-rule);
}

.topic-card {
  margin-left: 34px;
  padding: 10px 12px 12px;
  border-radius: var(--cv-radius-l);
  background: var(--cv-bubble-them-bg);
  border: 1px solid var(--cv-topics-card-line);
  animation: pop 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.topic-card-title { font-size: 13.5px; font-weight: 600; color: var(--cv-on-surface); }
.topic-card-intro { font-size: 12.5px; color: var(--cv-muted); margin: 2px 0 8px; line-height: 1.35; }
.topic-card-chips { padding: 0; }
.topic-card .chip.topic-here { border-color: var(--cv-accent); }

.topic-sheet {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--cv-sheet-backdrop);
  animation: pop 160ms ease;
}
.topic-sheet-panel {
  width: min(420px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  background: var(--cv-sheet-bg);
  border-radius: var(--cv-sheet-radius) var(--cv-sheet-radius) 0 0;
  padding: 14px 14px 18px;
  box-shadow: var(--cv-shadow-3);
}
.topic-sheet-title { font-size: 14px; font-weight: 600; color: var(--cv-on-surface); margin: 0 4px 10px; }
.topic-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cv-on-surface);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  padding: 10px 10px;
  cursor: pointer;
}
.topic-row:hover:not(:disabled) { background: color-mix(in srgb, var(--cv-accent) 8%, transparent); }
.topic-row:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 1px; }
.topic-row:disabled { cursor: default; }
.topic-row-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.topic-row-side { font-size: 12px; color: var(--cv-accent); white-space: nowrap; }

.topic-row:disabled .topic-row-side { color: var(--cv-muted); }
.topic-row.topic-done .topic-row-name { color: var(--cv-muted); }
}

/* -- design/src/bot/components/related.css -- */
@layer cv.components {
/* RELATED CONVERSATIONS, THE WIDE DESKTOP AND ASK BEFORE THE CHAT (layer cv.components) - filled by the AI Concierge face: the
   strip of related conversations under the header, their rows in the Topics sheet, the wide card's measure and its rail, and
   the consent card shown before the conversation starts.

   Nothing here draws unless the start or resume answer carries a related list, the card is wide, or the start asks first: every
   rule below dresses an element bot.js creates only then (or a class it adds only then), so a conversation without them - on a
   card narrower than 880 px - looks exactly as before.
   Every colour, corner and the rail's width read the design tokens of their own (tokens.css - --cv-consent-*, --cv-related-*,
   --cv-rail-*), and each of those defaults to the token this module read before them - the chips' for the bubbles, the header's
   for the strip and the rail, a reply's for the card - so a design that dresses the chips, the header or a reply dresses these
   too, and one that names the new tokens dresses these alone (the Design Center's recipes: Design-Cookbook.md). */

/* ── THE STRIP - [data-cv-part="related-strip"], each conversation a [data-cv-part="related-bubble"] ─────────────────────── */
.related-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 16px;
  scrollbar-width: none;
  background: var(--cv-related-strip-bg);
  border-bottom: 1px solid var(--cv-related-strip-line);
}
.related-strip::-webkit-scrollbar { display: none; }

/* The title is a snap point of its own (start), so the strip's very start - the title in full - is where it rests: with only
   the bubbles to snap to, a strip that barely overflows snapped to its far end on load (each bubble's start clamped to the
   end of the scroll), and the title opened cut ("More fitment help" read "help"). The bubbles still snap when a person
   scrolls. */
.related-strip-title {
  flex: 0 0 auto;
  scroll-snap-align: start;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cv-related-strip-ink);
  white-space: nowrap;
}

.related-bubble {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid var(--cv-related-bubble-border);
  background: var(--cv-related-bubble-bg);
  color: var(--cv-related-bubble-ink);
  font: inherit;
  font-size: var(--cv-chip-font-size);
  padding: 6px 12px;
  border-radius: var(--cv-related-bubble-radius);
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.related-bubble:hover { background: var(--cv-related-bubble-hover-bg); }
.related-bubble:active { transform: scale(0.96); }
.related-bubble:focus-visible { outline: 2px solid var(--cv-focus); outline-offset: 2px; }

/* THE STRIP FOR A MOUSE (2026-11-06): the strip sits in related-strip-wrap, which holds two arrows (related-strip-nav) and two
   edge fades that say there is more. A mouse drags the strip (pannable - no text selection while it does), and the arrows show
   while the pointer is over the strip (or a bubble has the focus), each only where there is more to see (show-nav, can-left /
   can-right - bot.js stripForAMouse). Touch is never given arrows. The arrows wear the bubbles' own tokens. */
.related-strip-wrap { position: relative; flex: 0 0 auto; min-width: 0; }
.related-strip-wrap::before,
.related-strip-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 1px; width: 28px;
  pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 1;
}
.related-strip-wrap::before { left: 0; background: linear-gradient(90deg, var(--cv-related-strip-bg), transparent); }
.related-strip-wrap::after { right: 0; background: linear-gradient(270deg, var(--cv-related-strip-bg), transparent); }
.related-strip-wrap.can-left::before,
.related-strip-wrap.can-right::after { opacity: 1; }
.related-strip-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 26px; height: 26px; padding: 0; border-radius: 50%;
  border: 1px solid var(--cv-related-bubble-border);
  background: var(--cv-related-bubble-bg);
  color: var(--cv-related-bubble-ink);
  box-shadow: var(--cv-shadow-1);
  font: inherit; font-size: 16px; line-height: 1;
  display: none; place-items: center; cursor: pointer;
  transition: opacity 0.2s, background 120ms ease;
}
.related-strip-nav.prev { left: 6px; }
.related-strip-nav.next { right: 6px; }
.related-strip-nav:hover { background: var(--cv-related-bubble-hover-bg); }
.related-strip-nav:active { transform: translateY(-50%) scale(0.94); }
.related-strip-nav[disabled] { opacity: 0; pointer-events: none; }
.related-strip-wrap.show-nav:hover .related-strip-nav,
.related-strip-wrap.show-nav:focus-within .related-strip-nav { display: grid; }
.related-strip.pannable { cursor: grab; user-select: none; -webkit-user-select: none; }
.related-strip.pannable.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }

/* ── IN THE TOPICS SHEET - the related title as a section under the experience's topics, each a related-row ─────────────── */
.related-sheet-title { margin-top: 14px; }
.topic-row.related-row { justify-content: flex-start; color: var(--cv-related-row-ink); }
.topic-row.related-row:hover:not(:disabled) { background: var(--cv-related-row-hover-bg); }

/* ── THE WIDE DESKTOP (2026-11-05 - Kirk: "let our desktop be sexy") ─────────────────────────────────────────────────────────
   A card that is wide (bot.js RELATED_WIDE_PX - a wide floating panel, a wide inline box, the full page's wide card) gives the
   thread and the composer a readable measure in its middle (.wide-on). With something to list it brings out THE RAIL
   (.related-side-on): a column down the left - New conversation, the visit's topics, the related conversations - with the
   header's brand standing over it, so the brand, the rail and its lists read as one column and the conversation as the page
   beside it. Built from the card's own pieces and tokens only: the header's colours for the rail, the chips' for New
   conversation, the accent for the marks - so a design the brand already wears dresses it with no new work. */
.panel.wide-on > .thread {
  padding-left: max(24px, calc((100% - 720px) / 2));
  padding-right: max(24px, calc((100% - 720px) / 2));
}
.panel.wide-on > .composer-wrap {
  padding-left: max(24px, calc((100% - 720px) / 2));
  padding-right: max(24px, calc((100% - 720px) / 2));
}

/* The grid while the rail shows: the header across the top (its brand over the rail), the rail down the left, the thread and
   the foot on the right. */
.panel.related-side-on {
  display: grid;
  grid-template-columns: var(--cv-rail-width) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.panel.related-side-on > .head { grid-column: 1 / -1; grid-row: 1; }
.panel.related-side-on > .related-side { grid-column: 1; grid-row: 2 / span 2; }
.panel.related-side-on > .thread { grid-column: 2; grid-row: 2; }
.panel.related-side-on > .composer-wrap { grid-column: 2; grid-row: 3; }
.panel.related-side-on > .thread,
.panel.related-side-on > .composer-wrap { padding-left: max(28px, calc((100% - 720px) / 2)); padding-right: max(28px, calc((100% - 720px) / 2)); }

/* The header's brand stands over the rail: its first column is the rail's width, the rail's line runs on up beside it, and the
   controls sit over the conversation, at its right edge. Start over moves into the rail (New conversation). */
.panel.related-side-on > .head {
  display: grid;
  grid-template-columns: var(--cv-rail-width) minmax(0, 1fr);
  padding: 0;
  gap: 0;
}
.panel.related-side-on > .head > .head-id {
  align-self: stretch;
  padding: 14px 18px 15px;
  border-right: 1px solid var(--cv-rail-border);
}
.panel.related-side-on > .head > .head-actions {
  justify-self: end;
  padding: 0 16px;
}
.panel.related-side-on > .head [data-cv-part="restart"] { display: none; }

.related-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 12px 18px;
  background: var(--cv-rail-bg);
  border-right: 1px solid var(--cv-rail-border);
  scrollbar-width: thin;
}
/* The rail slides in when it appears (related-side-in) - never again when it is redrawn under the visitor (a topic done). */
.related-side.related-side-in { animation: rail-in 220ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes rail-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

/* New conversation - the rail's first row, in the chips' own look. */
.related-side-new {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 12px 9px 9px;
  border: 1px solid var(--cv-chip-border);
  border-radius: 14px;
  background: var(--cv-chip-bg);
  color: var(--cv-chip-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}
.related-side-new:hover { background: var(--cv-chip-hover-bg); box-shadow: var(--cv-shadow-1); }
.related-side-new:active { transform: scale(0.985); }
.related-side-new:focus-visible { outline: 2px solid var(--cv-focus); outline-offset: 2px; }

.related-side-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cv-rail-heading-ink);
  margin: 16px 10px 6px;
}
.related-side-title:first-child { margin-top: 2px; }

.related-side .related-row,
.related-side .related-side-topic {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cv-related-row-ink);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.3;
  text-align: left;
  padding: 7px 10px 7px 7px;
  cursor: pointer;
  transition: background 140ms ease;
}
.related-side .related-row:hover,
.related-side .related-side-topic:hover:not(:disabled) { background: var(--cv-related-row-hover-bg); }
.related-side .related-row:focus-visible,
.related-side .related-side-topic:focus-visible { outline: 2px solid var(--cv-focus); outline-offset: 1px; }
.related-side .related-side-topic:disabled { cursor: default; }
.related-row-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.related-side .topic-row-name { flex: 1 1 auto; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }

/* THE MARKS - a small square of the accent's tint ahead of each row: a speech bubble for a related conversation, a check on a
   done topic, a ring on one to start, a filled dot on the one you are in, a plus on New conversation. */
.related-side-mark {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cv-related-mark-bg);
  /* The accent drawn toward the ink - deeper on a light card, lighter on a dark one - so the mark reads in both themes (a dark
     brand accent on the dark card at 70% read at about 3.7 to 1; at 55% it is past 5) - --cv-related-mark-ink's default. */
  color: var(--cv-related-mark-ink);
}
.related-side-mark svg { display: block; }
.related-side-mark-new { background: var(--cv-accent); color: var(--cv-on-accent); border-radius: 9px; }
.related-side-mark-done { background: var(--cv-related-check-bg); color: var(--cv-related-check-ink); border-radius: 50%; }
.related-side-mark-here,
.related-side-mark-ready,
.related-side-mark-started { background: transparent; }
.related-side-mark-here::before,
.related-side-mark-ready::before,
.related-side-mark-started::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--cv-accent);
}
.related-side-mark-here::before { background: var(--cv-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cv-accent) 22%, transparent); }
/* A topic still to do that is locked for now (finish this one first) is quieter; a done one and the one you are in never are. */
.related-side-topic.topic-ready:disabled .related-side-mark,
.related-side-topic.topic-started:disabled .related-side-mark { opacity: 0.55; }

/* The topic's own word - Done, Start, Continue - quietly at its right; "You're here" as a small pill in the accent. */
.related-side-detail {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--cv-muted);
  white-space: nowrap;
}
.related-side-topic.topic-here { background: color-mix(in srgb, var(--cv-accent) 6%, transparent); }
.related-side-topic.topic-here .topic-row-name { color: var(--cv-related-row-ink); font-weight: 600; }
.related-side-topic.topic-here .related-side-detail {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cv-related-here-bg);
  /* Small text needs 4.5 to 1 in both themes - the accent drawn toward the ink as the marks are (--cv-related-here-ink). */
  color: var(--cv-related-here-ink);
  font-weight: 600;
}
.related-side-topic.topic-done .topic-row-name { color: var(--cv-muted); }

/* THE WIDE PAGE: on the concierge's own page, a conversation with a side list lets its card grow wide enough to hold the list
   beside the thread (the side list itself shows only once the card is wide - bot.js RELATED_WIDE_PX). */
@media (min-width: 1000px) {
  .panel.panel-wide { width: min(960px, 100%); }
}

/* A visitor who asked for less motion: the rail simply appears. */
@media (prefers-reduced-motion: reduce) {
  .related-side.related-side-in { animation: none; }
  .related-side-new,
  .related-side .related-row,
  .related-side .related-side-topic { transition: none; }
}

/* ── ASK BEFORE THE CHAT - [data-cv-part="consent-card"]: the words (consent-text), Accept (consent-accept), Decline
   (consent-decline); once declined, the declined words (consent-declined). Centred in the thread (a column), or at its top in
   an inline embed sized to its content (.consent-inline). ───────────────────────────────────────────────────────────────── */
.consent-card {
  margin: auto 4px;
  padding: var(--cv-consent-padding);
  border-radius: var(--cv-consent-radius);
  background: var(--cv-consent-bg);
  color: var(--cv-consent-ink);
  border: 1px solid var(--cv-consent-border);
  box-shadow: var(--cv-consent-shadow);
  animation: pop 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.consent-text {
  font-size: var(--cv-bubble-font-size);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.consent-text p + p { margin-top: 10px; }
.consent-text strong { font-weight: 600; }
.consent-text a { color: var(--cv-consent-link-ink); font-weight: 500; }

/* EQUAL WEIGHT (2026-11-06 - a regulated brand expects the two choices to carry the same weight): Accept and Decline share the
   row in two columns of the same width, side by side, with the same type and the same box - Accept filled, Decline outlined,
   each with a 1px border (Accept's transparent, its fill under it) so a stacked pair is the same height too - and on a card
   too narrow for two columns of 8rem they stack, each the card's full width. A word too long for its column (German's
   "Datenschutzeinstellungen") wraps inside its button rather than spilling past it, so the columns stay equal whatever the
   words. */
.consent-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: 8px;
  margin-top: 16px;
}

.consent-accept,
.consent-decline {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--cv-consent-button-radius);
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.consent-accept {
  border: 1px solid transparent;
  background: var(--cv-consent-accept-bg);
  color: var(--cv-consent-accept-ink);
}
.consent-accept:hover { background: color-mix(in srgb, var(--cv-consent-accept-bg) 88%, var(--cv-on-surface)); }
.consent-decline {
  border: 1px solid var(--cv-consent-decline-border);
  background: var(--cv-consent-decline-bg);
  color: var(--cv-consent-decline-ink);
}
.consent-decline:hover { background: var(--cv-consent-decline-hover-bg); }
.consent-accept:active,
.consent-decline:active { transform: scale(0.97); }
.consent-accept:focus-visible,
.consent-decline:focus-visible { outline: 2px solid var(--cv-focus); outline-offset: 2px; }

.consent-declined {
  margin: auto 12px;
  text-align: center;
  font-size: var(--cv-bubble-font-size);
  line-height: 1.5;
  color: var(--cv-consent-declined-ink);
}
.consent-declined p + p { margin-top: 8px; }

.consent-card.consent-inline,
.consent-declined.consent-inline { margin-top: 0; margin-bottom: 0; }

/* On the wide card the card keeps a letter's width in the middle of the conversation's measure. */
.panel.wide-on .consent-card,
.panel.wide-on .consent-declined { max-width: 560px; margin-left: auto; margin-right: auto; }
}

/* -- design/src/bot/components/phone.css -- */
@layer cv.components {
/* CONTINUE ON YOUR PHONE (layer cv.components) - the link under the composer ([data-cv-part="continue-on-phone"]) and
   the sheet it opens (phone-sheet). */

/* ── CONTINUE ON YOUR PHONE (the continuity pass, phase 2) ────────────────────────────────
   A quiet link under the composer while the conversation may move to the person's phone, and
   the sheet with the ready-made message (the pass already typed) - the topic sheet's frame. On
   a wide screen the QR and the pass in large type, to scan or text by hand. Every word comes
   from the server, in the visitor's language. */
.continue-phone {
  display: block;
  margin: 6px auto 0;
  border: 0;
  background: transparent;
  color: var(--cv-continue-on-phone-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 2px 6px;
}
.continue-phone[hidden] { display: none; }
.continue-phone:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }
.phone-body { font-size: 13px; color: var(--cv-on-surface); margin: 0 4px 12px; line-height: 1.4; }
.phone-sends { display: flex; flex-direction: column; gap: 8px; margin: 0 4px 12px; }
.phone-send {
  display: block;
  text-align: center;
  border-radius: 999px;
  background: var(--cv-phone-send-bg);
  color: var(--cv-phone-send-ink);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  text-decoration: none;
}
.phone-send:focus-visible { outline: 2px solid var(--cv-on-surface); outline-offset: 2px; }
.phone-desk { display: none; text-align: center; margin: 0 4px 12px; }
.phone-desk img { width: 168px; height: 168px; }
.phone-code { font-size: 22px; font-weight: 700; letter-spacing: .08em; color: var(--cv-on-surface); margin: 6px 0 0; }
.phone-fine { font-size: 12px; color: var(--cv-muted); margin: 0 4px 8px; line-height: 1.35; }
.phone-back {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--cv-muted);
  font: inherit;
  font-size: 13px;
  padding: 8px;
  cursor: pointer;
}
@media (min-width: 720px) {
  .phone-desk { display: block; }
}

/* ON A COMPUTER (2026-11-04 - the DEVICE decides, never the frame's width: bot.js's deviceIsDesktop over
   "(hover: hover) and (pointer: fine)", Workflow.Runner/Models/ContinuityLayout). The QR first and big, the pass in large
   type under it, a rule, "Can't scan? ...", a Mac's one quiet "Send it in Messages", and "Stay on this computer". */
.phone-sheet-desk .phone-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.phone-close {
  border: 0;
  background: transparent;
  color: var(--cv-muted);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
}
.phone-close:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }
.phone-sheet-desk .phone-body { text-align: center; }
.phone-sheet-desk .phone-desk { display: block; }
.phone-sheet-desk .phone-desk img { width: 208px; height: 208px; }
.phone-sheet-desk .phone-fine { text-align: center; }
.phone-wait { font-size: 13px; font-weight: 600; text-align: center; color: var(--cv-on-surface); margin: 0 4px 12px; }
.phone-rule { border: 0; border-top: 1px solid var(--cv-muted); opacity: .35; margin: 4px 4px 12px; }
.phone-mac {
  display: block;
  text-align: center;
  color: var(--cv-continue-on-phone-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin: 0 4px 8px;
}
.phone-mac:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }

/* "CAN'T SCAN? TEXT ME A CODE" (2026-11-04 - only when the conversation's continuity.textMe is on): the button, the number box,
   the code box and what went wrong - the conversation moves only after the code is typed back here. */
.phone-textme { width: calc(100% - 8px); margin: 0 4px 12px; border: 0; font: inherit; cursor: pointer; }
.phone-textme:disabled { opacity: .6; cursor: default; }
.phone-input {
  display: block;
  width: calc(100% - 8px);
  box-sizing: border-box;
  margin: 0 4px 10px;
  padding: 10px 12px;
  border: 1px solid var(--cv-muted);
  border-radius: 10px;
  background: transparent;
  color: var(--cv-on-surface);
  font: inherit;
  font-size: 15px;
}
.phone-input:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 1px; }
.phone-error { font-size: 12.5px; font-weight: 600; color: var(--cv-on-surface); margin: 0 4px 10px; }
.phone-error[hidden] { display: none; }
}

/* -- design/src/bot/components/assets.css -- */
@layer cv.components {
/* THE ASSET PICKER (layer cv.components) - [data-cv-part="asset-picker"], its tiles (asset-tile) and its Done button
   (asset-done). */

/* ── THE ASSET PICKER ──────────────────────────────────────────────────────────
   A collecting AssetItem step. A chat CHANNEL has to reduce one of these to a row
   of filenames; this is a web page, so the visitor sees the files and chooses by
   looking. Uses the same brand variables as everything else - one accent recolors
   the whole control. */

.asset-pick {
  margin: 10px 0 4px;
  padding: 14px;
  background: var(--cv-bubble-them-bg);
  border-radius: var(--cv-radius-l);
  box-shadow: var(--cv-asset-picker-shadow);
}

.asset-pick-title {
  font-family: var(--cv-font-display);
  font-size: 20px;
  line-height: 1.2;
  color: var(--cv-on-surface);
}

.asset-pick-detail {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--cv-muted);
}

.asset-grid {
  margin-top: 12px;
  display: grid;
  /* auto-fit + minmax so two tiles fill the width on a phone and four sit in a
     row on a desktop panel, with no breakpoint to keep in sync. */
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.asset-grid-one { grid-template-columns: 1fr; }

.asset-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--cv-on-surface) 10%, transparent);
  border-radius: 12px;
  overflow: hidden;
  background: var(--cv-panel-bg);
}

.asset-tile-frame {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cv-on-surface) 6%, transparent);
  overflow: hidden;
}

.asset-grid-one .asset-tile-frame { aspect-ratio: 16 / 9; }

.asset-tile-img,
.asset-tile-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Audio has no picture to crop - let the control sit at its natural height. */
audio.asset-tile-player { height: auto; object-fit: initial; padding: 0 8px; }

.asset-tile-file {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--cv-on-accent);
  background: var(--cv-accent);
  padding: 10px 14px;
  border-radius: 7px;
}

/* The SELECT affordance is its own button, never the media: tapping play must
   not toggle a choice, and choosing must not swallow a play. */
.asset-tile-choose {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--cv-on-surface) 8%, transparent);
  background: transparent;
  font-family: var(--cv-font-body);
  font-size: 13px;
  line-height: 1.3;
  color: var(--cv-on-surface);
  text-align: left;
  cursor: pointer;
}

.asset-tile-choose:hover { background: color-mix(in srgb, var(--cv-accent) 8%, transparent); }

.asset-tile-tick {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid color-mix(in srgb, var(--cv-on-surface) 28%, transparent);
  background: var(--cv-surface);
  position: relative;
}

.asset-tile-choose.is-on { background: color-mix(in srgb, var(--cv-accent) 12%, transparent); }

.asset-tile-choose.is-on .asset-tile-tick {
  background: var(--cv-accent);
  border-color: var(--cv-accent);
}

.asset-tile-choose.is-on .asset-tile-tick::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid var(--cv-on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.asset-tile-name { min-width: 0; word-break: break-word; }

.asset-tile-name-static {
  padding: 9px 10px;
  border-top: 1px solid color-mix(in srgb, var(--cv-on-surface) 8%, transparent);
  font-size: 13px;
  line-height: 1.3;
  color: var(--cv-on-surface);
}

.asset-tile-dl {
  padding: 7px 10px 9px;
  font-size: 12px;
  color: var(--cv-accent);
  text-decoration: none;
  border-top: 1px solid color-mix(in srgb, var(--cv-on-surface) 8%, transparent);
}

.asset-tile-dl:hover { text-decoration: underline; }

.asset-pick-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.asset-pick-status {
  font-size: 13px;
  color: var(--cv-muted);
}

.asset-pick-done {
  flex: 0 0 auto;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--cv-accent);
  color: var(--cv-on-accent);
  font-family: var(--cv-font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.asset-pick-done:disabled {
  opacity: 0.42;
  cursor: default;
}
}

/* -- design/src/bot/components/preview.css -- */
@layer cv.components {
/* THE BUILDER'S PREVIEW (layer cv.components) - the outline Point & Edit draws, only in data-cv-mode="preview". */

/* THE BUILDER'S PREVIEW (PLAN 5.7 - Point & Edit). Only a preview's replies carry data-step; while the
   builder asks for a pick, a hovered reply outlines and a click names its moment back. "Show in preview"
   outlines the reply once; reduced motion keeps the outline still. */
.conv-picking .row[data-step] { cursor: crosshair; }
.conv-picking .row[data-step]:hover .bubble {
  outline: 2px dashed var(--cv-accent);
  outline-offset: 3px;
}
.row.conv-shown .bubble {
  outline: 2px solid var(--cv-accent);
  outline-offset: 3px;
  animation: conv-shown 1.4s ease forwards;
}
@keyframes conv-shown { 0% { outline-color: var(--cv-accent); } 100% { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .row.conv-shown .bubble { animation: none; } }
}

/* -- design/src/bot/components/capture.css -- */
@layer cv.components {
/* THE CONTROLS BESIDE WORDS (layer cv.components) - Take a photo, Choose a file, Share my location
   ([data-cv-part="capture-button"]), and the visitor's own upload in their bubble (bubble-me with data-cv-turn="media"). */

/* THE CHAT'S CONTROLS BESIDE WORDS (2026-10-07 - the upload, for real): when the moment the conversation rests on takes a
   photo, a file or the visitor's location, the shell offers it right under the chips - Take a photo (the device camera),
   Choose a photo / a file (the library or the files), Share my location. Brand-filled: it is the one thing to do next. */
.capture-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 6px 34px;
  animation: pop 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.capture-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--cv-capture-bg);
  color: var(--cv-capture-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.capture-btn.capture-btn-quiet {
  background: var(--cv-surface);
  color: var(--cv-on-surface);
  border: 1px solid color-mix(in srgb, var(--cv-accent) 45%, transparent);
  font-weight: 500;
}

.capture-btn:active { transform: scale(0.96); }

.capture-btn:disabled { opacity: 0.45; cursor: default; }

/* The visitor's OWN upload, shown back to them in their bubble: the picture they chose (read on their device - never
   fetched back from the server), or the file's name for anything else. */
.bubble.bubble-upload {
  padding: 4px;
  max-width: 220px;
}

.bubble-upload img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: calc(var(--cv-radius-l) - 6px);
  cursor: zoom-in;
}

.bubble-upload .upload-name {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  word-break: break-word;
}
}

/* -- design/src/bot/embed.css -- */
@layer cv.components {
/* THE WEB EMBED (layer cv.components, LAST) - the rules that dress the concierge inside a customer's page
   (data-cv-mode="embed", or "panel" behind a launcher). Kept last in the bundle on purpose: everything after its first rule
   hangs off body.cbot-embed (Tests/BotEmbedBridgeTests). */

/* ── THE WEB EMBED (2026-10-08 - ?embed=1; docs/public/Integrators/RCS-Emulator-Embed.md) ─────────────────────────────
   Every rule below hangs off body.cbot-embed (set only by the embed's bridge) or the dark theme (set only by it): the
   page without the embed never matches one. */

/* The frame IS the chrome - the host library draws its corners and its shadow. */
body.cbot-embed .stage { padding: 0; }

body.cbot-embed .panel {
  width: 100%;
  height: 100%;
  height: 100dvh;
  border-radius: 0;
  box-shadow: none;
}

/* Never a sideways scroll at a phone's width: a long address or word breaks inside its bubble. */
body.cbot-embed .row .bubble {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* A keyboard's focus is always visible inside a host's page. */
body.cbot-embed .chip:focus-visible,
body.cbot-embed .chip-card-main:focus-visible,
body.cbot-embed .chip-zoom:focus-visible,
body.cbot-embed .icon-btn:focus-visible,
body.cbot-embed .send:focus-visible,
body.cbot-embed .attach:focus-visible,
body.cbot-embed .capture-btn:focus-visible,
body.cbot-embed .flip-cta:focus-visible,
body.cbot-embed .asset-tile-choose:focus-visible,
body.cbot-embed .asset-pick-done:focus-visible {
  outline: 2px solid var(--cv-focus);
  outline-offset: 2px;
}

/* A visitor who asked for less motion gets none - no pop, no slide, no smooth scroll. */
@media (prefers-reduced-motion: reduce) {
  body.cbot-embed *,
  body.cbot-embed *::before,
  body.cbot-embed *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
}
