/* ILAI's presence (see ilai-presence.js): Barry's sculpted flame with eyes and the nine expressions he fixed by number
   (static/ilai-expressions.json). Everything here is transforms and opacity driven by the custom properties the script
   sets on the <svg> (--ip-top/--ip-bot lid closure 0..1, --ip-px/--ip-py pupil offset, --ip-ps pupil scale, --ip-tilt upper-lid
   degrees, --ip-light the gold light). The sway animates the OUTER svg so the filtered body is painted once. Nothing moves
   under prefers-reduced-motion or while the tab is hidden (html.ilai-paused). */
.ilai-p{display:inline-block;vertical-align:middle;overflow:visible;flex:none;transform-origin:50% 100%;will-change:transform}
/* lids: the top lid rotates about the eye's own centre (left +, right −) and slides down; the bottom lid slides up */
.ilai-p .ip-lidT,.ilai-p .ip-lidB{transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.ilai-p .ip-eyeL .ip-lidT{transform:rotate(calc(var(--ip-tilt,0)*1deg)) translateY(calc(var(--ip-top,0)*17.2px))}
.ilai-p .ip-eyeR .ip-lidT{transform:rotate(calc(var(--ip-tilt,0)*-1deg)) translateY(calc(var(--ip-top,0)*17.2px))}
.ilai-p .ip-lidB{transform:translateY(calc(var(--ip-bot,0)*-17.2px))}
/* pupils: offset and size per expression; a slow glance while working */
.ilai-p .ip-pu{transform-box:fill-box;transform-origin:50% 50%;transition:transform .35s cubic-bezier(.2,.7,.2,1);
  transform:translate(calc(var(--ip-px,0)*1px),calc(var(--ip-py,0)*1px)) scale(var(--ip-ps,1))}
.ilai-p.st-work .ip-pu{animation:ip-look 3.2s ease-in-out infinite}
/* the blink: only while resting, listening or attentive (the other expressions hold their lids) */
.ilai-p .ip-lid{transform-origin:50% 50%;transform-box:fill-box}
.ilai-p.st-rest .ip-lid,.ilai-p.st-listen .ip-lid,.ilai-p.st-alert .ip-lid{animation:ip-blink 7s infinite}
/* the sway while working: the whole mark, from its base */
.ilai-p.st-work{animation:ip-sway 3.6s ease-in-out infinite}
/* the gold light (ready): a dot that comes on and a ring that rings once */
.ilai-p .ip-dot{fill:#E2BF77;opacity:calc(var(--ip-light,0)*.95);transition:opacity .4s}
.ilai-p .ip-ring{fill:none;stroke:#E2BF77;stroke-width:4;opacity:0;transform-origin:50% 50%;transform-box:fill-box}
.ilai-p.st-ready .ip-ring{animation:ip-ping 2.8s ease-out 1}
/* small marks (under 72 px, ip-flat): no shadow or bevel filters, so edges stay crisp — and the face is drawn at an optical
   size, the way small type is cut: eyes 1.5x and the bridge 1.25x about the face's centre, else the eyes vanish at 48 px */
.ilai-p.ip-flat .ip-char,.ilai-p.ip-flat .ip-bridge,.ilai-p.ip-flat .ip-flame g[filter]{filter:none}
.ilai-p.ip-flat .ip-eyeIn{transform:scale(2)}
.ilai-p.ip-flat .ip-bridge{transform:translate(77px,292px) scale(1.5) translate(-77px,-292px)}
/* 96-119 px (ip-mid): a gentler optical size, so the face still reads at the brief head and on the opening screen */
.ilai-p.ip-mid .ip-eyeIn{transform:scale(1.45)}
.ilai-p.ip-mid .ip-bridge{transform:translate(77px,292px) scale(1.22) translate(-77px,-292px)}
@keyframes ip-blink{0%,95%,100%{transform:scaleY(1)}97%{transform:scaleY(.08)}}
@keyframes ip-sway{0%,100%{transform:rotate(0deg)}50%{transform:rotate(-1.6deg)}}
@keyframes ip-look{0%,100%{transform:translate(calc(var(--ip-px,0)*1px),calc(var(--ip-py,0)*1px)) scale(var(--ip-ps,1))}
  35%{transform:translate(calc(var(--ip-px,0)*1px - 1px),calc(var(--ip-py,0)*1px)) scale(var(--ip-ps,1))}
  70%{transform:translate(calc(var(--ip-px,0)*1px + 3.6px),calc(var(--ip-py,0)*1px)) scale(var(--ip-ps,1))}}
@keyframes ip-ping{0%{opacity:.8;transform:scale(1)}100%{opacity:0;transform:scale(2.4)}}
html.ilai-paused .ilai-p,html.ilai-paused .ilai-p *{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.ilai-p,.ilai-p *{animation:none!important;transition:none!important}}
/* the character's own line: first person, names what it reviewed */
.ip-line{font-size:14px;line-height:1.4;color:var(--ink-secondary,#51534C);margin:0}
.ip-line b{font-weight:600;color:var(--ink-primary,#1C1B16)}
