/* PERFECT CIRCLE - the AI Concierge's face (design/starters/perfect-circle/bot.css). Contract version 1.

   Everything round: pill bubbles, a ring of round answers, round pictures, a round launcher with a ring.

   A STARTER DESIGN (designer-css-plan section 2.6): ours, read-only, loaded and changed and saved as a workspace's own
   design. Written ONLY against the --cv-* tokens and the data-cv-* parts, moments, turns, states and screens of
   design/contract.json - never a class name, never an !important. A design's CSS lands in the cascade layer cv.design (the
   server wraps it; on the go site's stage, Tests/Design/ShotCases.Starters.cs does), so it beats our default bundle
   without a specificity war. url() reaches only this package's own files.

   1. THE TOKENS - on :root, where the concierge declares its own (a design's layer beats the dark theme's html[data-
      theme] there). They equal manifest.json's tokens, value for value (Tests/Design/StarterLibraryTests).
   2. THE LOOK - every shape, glow, picture and motion is scoped to the conversation's own screen
      ([data-cv-screen="thread"]). A protected screen (confirm, consent, payment, sign-in) and a protected part (the
      verified note, Powered by, a signature, an action's confirm) take COLOURS ONLY, inside the contrast floor - so when
      the locked layer lands (P1) nothing here has to move. Motion runs only when the reader has not asked for less. */

:root {
  /* reference */
  --cv-color-brand: #6a4cf0;
  --cv-color-ink: #241c3a;
  --cv-color-paper: #fbf9ff;
  --cv-font-body: "Circle Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cv-font-display: "Circle Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cv-radius-s: 999px;
  --cv-radius-m: 999px;
  --cv-radius-l: 28px;
  --cv-shadow-1: 0 2px 6px rgba(106, 76, 240, .12);
  --cv-shadow-2: 0 8px 22px rgba(106, 76, 240, .16);
  --cv-shadow-3: 0 24px 60px rgba(36, 28, 58, .18);
  --cv-motion-fast: 120ms;
  --cv-motion-slow: 240ms;
  /* semantic */
  --cv-surface: #ffffff;
  --cv-on-surface: var(--cv-color-ink);
  --cv-accent: #6a4cf0;
  --cv-on-accent: #ffffff;
  --cv-muted: #5d5578;
  --cv-danger: #c4253a;
  --cv-focus: var(--cv-accent);
  --cv-bubble-me-bg: #6a4cf0;
  --cv-bubble-me-ink: #ffffff;
  --cv-bubble-them-bg: #ffffff;
  --cv-bubble-them-ink: #241c3a;
  --cv-field-font-size: 16px;
  /* component */
  --cv-header-bg: var(--cv-surface);
  --cv-header-line: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-avatar-bg: var(--cv-accent);
  --cv-avatar-ink: var(--cv-on-accent);
  --cv-bubble-radius: 28px;
  --cv-bubble-tail-radius: 28px;
  --cv-bubble-font-size: 15px;
  --cv-bubble-them-shadow: var(--cv-shadow-1);
  --cv-typing-dot: var(--cv-muted);
  --cv-card-radius: 32px;
  --cv-chip-bg: #ffffff;
  --cv-chip-ink: var(--cv-accent);
  --cv-chip-border: rgba(106, 76, 240, .45);
  --cv-chip-radius: 999px;
  --cv-chip-hover-bg: color-mix(in srgb, var(--cv-accent) 10%, var(--cv-surface));
  --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) 16%, transparent);
  --cv-send-bg: var(--cv-accent);
  --cv-send-ink: var(--cv-on-accent);
  --cv-sheet-bg: var(--cv-surface);
  --cv-sheet-backdrop: rgba(0, 0, 0, .45);
  --cv-page-bg: #efe9ff;
  --cv-panel-bg: var(--cv-surface);
  --cv-panel-radius: 32px;
  --cv-panel-shadow: var(--cv-shadow-3);
  --cv-language-line: color-mix(in srgb, var(--cv-on-surface) 14%, transparent);
  --cv-language-line-hover: color-mix(in srgb, var(--cv-on-surface) 28%, transparent);
  --cv-chip-font-size: 13.5px;
  --cv-card-picture-bg: color-mix(in srgb, var(--cv-accent) 8%, var(--cv-surface));
  --cv-document-bg: color-mix(in srgb, var(--cv-accent) 6%, var(--cv-surface));
  --cv-done-line-rule: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-composer-radius: 999px;
  --cv-composer-focus-line: var(--cv-accent);
  --cv-overlay-bg: rgba(0, 0, 0, .55);
}

/* ── Perfect Circle ─────────────────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Circle Figtree";
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

[data-cv-part="name"] { font-family: var(--cv-font-display); font-weight: 800; }

/* A conic-gradient progress ring around the assistant's picture, cut to a band by a radial mask. */
[data-cv-part="brand-logo"] { position: relative; }
[data-cv-part="brand-logo"]::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 210deg, #6a4cf0 0 68%, rgba(106, 76, 240, .18) 68% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}
[data-cv-part="progress"] { border-radius: 999px; margin-inline: 14px; }
[data-cv-part="progress-bar"] { border-radius: 999px; background: conic-gradient(from 90deg, #6a4cf0, #ff7ac6, #6a4cf0); }

[data-cv-part="thread"] {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(106, 76, 240, .08) 0 70px, transparent 71px),
    radial-gradient(circle at 95% 70%, rgba(255, 122, 198, .08) 0 100px, transparent 101px);
}
[data-cv-screen="thread"] :is([data-cv-part="bubble-me"], [data-cv-part="bubble-them"]) { padding-inline: 18px; }

/* Every choice a circle. */
[data-cv-screen="thread"] [data-cv-part="chips"] { display: flex; flex-wrap: wrap; gap: 10px; }
[data-cv-screen="thread"] [data-cv-part="chip"] {
  width: 96px; aspect-ratio: 1; border-radius: 50%; padding: 8px; white-space: normal;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.15;
  border-width: 2px; box-shadow: var(--cv-shadow-1);
}
/* A card: a round picture inside a pill. */
[data-cv-screen="thread"] [data-cv-part="card"] { border-radius: 999px; border-width: 2px; }
[data-cv-screen="thread"] [data-cv-part="card-picture"] { border-radius: 50%; overflow: hidden; clip-path: circle(50%); }
[data-cv-screen="thread"] [data-cv-part="send"] { border-radius: 50%; }

/* ── The heard and saved cards (docs/claude/BOT-CONCIERGE.md section 0k) - heard-card, heard-pill, saved-receipt ──── */

[data-cv-screen="thread"] [data-cv-part="heard-card"] { border-radius: 28px; padding-inline: 16px; }
[data-cv-screen="thread"] [data-cv-part="saved-receipt"] { border-radius: 999px; padding-inline: 18px; }
