/* ══════════════════════════════════════════════════════════════════════
   CUEME BOT — copy this block + the <svg> template into product.
   Nothing below the "DEMO PAGE" divider is part of the component.

   GEOMETRY IS VERBATIM FROM FIGMA.
   Source: Illustrations › Cueme Ai chatbot (node 35:2756), frames 1–9.
   Every coordinate below is the untouched Figma number in the original
   200×200 artboard space; the viewBox just crops to the art. Do not
   "clean up" these values — they are the design, not an approximation.

     body      40×40 at (80,83) — rounded, see CORNERS below
     antenna   tip 4×4 at (98,76); stem line M100 80 V83
     ears      2×2 at (78,102) and (120,102), solid line colour
     eyes      8×16 r4 at (88,96) / (103,96)   — idle
               same at y=95                     — response (1px higher)
     blink     4×1 at (90,103) and (106,103)   — closed eyes, NOT a mouth
               reached by squashing the open pill, not by a frame cut
     minus     15×4 at (92,101)
     divide    15×4 at (92,101) + 4×4 at (98,94) and (98,108)
     plus      union path, 16×16 arms 5 wide, centred (99.5,103)
     times     the plus path, rotate(45 99.5 103)

   Frames 5–7 sit 3px higher than frame 4. That lift is kept as the
   thinking bob rather than baked into the coordinates, so every glyph
   lives in one space.

   CORNERS — the one deliberate departure from the sheet, which is
   sharp throughout. Rounded to sit with the design system's roundness
   pass. The radius is in user units, not px, so the character keeps
   one shape at every size; the numbers are the tokens at the default
   128px render (1 unit = 128/56 = 2.286px):
     body                      3.5  = --radius-md (8px)  — interactive-card corner
     antenna tip, ears, glyphs 0.875 = --radius-xs (2px) — "inner parts, one
                                        step tighter", per the radius spec
   Eyes were already pills (rx 4) and are untouched. The plus/times glyph
   rounds its 8 arm-tip corners and keeps the 4 armpits sharp; it is a
   path, so --bot-radius does not reshape it.

   Colours are the Figma variables: info-600 fill, info-800 line,
   neutral/0 face. These are ramp primitives on purpose — the semantic
   --bg-info-* tokens flip between themes and the bot must not.

   Durations are bot-local, not --duration-*. The motion system is
   scoped to UI transitions and caps at 400ms; this is character
   animation.
   ══════════════════════════════════════════════════════════════════════ */

.cueme-bot {
  /* ─── Knobs ─── */
  --bot-size:  128px;                /* 40px floor — see Sizes */
  --bot-skin:  var(--raw-blue-600);      /* #5492F1 */
  --bot-line:  var(--raw-blue-800);      /* #3464B1 */
  --bot-face:  var(--raw-stone-0);
  --bot-radius: 3.5px;               /* body corner, user units — see CORNERS */
  --bot-level: 0;                    /* 0–1, live mic amplitude */
  --eye-x:     0;                    /* -1…1 gaze, set by the runtime */
  --eye-y:     0;

  /* ─── Tempo ─── */
  --bot-breathe: 3600ms;
  --bot-blink:   4400ms;
  --bot-listen:  1500ms;
  --bot-think:   2000ms;             /* 4 operators × 500ms */
  --bot-talk:    440ms;
  --bot-idle-loop: calc(var(--bot-blink) * 3);   /* eyes → eyes → curvy */

  /* ─── Easing ───
     Bot-local, like the durations. The system's --ease-* curves are
     built for UI that should feel decisive — --ease-out fires 80% of
     its travel in the first third, which on a face reads as a twitch.
     These are sine-based: no hard edges at either end, nothing snaps. */
  --bot-ease:     cubic-bezier(0.37, 0, 0.63, 1);      /* in-out, the default */
  --bot-ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);/* arrivals — settles, no jolt */
  --bot-ease-in:  cubic-bezier(0.55, 0.06, 0.68, 0.19);/* departures — gathers slowly */
  --bot-gaze:    380ms;              /* eye travel to a new target */
  --bot-glance:  4800ms;             /* corner-glance loop */

  display: inline-block;
  width: var(--bot-size);
  line-height: 0;
  container-type: inline-size;
}

.cueme-bot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

/* One stroke weight for the whole drawing, exactly as exported. */
.cueme-bot svg { stroke-width: 1; }
.cueme-bot__body,
.cueme-bot__tip   { fill: var(--bot-skin); stroke: var(--bot-line); }
/* CSS rx overrides the attribute where supported; the attribute is the
   fallback, so older engines still get the same corner. */
.cueme-bot__body  { rx: var(--bot-radius); }
.cueme-bot__stem  { stroke: var(--bot-line); }
.cueme-bot__ears rect { fill: var(--bot-line); stroke: var(--bot-line); }
/* Paint sits on the slot's child and inherits down through .gaze. */
.cueme-bot__face > g > * { fill: var(--bot-face); stroke: var(--bot-line); }

/* Explicit box + origin everywhere, or Safari resolves percentage
   origins against the viewport and the bot pivots off-screen. */
.cueme-bot__rig,
.cueme-bot__bob,
.cueme-bot__turn {
  transform-box: view-box;
  transform-origin: 100px 103px;     /* body centre, in Figma space */
}
.cueme-bot__face > g {
  transform-box: fill-box;
  transform-origin: center;
}

/* Face slots — all off; each state switches its own on. */
.cueme-bot__face > g { opacity: 0; }

/* ───────────────────────── GAZE ─────────────────────────
   Listening is the only state that looks around. Two modes:

     data-look="cursor"  eyes track the pointer
     data-look="corner"  eyes glance off to one corner and blink,
                         swapping sides on each blink

   The runtime picks: cursor while the pointer is moving, corner on a
   coarse pointer or after 2.2s of stillness. Travel is capped at 3
   units across and 2.2 up — the eyes have 8 units of clearance to the
   body's left edge and 9 to the right, so this never crowds the frame.
   Each pill also tips with the look, as in the corner reference.       */

.cueme-bot__gaze {
  transform-box: view-box;
  transform-origin: 99.5px 104px;
}
.cueme-bot__gaze rect,
.cueme-bot .lk-l,
.cueme-bot .lk-r {
  transform-box: fill-box;
  transform-origin: center;
}

/* The motion lab's gaze, in every state, tuned so it reads as watching: the eyes follow the pointer quickly and far
   (4.5 × 3.4 units at full reach, 160ms, so they keep up with the hand), and the body leans and drifts toward it a beat
   behind (5° and 1 unit, 520ms), like a head following the eyes. `rotate`/`translate`, not `transform`, on the tilt
   group, so the curious move's transform composes. */
.cueme-bot[data-look="cursor"] .cueme-bot__gaze {
  transform: translate(calc(var(--eye-x) * 4.5px), calc(var(--eye-y) * 3.4px));
  transition: transform 160ms var(--bot-ease-out);
}
.cueme-bot[data-look="cursor"] .cueme-bot__tilt {
  rotate: calc(var(--eye-x) * 5deg);
  translate: calc(var(--eye-x) * 1px) calc(var(--eye-y) * 0.6px);
  transition: rotate 520ms var(--bot-ease-out), translate 520ms var(--bot-ease-out);
}
/* Tilt uses the standalone `rotate` property, not `transform`, so the
   lid squash can hold `scale`/`translate` on the same rect and the
   browser composes them (translate → rotate → scale). */
.cueme-bot[data-state="listening"][data-look="cursor"] .cueme-bot__gaze rect {
  rotate: calc(var(--eye-x) * 9deg);
  transition: rotate var(--bot-gaze) var(--bot-ease-out);
}

.cueme-bot[data-state="listening"][data-look="corner"] .cueme-bot__gaze {
  animation: bot-glance var(--bot-glance) var(--bot-ease) infinite;
}

/* The blink covers the direction change, so the eyes reappear already
   looking the other way — a saccade, not a slide. */
@keyframes bot-glance {
  0%,  44%  { transform: translate(2.8px, -2.2px); }
  50%, 94%  { transform: translate(-2.8px, -2.2px); }
  100%      { transform: translate(2.8px, -2.2px); }
}
@keyframes bot-glance-tip {
  0%,  44%  { rotate: 9deg; }
  50%, 94%  { rotate: -9deg; }
  100%      { rotate: 9deg; }
}

/* ───────────────────────── LIDS ─────────────────────────
   The sheet blinks by cutting between two frames. At 60fps that reads
   as a dropped frame, so instead each open pill squashes onto the
   closed rect and back — same start and end art, travelled.

     open  L  88,96   8×16   centre (92,104)
     shut  L  90,103  4×1    centre (92,103.5)
       → scale 0.5 × 0.0625, translate 0 -0.5

     open  R  103,96  8×16   centre (107,104)
     shut  R  106,103 4×1    centre (108,103.5)
       → scale 0.5 × 0.0625, translate 1 -0.5
         (the sheet's right dash sits 1 unit further out than its eye —
          kept as drawn rather than corrected)

   rx stays 4 and the renderer clamps it to half the height, so the shut
   pill lands on the dash without animating rx — one less property that
   engines disagree about.

   Response eyes (frame 8) are frame 1 one unit higher, so the talking
   lid carries that -1 in its own open keyframe instead of needing a
   second pair of rects.

   The blink sits at the END of each cycle, so one pair of keyframes
   serves every tempo by duration alone: 4.4s idle, 2.4s per glance,
   0.88s while talking.                                               */

@keyframes bot-lid-l {
  0%, 93%   { scale: 1 1;         translate: 0 0; }
  96.4%     { scale: 0.5 0.0625;  translate: 0 -0.5px; }
  100%      { scale: 1 1;         translate: 0 0; }
}
@keyframes bot-lid-r {
  0%, 93%   { scale: 1 1;         translate: 0 0; }
  96.4%     { scale: 0.5 0.0625;  translate: 1px -0.5px; }
  100%      { scale: 1 1;         translate: 0 0; }
}
@keyframes bot-say-l {
  0%, 56%   { scale: 1 1;         translate: 0 -1px; }
  74%       { scale: 0.5 0.0625;  translate: 0 -0.5px; }
  94%, 100% { scale: 1 1;         translate: 0 -1px; }
}
/* The curvy (frame-3) eyes close onto the same two dashes. Their boxes
   are 88,87 8×10.441 and 103,87 8×10.459 — measured from the rendered
   path, since the scalloped bottom edge is not a round number. */
@keyframes bot-lid-lk-l {
  0%, 93%  { scale: 1 1;            translate: 0 0; }
  96.4%    { scale: 0.5 0.09578;    translate: 0 11.279px; }
  100%     { scale: 1 1;            translate: 0 0; }
}
@keyframes bot-lid-lk-r {
  0%, 93%  { scale: 1 1;            translate: 0 0; }
  96.4%    { scale: 0.5 0.09561;    translate: 1px 11.271px; }
  100%     { scale: 1 1;            translate: 0 0; }
}
@keyframes bot-say-r {
  0%, 56%   { scale: 1 1;         translate: 0 -1px; }
  74%       { scale: 0.5 0.0625;  translate: 1px -0.5px; }
  94%, 100% { scale: 1 1;         translate: 0 -1px; }
}

/* ───────────────────────── IDLE ─────────────────────────
   Frames 1 ↔ 2 — the lids travel between them.

   Every third blink the eyes reopen as frame 3's curvy pair and hold
   there for one beat before the next blink puts them back. The swap
   itself happens while the lids are shut, so there is nothing to see
   crossfading — the eyes simply open with a different shape. All four
   lid animations share the --bot-blink period, so they stay in phase
   and the shut instant lines up with the swap.                       */

.cueme-bot[data-state="idle"] .cueme-bot__rig {
  animation: bot-float var(--bot-breathe) var(--bot-ease) infinite;
}
.cueme-bot[data-state="idle"] .cueme-bot__face > g.f-eyes {
  animation: bot-idle-eyes var(--bot-idle-loop) linear infinite;
}
.cueme-bot[data-state="idle"] .cueme-bot__face > g.f-lookup {
  animation: bot-idle-curvy var(--bot-idle-loop) linear infinite;
}
.cueme-bot[data-state="idle"] .eye-l { animation: bot-lid-l var(--bot-blink) var(--bot-ease) infinite; }
.cueme-bot[data-state="idle"] .eye-r { animation: bot-lid-r var(--bot-blink) var(--bot-ease) infinite; }
.cueme-bot[data-state="idle"] .lk-l  { animation: bot-lid-lk-l var(--bot-blink) var(--bot-ease) infinite; }
.cueme-bot[data-state="idle"] .lk-r  { animation: bot-lid-lk-r var(--bot-blink) var(--bot-ease) infinite; }

/* The lid is shut at 96.4% of each blink, i.e. 32.13 / 65.47 / 98.80%
   of the three-blink loop. The handover sits on the second of those,
   with a 40ms fade purely as insurance against sub-frame drift. */
@keyframes bot-idle-eyes {
  0%, 65.3%     { opacity: 1; }
  65.6%, 98.65% { opacity: 0; }
  98.95%, 100%  { opacity: 1; }
}
@keyframes bot-idle-curvy {
  0%, 65.3%     { opacity: 0; }
  65.6%, 98.65% { opacity: 1; }
  98.95%, 100%  { opacity: 0; }
}

@keyframes bot-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-1.2px) scale(1.012); }
}

/* ─────────────────────── LISTENING ──────────────────────
   Holds frame 1. The eyes carry this state — see GAZE above —
   and the body scale rides --bot-level so a real AnalyserNode
   can drive it.                                            */

.cueme-bot[data-state="listening"] .cueme-bot__rig {
  animation: bot-attend var(--bot-listen) var(--bot-ease) infinite;
  scale: calc(1 + var(--bot-level) * 0.05);
  transition: scale 160ms linear;   /* linear: it is following live amplitude */
}
.cueme-bot[data-state="listening"] .f-eyes { opacity: 1; }
/* Cursor mode blinks at the idle tempo. A character that tracks you and
   never blinks reads as a stare. */
.cueme-bot[data-state="listening"][data-look="cursor"] .eye-l { animation: bot-lid-l var(--bot-blink) var(--bot-ease) infinite; }
.cueme-bot[data-state="listening"][data-look="cursor"] .eye-r { animation: bot-lid-r var(--bot-blink) var(--bot-ease) infinite; }

/* Tilt and lid are two animations on one rect, so they go in a single
   comma-separated list — a second `animation` declaration would replace
   this one rather than add to it.

   The lid runs at half the glance period, so it shuts twice per loop,
   once inside each direction change (the gaze flips at 44–50% and
   94–100%). The eyes reopen already looking the other way. */
.cueme-bot[data-state="listening"][data-look="corner"] .eye-l {
  animation: bot-glance-tip var(--bot-glance) var(--bot-ease) infinite,
             bot-lid-l calc(var(--bot-glance) / 2) var(--bot-ease) infinite;
}
.cueme-bot[data-state="listening"][data-look="corner"] .eye-r {
  animation: bot-glance-tip var(--bot-glance) var(--bot-ease) infinite,
             bot-lid-r calc(var(--bot-glance) / 2) var(--bot-ease) infinite;
}
.cueme-bot[data-state="listening"] .cueme-bot__tip  { animation: bot-tip var(--bot-listen) var(--bot-ease) infinite; }

@keyframes bot-attend {
  0%, 100% { transform: translateY(-1.5px) scale(1); }
  50%      { transform: translateY(-1.5px) scale(1.022); }
}
@keyframes bot-tip {
  0%, 100% { fill: var(--bot-skin); }
  50%      { fill: var(--bot-face); }
}

/* ──────────────────────── THINKING ──────────────────────
   Frame 3 is the hand-off: eyes roll up, ears ride up, and
   and the arrow on that frame is a rotation arc: it sits left of
   the body, bulging outward, arrowhead at the top — a point on
   the left edge travelling up, which is clockwise. So the bot
   turns one full clockwise revolution about its own centre and
   lands upright. That is also why frames 4–7 have no antenna and
   no ears. Then − ÷ + × on 400ms beats, the same four the
   number-operations card uses, so the two read as one family. */

.cueme-bot[data-state="thinking"] .cueme-bot__chrome { opacity: 0; }
.cueme-bot[data-state="thinking"] .cueme-bot__bob {
  animation: bot-bob var(--bot-think) var(--bot-ease) infinite;
}
.cueme-bot[data-state="thinking"] .cueme-bot__face > g.f-op {
  animation: bot-op var(--bot-think) var(--bot-ease) infinite;
}
/* These must match the selector above class-for-class — the `animation`
   shorthand there resets delay to 0 and would otherwise outrank them,
   firing all four glyphs on top of each other. */
.cueme-bot[data-state="thinking"] .cueme-bot__face > g.f-divide { animation-delay: calc(var(--bot-think) * 0.25); }
.cueme-bot[data-state="thinking"] .cueme-bot__face > g.f-plus   { animation-delay: calc(var(--bot-think) * 0.50); }
.cueme-bot[data-state="thinking"] .cueme-bot__face > g.f-times  { animation-delay: calc(var(--bot-think) * 0.75); }

@keyframes bot-bob {
  0%, 16%   { transform: translateY(0); }
  36%, 88%  { transform: translateY(-3px); }
  100%      { transform: translateY(0); }
}
@keyframes bot-op {
  0%   { opacity: 0; transform: scale(0.88); }
  7%   { opacity: 1; transform: scale(1); }
  18%  { opacity: 1; transform: scale(1); }
  25%  { opacity: 0; transform: scale(0.94); }
  100% { opacity: 0; transform: scale(0.88); }
}


/* ───────────────────────── TALKING ──────────────────────
   Frames 8 ↔ 9, the response loop. There is no mouth in this
   design — the dashes are closed eyes — so speech is carried
   by blink tempo, a nod, and one outward ring per phrase.    */

.cueme-bot[data-state="talking"] .cueme-bot__rig {
  animation: bot-nod calc(var(--bot-talk) * 5) var(--bot-ease) infinite;
}
.cueme-bot[data-state="talking"] .f-eyes { opacity: 1; }
.cueme-bot[data-state="talking"] .eye-l { animation: bot-say-l calc(var(--bot-talk) * 2) var(--bot-ease) infinite; }
.cueme-bot[data-state="talking"] .eye-r { animation: bot-say-r calc(var(--bot-talk) * 2) var(--bot-ease) infinite; }

@keyframes bot-nod {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(-1.2px); }
  70%      { transform: translateY(0.8px); }
}

/* ─────────────────── STATE HANDOVER ────────────────────  */
.cueme-bot__chrome { transition: opacity 360ms var(--bot-ease); }
.cueme-bot__face > g { transition: opacity 240ms var(--bot-ease); }
.cueme-bot[data-state="thinking"] .f-op { transition: none; }

/* ───────────────────────── MOVES ────────────────────────
   One-shot beats (hello, curious, hop, happy, celebrate, ping) run
   from cueme-bot.js with the Web Animations API. Each lives on its own
   wrapper group outside the rig, so it layers over whatever state loop
   is running instead of replacing it. See MOTION.md.

   New art, not on the Figma sheet yet: shadow, blush, fx glyphs.
   Their colours are ramp primitives like the rest of the bot, so they
   don't flip with the theme.                                        */

.cueme-bot {
  --bot-blush: var(--raw-red-400);     /* #FF9595 */
  --bot-spark: var(--raw-gold-400);      /* #F6BE7C — × in the confetti */
}
.cueme-bot__hop,
.cueme-bot__squash { transform-box: view-box; transform-origin: 100px 123px; }  /* feet */
.cueme-bot__tilt,
.cueme-bot__body   { transform-box: view-box; transform-origin: 100px 103px; }  /* body centre */
.cueme-bot__antenna { transform-box: view-box; transform-origin: 100px 83px; }  /* stem base */
.cueme-bot__shadow { fill: var(--bot-line); opacity: 0; transform-box: view-box; transform-origin: 100px 126px; }
.cueme-bot__ears rect { transform-box: fill-box; transform-origin: center; }
.cueme-bot__blush { opacity: 0; transition: opacity 320ms var(--bot-ease-out); }
.cueme-bot__blush rect { fill: var(--bot-blush); }

/* Happy = the frame-3 hand-off pose held still: curvy eyes, ears up 4.
   The swap happens while the lids are shut (JS), so no crossfade.
   It must also stop the idle loop's eye swap, or idle flips the eyes
   back halfway through the hold. */
.cueme-bot.is-happy .cueme-bot__face > g { opacity: 0 !important; animation: none !important; transition: none !important; }
.cueme-bot.is-happy .cueme-bot__face > g.f-lookup { opacity: 1 !important; }
.cueme-bot.is-happy .lk-l,
.cueme-bot.is-happy .lk-r { animation: none !important; }
.cueme-bot.is-happy .cueme-bot__ears { transform: translateY(-4px); }
.cueme-bot.is-happy .cueme-bot__blush { opacity: 1; }

/* ──────────────────── SMALL SIZES ───────────────────────
   The art is drawn at a 40px body with a 1px line — that line
   is 2.5% of the body, so at a 40px avatar it is already
   hairline. Under 64px the 4×1 blink dashes and 2×2 ears fall
   below a device pixel, so drop the operator cycle to a single
   held ÷. Under 40px this needs a redrawn sprite, not a scale. */
@container (max-width: 48px) {
  .cueme-bot[data-state="thinking"] .cueme-bot__face > g.f-op { animation: none; opacity: 0; }
  .cueme-bot[data-state="thinking"] .cueme-bot__face > g.f-divide { opacity: 1; }
  .cueme-bot[data-state="thinking"] .cueme-bot__bob { animation: none; transform: translateY(-3px); }
}

/* ─────────────────── REDUCED MOTION ────────────────────
   Nothing moves. Every state still holds a distinct pose.  */
@media (prefers-reduced-motion: reduce) {
  .cueme-bot *, .cueme-bot *::before, .cueme-bot *::after {
    animation: none !important;
    transition: none !important;
  }
  .cueme-bot[data-state="idle"] .cueme-bot__face > g.f-eyes,
  .cueme-bot[data-state="listening"] .cueme-bot__face > g.f-eyes,
  .cueme-bot[data-state="talking"] .cueme-bot__face > g.f-eyes,
  .cueme-bot[data-state="thinking"] .cueme-bot__face > g.f-divide { opacity: 1; }
  .cueme-bot[data-state="thinking"] .cueme-bot__bob { transform: translateY(-3px); }
  /* Eyes rest open and centred — no gaze, no lid. */
  .cueme-bot__gaze { transform: none !important; }
  .cueme-bot__tilt { rotate: none !important; translate: none !important; }
  .cueme-bot__gaze rect,
  .cueme-bot .lk-l,
  .cueme-bot .lk-r {
    rotate: none !important;
    scale: none !important;
    translate: none !important;
  }
}

/* ─────────────── THINKING, MORPHING (2026-09-30) ───────────────
   One shape that morphs + → × → − → ÷ and back, instead of four icons
   fading in and out (which flashed). A bar and two half-bars:
     +  the half-bars meet in the middle, the bar across
     ×  the whole shape turns 45°
     −  it turns back as the half-bars fold into the middle
     ÷  the half-bars shrink to dots and step out above and below
   Each beat holds, then morphs over 7% of the loop (140ms at 2s).
   Where a page has this shape, it replaces the four-icon cycle.     */
.cueme-bot:has(.f-morph)[data-state="thinking"] .cueme-bot__face > g.f-op { animation: none; opacity: 0; }
.cueme-bot[data-state="thinking"] .cueme-bot__face > g.f-morph { opacity: 1; }
.f-morph .m-spin, .f-morph rect { transform-box: view-box; transform-origin: 99.5px 103px; }
.f-morph .m-line { fill: var(--bot-line); stroke: var(--bot-line); stroke-width: 2; }
.f-morph .m-fill { fill: var(--bot-face); stroke: none; }
.cueme-bot[data-state="thinking"] .f-morph .m-spin { animation: m-spin var(--bot-think) var(--bot-ease) infinite; }
.cueme-bot[data-state="thinking"] .f-morph .m-top  { animation: m-top  var(--bot-think) var(--bot-ease) infinite; }
.cueme-bot[data-state="thinking"] .f-morph .m-bot  { animation: m-bot  var(--bot-think) var(--bot-ease) infinite; }
@keyframes m-spin {
  0%, 18%   { rotate: 0deg; }     /* + */
  25%, 43%  { rotate: 45deg; }    /* × */
  50%, 100% { rotate: 0deg; }     /* − then ÷ then + */
}
@keyframes m-top {
  0%, 43%   { transform: none; }
  50%, 68%  { transform: scaleY(0); }                          /* − : folded into the bar */
  75%, 93%  { transform: translateY(-5.2px) scaleY(0.47); }    /* ÷ : the top dot */
  100%      { transform: none; }
}
@keyframes m-bot {
  0%, 43%   { transform: none; }
  50%, 68%  { transform: scaleY(0); }
  75%, 93%  { transform: translateY(5.2px) scaleY(0.47); }     /* ÷ : the bottom dot */
  100%      { transform: none; }
}
/* Tiny sizes (avatars) and reduced motion hold a still +. 48, not 64: the phone Cueme is 64px and should loop. */
@container (max-width: 48px) {
  .cueme-bot[data-state="thinking"] .f-morph * { animation: none !important; }
}

/* Thinking: the ears and antenna go in, not fade (Aayushmaan, 2026-10-26: "they disappear fading out; ease in and
   out, maybe they go inside and come back out"). Going in, they accelerate (ease-in, as if pulled): the ears first,
   sliding into the body's sides and shrinking away, then the antenna sinking into the head from its stem base. Coming
   back out, the antenna leads and the ears follow, on an overshoot curve (a spring's push past rest, then settle).
   Individual scale/translate, so they compose with the moves' transforms (hop, curious, nod). */
.cueme-bot[data-state="thinking"] .cueme-bot__chrome { opacity: 1; }
.cueme-bot__antenna { scale: 1 1; transition: scale 480ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.cueme-bot__ears rect { scale: 1; translate: 0 0; transition: scale 480ms cubic-bezier(0.34, 1.56, 0.64, 1) 90ms, translate 480ms cubic-bezier(0.34, 1.56, 0.64, 1) 90ms; }
.cueme-bot[data-state="thinking"] .cueme-bot__antenna { scale: 1 0; transition: scale 260ms cubic-bezier(0.55, 0, 1, 0.45) 80ms; }
.cueme-bot[data-state="thinking"] .cueme-bot__ears rect { scale: 0; transition: scale 220ms cubic-bezier(0.55, 0, 1, 0.45), translate 220ms cubic-bezier(0.55, 0, 1, 0.45); }
.cueme-bot[data-state="thinking"] .cueme-bot__ears rect:first-child { translate: 2px 0; }
.cueme-bot[data-state="thinking"] .cueme-bot__ears rect:last-child { translate: -2px 0; }
@media (prefers-reduced-motion: reduce) { .cueme-bot__antenna, .cueme-bot__ears rect { transition: none; } }

/* Thinking: the eyes become the plus (Aayushmaan, 2026-10-26: "can the eyes change into the plus rather than fading";
   then "not smooth, it should be perfect frame by frame"). No swap between two drawings: cueme-bot.js starts the plus's
   own three bars exactly on the eyes, drawn the way the eyes are drawn, and moves their geometry to the plus every frame
   (data-morph = in → plus → out → eyes). While it runs, only the morphing bars show, and the + × − ÷ loop runs only
   once they've become the plus, so it starts from + on the frame they arrive. A bot the runtime doesn't manage
   (no data-morph) keeps the plain thinking loop above. */
.cueme-bot[data-morph="in"] .cueme-bot__face > g:not(.f-morph),
.cueme-bot[data-morph="plus"] .cueme-bot__face > g:not(.f-morph),
.cueme-bot[data-morph="out"] .cueme-bot__face > g:not(.f-morph) { opacity: 0 !important; transition: none; }
/* the hand-overs are cuts between identical frames, so no 240ms slot fade */
.cueme-bot[data-morph] .cueme-bot__face > g.f-eyes,
.cueme-bot[data-morph] .cueme-bot__face > g.f-morph { transition: none; }
.cueme-bot[data-morph="in"] .cueme-bot__face > g.f-morph,
.cueme-bot[data-morph="plus"] .cueme-bot__face > g.f-morph,
.cueme-bot[data-morph="out"] .cueme-bot__face > g.f-morph { opacity: 1 !important; }
.cueme-bot[data-morph]:not([data-morph="plus"]) .f-morph * { animation: none !important; }
.cueme-bot[data-morph="plus"] .f-morph .m-spin { animation: m-spin var(--bot-think) var(--bot-ease) infinite; }
.cueme-bot[data-morph="plus"] .f-morph .m-top  { animation: m-top  var(--bot-think) var(--bot-ease) infinite; }
.cueme-bot[data-morph="plus"] .f-morph .m-bot  { animation: m-bot  var(--bot-think) var(--bot-ease) infinite; }
