/* word-emblem.css — the Word Emblem (GLOSSARY.md, ADR-0126).
 *
 * The emblem is the Pronunciation Popover's own layer, laid behind the Stress
 * Picture, and it is styled only here under the `word-emblem` prefix. Every
 * page that links the popover's stylesheet links this one after it, so the
 * card's room for the emblem — which is the card's own affair, and stays in
 * `word-pronunciation.css` — is settled before the drawing dresses itself.
 *
 * Whole, never half: the drawing is fitted entirely into the room it is given,
 * centred, at the card's height, and is never cropped. One ink at a whisper —
 * the Sample's green at 16 per cent, the rest opacity the prototype settled on
 * (`prototypes/stress-picture-symbols.html`, variant C).
 */

.word-emblem {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--good);
  opacity: 0.16;
}

/* `meet` and not `slice`: the whole drawing, centred in whatever room the
   card has, rather than a crop of it filling the room. */
.word-emblem svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* The stroke is 1.25px at the card's width, not 1.25 of the drawing's units
   blown up with it. Every drawing is authored at 1.25 units in a 200-unit box
   and the box is scaled to about 256px, so a stroke that scaled would land
   near 1.6px and the whole collection would read a shade heavier than the one
   hairline the spec asks for. Told not to scale, it renders at the width it
   is written. */
.word-emblem svg * {
  vector-effect: non-scaling-stroke;
}

/* The Moment (ADR-0126): the emblem's one gesture, held for a beat by the
   class the Emblem Handle puts on the drawing. The gesture itself lives here,
   keyed by the parts' own class names, because what a glass of water does when
   it is struck is a fact about the drawing and not about the card that asked.
   An emblem whose parts carry none of these names simply lifts and settles. */

.word-emblem--moment {
  animation: word-emblem-lift 1s ease-out both;
}

/* 16 per cent at rest, 40 at the top of the lift, then eased back — the
   prototype's variant C, whose rest and lift the spec ships. */
@keyframes word-emblem-lift {
  0% { opacity: 0.16; }
  22% { opacity: 0.4; }
  45% { opacity: 0.4; }
  100% { opacity: 0.16; }
}

/* Water: the surface is struck and two ripples travel out from it. Scaled
   about each ellipse's own middle, so the drawing's coordinates stay the
   drawing's. */
.word-emblem--moment .word-emblem-ripple {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-ripple 0.55s ease-out both;
}

.word-emblem--moment .word-emblem-ripple--outer {
  animation-delay: 0.15s;
}

@keyframes word-emblem-ripple {
  0% { opacity: 0; transform: scale(0.3); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.6); }
}

.word-emblem--moment .word-emblem-surface {
  animation: word-emblem-surface 0.6s ease-out both;
}

@keyframes word-emblem-surface {
  0% { transform: translateY(0); }
  25% { transform: translateY(1.5px); }
  60% { transform: translateY(-0.75px); }
  100% { transform: translateY(0); }
}

/* The pass Moment (#1057). The Sample's Moment is a whisper lifted to a
   murmur; a take that passed is the one beat in this card worth seeing from
   across a room, so it goes to 75 per cent while it is held. Its colour stays
   the Sample's green: the emblem is the word, and the word was said right. */
.word-emblem--moment[data-moment='pass'] {
  animation-name: word-emblem-lift-pass;
}

@keyframes word-emblem-lift-pass {
  0% { opacity: 0.16; }
  22% { opacity: 0.75; }
  45% { opacity: 0.75; }
  100% { opacity: 0.16; }
}

/* The warm glow is the pass Moment's, but only "where a thing lights" (the
   spec): the emblems whose own gesture is a light — the laptop's screen, the
   skyline's windows, the sun's flare, the bolt's flash — say so with
   `word-emblem--lights` on their drawing's root, and the glow follows the
   light that is already there. A glass of water that glowed would be lit by
   nothing. The rest of the collection keeps the 75 per cent and no more.

   On the drawing and not on the whole layer, because the layer's own
   animation is the lift the whole collection shares. */
.word-emblem--moment[data-moment='pass'] svg.word-emblem--lights {
  animation: word-emblem-glow-pass 1s ease-out both;
}

@keyframes word-emblem-glow-pass {
  0% { filter: none; }
  22% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--good) 60%, var(--rubric))); }
  45% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--good) 60%, var(--rubric))); }
  100% { filter: none; }
}

/* The recording pulse (#1057): while the learner's take runs the emblem drops
   below its whisper and breathes, in the Speaking skill's own colour — the
   colour the Try it pill and the recording ring already wear. Never the
   verdict's red: nothing is known yet about how the word sounded. */
.word-emblem--dim {
  color: var(--skill-color, var(--skill-speaking));
  opacity: 0.08;
  animation: word-emblem-pulse 1.6s ease-in-out infinite;
}

@keyframes word-emblem-pulse {
  0% { opacity: 0.08; }
  50% { opacity: 0.2; }
  100% { opacity: 0.08; }
}

/* Motion reduced: no gesture at all. The handle sets this instead, and the
   emblem stays lifted until the card lets go of it at the next rest. */
.word-emblem--lit {
  opacity: 0.4;
}

/* Motion reduced: the pass Moment is as bright, held rather than eased. */
.word-emblem--lit[data-moment='pass'] {
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  /* The pulse drops to a steady dim — the take is still shown as running, it
     simply does not breathe. */
  .word-emblem--dim {
    animation: none;
    opacity: 0.1;
  }

  .word-emblem--moment,
  .word-emblem--moment .word-emblem-ripple,
  .word-emblem--moment .word-emblem-surface {
    animation: none;
  }
}

/* ===== Tier 1 emblems (#1059) ===== */

/* The fifteen remaining tier-1 Moments (ADR-0126, #1053). Each gesture is
   under 700ms and made of the emblem's own parts, keyed by the part class
   names the drawings carry — every one prefixed with its word, so no two
   emblems can ever share a keyframe or a rule. Transforms name their origin
   explicitly: `fill-box` where the part is one shape scaled or nudged about
   its own middle, the drawing's own `view-box` coordinates where a whole
   group turns about a point of the picture (a stalk's root, a planet's
   centre), which `fill-box` could not name. */

/* Food: a bite is taken — the mark is bitten out of the apple's right side
   and the apple flinches. */
.word-emblem--moment .word-emblem-food-apple-bite {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-food-bite 0.6s ease-out both;
}

@keyframes word-emblem-food-bite {
  0% { opacity: 0; transform: translateX(6px) scale(0.6); }
  45% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

.word-emblem--moment .word-emblem-food-apple-body {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-food-flinch 0.6s ease-out both;
}

@keyframes word-emblem-food-flinch {
  0% { transform: translateX(0); }
  40% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* Computer: the screen lights. */
.word-emblem--moment .word-emblem-computer-laptop-screen {
  animation: word-emblem-computer-light 0.6s ease-out both;
}

@keyframes word-emblem-computer-light {
  0% { fill-opacity: 0.18; }
  35% { fill-opacity: 0.6; }
  100% { fill-opacity: 0.18; }
}

/* Ocean: the waves roll, one behind the other. A wave is one period wide, so
   a slide of that period and back reads as travel rather than as a shove. */
.word-emblem--moment .word-emblem-ocean-wave {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-ocean-roll 0.65s ease-in-out both;
}

.word-emblem--moment .word-emblem-ocean-wave-2 { animation-delay: 0.05s; }
.word-emblem--moment .word-emblem-ocean-wave-3 { animation-delay: 0.1s; }

@keyframes word-emblem-ocean-roll {
  0% { transform: translateX(0); }
  50% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

/* Brain: it pulses once, about its own middle in the drawing's coordinates. */
.word-emblem--moment .word-emblem-brain-brain-body {
  transform-box: view-box;
  transform-origin: 100px 61px;
  animation: word-emblem-brain-pulse 0.6s ease-in-out both;
}

@keyframes word-emblem-brain-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

/* Game: a button presses — it sinks and dims for a beat. */
.word-emblem--moment .word-emblem-game-pad-button--a {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-game-press 0.45s ease-out both;
}

@keyframes word-emblem-game-press {
  0% { transform: scale(1); fill-opacity: 0.18; }
  40% { transform: scale(0.7); fill-opacity: 0.55; }
  100% { transform: scale(1); fill-opacity: 0.18; }
}

/* Medicine: the cap pops off and drops back. */
.word-emblem--moment .word-emblem-medicine-bottle-cap {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: word-emblem-medicine-pop 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes word-emblem-medicine-pop {
  0% { transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(-10px) rotate(-8deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* Sleep: the moon rises. */
.word-emblem--moment .word-emblem-sleep-moon {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-sleep-rise 0.7s ease-out both;
}

@keyframes word-emblem-sleep-rise {
  0% { opacity: 0; transform: translateY(12px); }
  55% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Solar: the sun flares — the disc swells a little and the rays reach out. */
.word-emblem--moment .word-emblem-solar-sun {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-solar-flare 0.6s ease-out both;
}

@keyframes word-emblem-solar-flare {
  0% { transform: scale(1); fill-opacity: 0.18; }
  40% { transform: scale(1.12); fill-opacity: 0.5; }
  100% { transform: scale(1); fill-opacity: 0.18; }
}

.word-emblem--moment .word-emblem-solar-sun-rays {
  transform-box: view-box;
  transform-origin: 100px 34px;
  animation: word-emblem-solar-rays 0.6s ease-out both;
}

@keyframes word-emblem-solar-rays {
  0% { transform: scale(0.85); opacity: 0.5; }
  40% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Agriculture: the stalk sways about its root. */
.word-emblem--moment .word-emblem-agriculture-wheat-stalk {
  transform-box: view-box;
  transform-origin: 100px 108px;
  animation: word-emblem-agriculture-sway 0.7s ease-in-out both;
}

@keyframes word-emblem-agriculture-sway {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(6deg); }
  65% { transform: rotate(-4deg); }
  100% { transform: rotate(0deg); }
}

/* Urban: the windows light, one after another, and stay lit for the beat. */
.word-emblem--moment .word-emblem-urban-window {
  animation: word-emblem-urban-light 0.6s ease-out both;
}

.word-emblem--moment .word-emblem-urban-window-2 { animation-delay: 0.05s; }
.word-emblem--moment .word-emblem-urban-window-3 { animation-delay: 0.1s; }
.word-emblem--moment .word-emblem-urban-window-4 { animation-delay: 0.06s; }
.word-emblem--moment .word-emblem-urban-window-5 { animation-delay: 0.12s; }

@keyframes word-emblem-urban-light {
  0% { fill-opacity: 0.18; }
  40% { fill-opacity: 0.75; }
  100% { fill-opacity: 0.5; }
}

/* Nature: three leaves fall clear of the canopy. */
.word-emblem--moment .word-emblem-nature-leaf {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-nature-fall 0.7s ease-in both;
}

.word-emblem--moment .word-emblem-nature-leaf-2 { animation-delay: 0.05s; }
.word-emblem--moment .word-emblem-nature-leaf-3 { animation-delay: 0.1s; }

@keyframes word-emblem-nature-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(14px) rotate(40deg); }
}

/* Sound: the rings go out from the speaker, one after another. */
.word-emblem--moment .word-emblem-sound-ring {
  animation: word-emblem-sound-ring 0.6s ease-out both;
}

.word-emblem--moment .word-emblem-sound-ring-2 { animation-delay: 0.08s; }
.word-emblem--moment .word-emblem-sound-ring-3 { animation-delay: 0.16s; }

@keyframes word-emblem-sound-ring {
  0% { opacity: 0.15; }
  40% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* Space: the ring tilts. It wears its tilt here rather than in the drawing,
   so the gesture is a change of one angle and not a fight with a transform
   attribute the stylesheet would override anyway. */
.word-emblem-space-planet-ring {
  transform-box: view-box;
  transform-origin: 100px 60px;
  transform: rotate(-18deg);
}

.word-emblem--moment .word-emblem-space-planet-ring {
  animation: word-emblem-space-tilt 0.7s ease-in-out both;
}

@keyframes word-emblem-space-tilt {
  0% { transform: rotate(-18deg); }
  50% { transform: rotate(-4deg); }
  100% { transform: rotate(-18deg); }
}

/* Animal: a second print appears beyond the first. */
.word-emblem-animal-paw-second {
  opacity: 0.35;
}

.word-emblem--moment .word-emblem-animal-paw-second {
  transform-box: view-box;
  transform-origin: 134px 60px;
  animation: word-emblem-animal-step 0.6s ease-out both;
}

@keyframes word-emblem-animal-step {
  0% { opacity: 0; transform: scale(0.8); }
  55% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

/* Language: the dots type, left to right. */
.word-emblem--moment .word-emblem-language-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-language-type 0.45s ease-out both;
}

.word-emblem--moment .word-emblem-language-dot-2 { animation-delay: 0.12s; }
.word-emblem--moment .word-emblem-language-dot-3 { animation-delay: 0.24s; }

@keyframes word-emblem-language-type {
  0% { opacity: 0.2; transform: translateY(3px) scale(0.6); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Motion reduced: none of the fifteen gestures runs. The emblem brightens and
   stays, as the handle leaves it, and the parts that wear a resting rule of
   their own (the planet's tilt, the second paw) keep it. */
@media (prefers-reduced-motion: reduce) {
  .word-emblem--moment .word-emblem-food-apple-bite,
  .word-emblem--moment .word-emblem-food-apple-body,
  .word-emblem--moment .word-emblem-computer-laptop-screen,
  .word-emblem--moment .word-emblem-ocean-wave,
  .word-emblem--moment .word-emblem-brain-brain-body,
  .word-emblem--moment .word-emblem-game-pad-button--a,
  .word-emblem--moment .word-emblem-medicine-bottle-cap,
  .word-emblem--moment .word-emblem-sleep-moon,
  .word-emblem--moment .word-emblem-solar-sun,
  .word-emblem--moment .word-emblem-solar-sun-rays,
  .word-emblem--moment .word-emblem-agriculture-wheat-stalk,
  .word-emblem--moment .word-emblem-urban-window,
  .word-emblem--moment .word-emblem-nature-leaf,
  .word-emblem--moment .word-emblem-sound-ring,
  .word-emblem--moment .word-emblem-space-planet-ring,
  .word-emblem--moment .word-emblem-animal-paw-second,
  .word-emblem--moment .word-emblem-language-dot {
    animation: none;
  }
}

/* ===== Tier 2 emblems, last eight (#1061) ===== */

/* Eight Moments, one per emblem, each under 700ms and made of nothing but
   that emblem's own parts (#1053). Part names carry their word, so no two
   emblems can ever key the same rule. Transforms are taken about each part's
   own middle — the drawings' coordinates stay the drawings'. */

/* Economy: the coin turns on its upright axis, flat for an instant at the
   half turn, the way a coin caught in the light does. */
.word-emblem--moment .word-emblem-coin {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-coin-spin 600ms ease-in-out both;
}

@keyframes word-emblem-coin-spin {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(0.06); }
  100% { transform: scaleX(1); }
}

/* Education: the pencil travels its own length and the line appears under it
   as it goes, so the line is written rather than merely shown. */
.word-emblem--moment .word-emblem-pencil {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-pencil-write 600ms ease-in-out both;
}

@keyframes word-emblem-pencil-write {
  0% { transform: translateX(-26px); }
  100% { transform: translateX(0); }
}

.word-emblem--moment .word-emblem-pencil-line {
  animation: word-emblem-pencil-line 600ms ease-in-out both;
}

@keyframes word-emblem-pencil-line {
  0% { stroke-dasharray: 120; stroke-dashoffset: 120; }
  100% { stroke-dasharray: 120; stroke-dashoffset: 0; }
}

/* Communication: the near bubble speaks, then the far one answers — the turn
   passing between them is the whole of the gesture. */
.word-emblem--moment .word-emblem-talk-near {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-talk-turn 320ms ease-out both;
}

.word-emblem--moment .word-emblem-talk-far {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-talk-turn 320ms ease-out 300ms both;
}

@keyframes word-emblem-talk-turn {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-4px) scale(1.07); }
  100% { transform: translateY(0) scale(1); }
}

/* Media: the play head is pressed and the ring rings out past it. */
.word-emblem--moment .word-emblem-play-head {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-play-press 600ms ease-out both;
}

@keyframes word-emblem-play-press {
  0% { transform: scale(1); }
  25% { transform: scale(0.86); }
  100% { transform: scale(1); }
}

.word-emblem--moment .word-emblem-play-halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-play-halo 600ms ease-out both;
}

@keyframes word-emblem-play-halo {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* Music: the note floats up and settles back, lightening as it rises. */
.word-emblem--moment .word-emblem-note {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-note-float 650ms ease-in-out both;
}

@keyframes word-emblem-note-float {
  0% { transform: translateY(0); opacity: 1; }
  55% { transform: translateY(-14px); opacity: 0.65; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Engineering: the gear turns one tooth on and stays there for the beat — a
   quarter of the eight-tooth wheel is 45 degrees. */
.word-emblem--moment .word-emblem-gear {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-gear-turn 650ms ease-in-out both;
}

@keyframes word-emblem-gear-turn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(45deg); }
}

/* Internet: the arcs come out from the dot, near to far. */
.word-emblem--moment .word-emblem-wifi-arc {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: word-emblem-wifi-arc 300ms ease-out both;
}

.word-emblem--moment .word-emblem-wifi-arc--mid {
  animation-delay: 140ms;
}

.word-emblem--moment .word-emblem-wifi-arc--far {
  animation-delay: 280ms;
}

@keyframes word-emblem-wifi-arc {
  0% { opacity: 0; transform: scale(0.72); }
  100% { opacity: 1; transform: scale(1); }
}

/* Library: one book rises out of the row and drops back into its gap. */
.word-emblem--moment .word-emblem-shelf-out {
  transform-box: fill-box;
  transform-origin: center;
  animation: word-emblem-shelf-out 650ms ease-in-out both;
}

@keyframes word-emblem-shelf-out {
  0% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
  100% { transform: translateY(0); }
}

/* Motion reduced: none of the eight gestures runs; the emblem brightens and
   is left where it is, as the spec's reduced-motion rest asks. */
@media (prefers-reduced-motion: reduce) {
  .word-emblem--moment .word-emblem-coin,
  .word-emblem--moment .word-emblem-pencil,
  .word-emblem--moment .word-emblem-pencil-line,
  .word-emblem--moment .word-emblem-talk-near,
  .word-emblem--moment .word-emblem-talk-far,
  .word-emblem--moment .word-emblem-play-head,
  .word-emblem--moment .word-emblem-play-halo,
  .word-emblem--moment .word-emblem-note,
  .word-emblem--moment .word-emblem-gear,
  .word-emblem--moment .word-emblem-wifi-arc,
  .word-emblem--moment .word-emblem-shelf-out {
    animation: none;
  }
}

/* ===== Tier 2 emblems, first nine (#1060) ===== */
/* Nine gestures, each made of its own emblem's parts and each under 700ms —
 * well inside the second the lift is held, so the drawing is back at rest
 * before the brightening eases off. Part classes are prefixed with the thing
 * they belong to, so no two emblems can ever key the same name. Transforms
 * are taken about each part's own middle (`transform-box: fill-box`), so the
 * drawings' coordinates stay the drawings'.
 */

.word-emblem--moment .word-emblem-flask-bubble,
.word-emblem--moment .word-emblem-cap-board,
.word-emblem--moment .word-emblem-globe-meridian,
.word-emblem--moment .word-emblem-lens-glass,
.word-emblem--moment .word-emblem-book-leaf,
.word-emblem--moment .word-emblem-bar,
.word-emblem--moment .word-emblem-leaf-blade,
.word-emblem--moment .word-emblem-leaf-veins,
.word-emblem--moment .word-emblem-bolt-body,
.word-emblem--moment .word-emblem-bolt-spark,
.word-emblem--moment .word-emblem-scope-chest,
.word-emblem--moment .word-emblem-scope-chest-inner,
.word-emblem--moment .word-emblem-scope-beat {
  transform-box: fill-box;
  transform-origin: center;
}

/* Science: the flask bubbles — three bubbles rise out of the liquid and go,
   each a beat behind the last. */
.word-emblem--moment .word-emblem-flask-bubble {
  animation: word-emblem-flask-bubble 0.6s ease-out both;
}

.word-emblem--moment .word-emblem-flask-bubble--b { animation-delay: 0.06s; }
.word-emblem--moment .word-emblem-flask-bubble--c { animation-delay: 0.12s; }

@keyframes word-emblem-flask-bubble {
  0% { opacity: 0.2; transform: translateY(8px) scale(0.5); }
  35% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(1.1); }
}

/* University: the mortarboard is tossed — up off the crown, with a turn, and
   caught again. */
.word-emblem--moment .word-emblem-cap-board {
  animation: word-emblem-cap-toss 0.65s ease-out both;
}

@keyframes word-emblem-cap-toss {
  0% { transform: translateY(0) rotate(0deg); }
  45% { transform: translateY(-14px) rotate(-8deg); }
  75% { transform: translateY(-4px) rotate(4deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* Global: the globe turns — the meridians narrow and widen in turn, which is
   what a sphere's lines of longitude do as it spins. */
.word-emblem--moment .word-emblem-globe-meridian--a {
  animation: word-emblem-globe-turn-a 0.68s ease-in-out both;
}

.word-emblem--moment .word-emblem-globe-meridian--b {
  animation: word-emblem-globe-turn-b 0.68s ease-in-out both;
}

@keyframes word-emblem-globe-turn-a {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(2.1); }
  100% { transform: scaleX(1); }
}

@keyframes word-emblem-globe-turn-b {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(0.25); }
  100% { transform: scaleX(1); }
}

/* Research: the glass sweeps — across and back, the way a thing is looked
   for rather than looked at. */
.word-emblem--moment .word-emblem-lens-glass {
  animation: word-emblem-lens-sweep 0.68s ease-in-out both;
}

@keyframes word-emblem-lens-sweep {
  0% { transform: translate(0, 0) rotate(0deg); }
  30% { transform: translate(-12px, 4px) rotate(-6deg); }
  70% { transform: translate(12px, -4px) rotate(6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Study: a page turns — the loose leaf folds over the spine and settles back
   on the right-hand page. Scaled about the spine, the leaf's own left edge. */
.word-emblem--moment .word-emblem-book-leaf {
  transform-box: fill-box;
  transform-origin: left center;
  animation: word-emblem-book-leaf 0.68s ease-in-out both;
}

@keyframes word-emblem-book-leaf {
  0% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.04); opacity: 0.5; }
  100% { transform: scaleX(1); opacity: 1; }
}

/* Data: the bars rise — from the axis up, left to right, each a beat behind
   the last. Scaled about each bar's foot so they grow out of the baseline. */
.word-emblem--moment .word-emblem-bar {
  transform-origin: bottom;
  animation: word-emblem-bar-rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.word-emblem--moment .word-emblem-bar--b { animation-delay: 0.04s; }
.word-emblem--moment .word-emblem-bar--c { animation-delay: 0.08s; }
.word-emblem--moment .word-emblem-bar--d { animation-delay: 0.12s; }

@keyframes word-emblem-bar-rise {
  0% { transform: scaleY(0.06); }
  60% { transform: scaleY(1.06); }
  100% { transform: scaleY(1); }
}

/* Environment: the leaf unfurls — the blade opens out from the stem it is
   folded against, and the veins come with it. */
.word-emblem--moment .word-emblem-leaf-blade,
.word-emblem--moment .word-emblem-leaf-veins {
  animation: word-emblem-leaf-unfurl 0.65s ease-out both;
}

.word-emblem--moment .word-emblem-leaf-veins { animation-delay: 0.08s; }

@keyframes word-emblem-leaf-unfurl {
  0% { transform: scaleX(0.1) scaleY(0.8); opacity: 0.3; }
  70% { transform: scaleX(1.06) scaleY(1.02); opacity: 1; }
  100% { transform: scaleX(1) scaleY(1); opacity: 1; }
}

/* At rest neither the bolt's sparks nor the heartbeat's ring are there: they
   are thrown by the Moment and are gone again with it, so the emblem's
   resting look is the bolt alone and the stethoscope alone. */
.word-emblem-bolt-spark,
.word-emblem-scope-beat {
  opacity: 0;
}

/* Energy: the bolt flashes — one hard blink of the bolt with the sparks
   thrown outward around it. */
.word-emblem--moment .word-emblem-bolt-body {
  animation: word-emblem-bolt-flash 0.55s ease-out both;
}

.word-emblem--moment .word-emblem-bolt-spark {
  animation: word-emblem-bolt-spark 0.55s ease-out both;
}

@keyframes word-emblem-bolt-flash {
  0% { transform: scale(1); }
  25% { transform: scale(1.12); }
  55% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

@keyframes word-emblem-bolt-spark {
  0% { opacity: 0; transform: scale(0.6); }
  30% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* Health: a heartbeat — the chest piece gives one double beat and a ring
   travels out from it, which is the sound the thing is held there to hear. */
.word-emblem--moment .word-emblem-scope-chest,
.word-emblem--moment .word-emblem-scope-chest-inner {
  animation: word-emblem-scope-beat 0.66s ease-out both;
}

.word-emblem--moment .word-emblem-scope-beat {
  animation: word-emblem-scope-ring 0.66s ease-out both;
}

@keyframes word-emblem-scope-beat {
  0% { transform: scale(1); }
  18% { transform: scale(1.16); }
  36% { transform: scale(1); }
  54% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

@keyframes word-emblem-scope-ring {
  0% { opacity: 0; transform: scale(0.5); }
  25% { opacity: 0.9; }
  100% { opacity: 0; transform: scale(1.5); }
}

/* Motion reduced: none of the nine gestures run. The emblem still brightens
   and stays, which the handle does with `.word-emblem--lit`. */
@media (prefers-reduced-motion: reduce) {
  .word-emblem--moment .word-emblem-flask-bubble,
  .word-emblem--moment .word-emblem-cap-board,
  .word-emblem--moment .word-emblem-globe-meridian,
  .word-emblem--moment .word-emblem-lens-glass,
  .word-emblem--moment .word-emblem-book-leaf,
  .word-emblem--moment .word-emblem-bar,
  .word-emblem--moment .word-emblem-leaf-blade,
  .word-emblem--moment .word-emblem-leaf-veins,
  .word-emblem--moment .word-emblem-bolt-body,
  .word-emblem--moment .word-emblem-bolt-spark,
  .word-emblem--moment .word-emblem-scope-chest,
  .word-emblem--moment .word-emblem-scope-chest-inner,
  .word-emblem--moment .word-emblem-scope-beat {
    animation: none;
  }
}
