/* Kuru 02 try a Kuru question: on cream paper, five stepping stones say how every question works; below them an open
   maths notebook. The left page asks (Amma's tiffin boxes and idlis), holds the answers and Kuru's replies; the right
   page is Kuru's: Kuru in a cream paper window at the top, his speech bubble, and the hint ladder, folded slips that open
   one small step at a time. Kuru reacts with his loops (think, cheer, wave), or changes pose as a still (02-try.js). */

.kt__head { max-width: 46rem; }
.kt__lead { margin-top: clamp(12px, 1.4vw, 18px); max-width: 32em; font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); }

/* how a question works: five paper stepping stones on a dotted hop trail, the step painted on each stone and its words
   under it; Kuru hops from stone to stone (_path.js), taking each step's pose. Kuru's feet stand on the back of a
   stone's top, so the painted number in front stays visible. Without scripting or with reduced motion Kuru simply
   stands on the last stone, cheering, and the trail is not drawn (no script) or drawn still. */
.kt-path { --kuru-w: clamp(104px, 9vw, 132px); --stone-w: clamp(118px, 10.6vw, 154px); --hop: 34px;
  position: relative; margin: clamp(16px, 2vw, 28px) 0 clamp(48px, 5.4vw, 76px); padding-top: calc(var(--kuru-w) * .92 + var(--hop)); }
.kt__how { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 24px); }
.kt-step { --dip: 0px; position: relative; display: grid; justify-items: center; align-content: start; gap: 5px; text-align: center; }
.kt-step:nth-child(2) { --dip: 16px; }
.kt-step:nth-child(3) { --dip: 4px; }
.kt-step:nth-child(4) { --dip: 20px; }
.kt-step:nth-child(5) { --dip: 8px; }
/* the stone's own box is a fixed height for every step, so the words under the five stones line up */
.kt-step__stone { position: relative; display: block; width: var(--stone-w); height: calc(var(--stone-w) * .42 + 22px); margin-bottom: 6px; }
.kt-step__rock { position: absolute; left: 0; top: var(--dip); display: block; width: 100%; height: auto; max-width: none; transition: translate 160ms steps(2, end); }
/* the number, painted on the front of the stone's top */
.kt-step__n { position: absolute; left: 50%; top: calc(var(--dip) + var(--stone-w) * .118); translate: -50% 0; font: 800 calc(var(--stone-w) * .2)/1 var(--font-display);
  color: var(--n, #1E3F8A); text-shadow: 0 1px 0 rgba(255, 255, 255, .55); pointer-events: none; transition: translate 160ms steps(2, end); }
.kt-step:nth-child(1) { --n: #234C9E; --k: #8FB2F2; }
.kt-step:nth-child(2) { --n: #1E6B42; --k: #7FCB8F; }
.kt-step:nth-child(3) { --n: #7A5208; --k: var(--sun); }
.kt-step:nth-child(4) { --n: #8A2B4A; --k: #FF9AB0; }
.kt-step:nth-child(5) { --n: #7A3E04; --k: var(--sun-deep); }
.kt-step__t { font: 800 clamp(18px, 1.5vw, 21px)/1.2 var(--font-display); color: var(--ink); text-wrap: balance; }
.kt-step__d { max-width: 15em; font: 650 16.5px/1.42 var(--font-body); color: var(--ink-2); text-wrap: pretty; }
/* the step Kuru stands on: its title gets a highlighter swipe in the stone's colour; a stone sinks a little as he lands */
.kt-step__t span { background: linear-gradient(var(--k), var(--k)) no-repeat 0 92% / 0% .26em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size 330ms steps(4, end); }
.kt-step.is-here .kt-step__t span { background-size: 100% .26em; }
.kt-step.is-land .kt-step__rock, .kt-step.is-land .kt-step__n { translate: 0 3px; transition-duration: 0ms; }
.kt-step.is-land .kt-step__n { translate: -50% 3px; }

/* the dotted hop trail (drawn by _path.js from the stones' real positions) */
.kt-path__trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.kt-path__trail path { fill: none; stroke: rgba(30, 42, 90, .3); stroke-width: 3; stroke-linecap: round; stroke-dasharray: .1 11; }
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .kt-path.b-ready .kt-path__trail { opacity: 0; transition: opacity 500ms steps(3, end) 450ms; }
  html.js:not(.rm) .kt-path.b-played .kt-path__trail { opacity: 1; }
}

/* Kuru: six poses stacked, one shown; the box's bottom centre is his feet. By default (no script, reduced motion) he
   stands on the last stone; the script moves him onto the path and hops him along it. */
.kt-hop { position: absolute; z-index: 2; left: 50%; top: calc(var(--dip) + var(--stone-w) * .1); width: var(--kuru-w); aspect-ratio: 160 / 213;
  translate: -50% -100%; pointer-events: none; }
.kt-hop.is-free { left: 0; top: 0; translate: none; will-change: transform; }
.kt-hop__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; }
.kt-hop[data-pose="sit"] [data-p="sit"], .kt-hop[data-pose="hello"] [data-p="hello"], .kt-hop[data-pose="try"] [data-p="try"],
.kt-hop[data-pose="point"] [data-p="point"], .kt-hop[data-pose="think"] [data-p="think"], .kt-hop[data-pose="cheer"] [data-p="cheer"] { opacity: 1; }
.kt-hop.is-free { transform-origin: 50% 100%; }
.kt-hop.is-wait { opacity: 0; }

/* phones: the path runs down the page, the stones zig and zag a little on the left, the words beside them */
@media (max-width: 699.98px) {
  .kt-path { --kuru-w: 70px; --stone-w: 96px; --hop: 22px; padding-top: 34px; }
  .kt__how { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kt-step { --dip: 0px; grid-template-columns: 124px minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; justify-items: start; column-gap: 8px; row-gap: 3px;
    min-height: 106px; text-align: left; }
  .kt-step:nth-child(n) { --dip: 0px; }
  .kt-step:nth-child(even) .kt-step__stone { margin-left: 26px; }
  .kt-step__stone { grid-row: 1 / -1; align-self: center; height: calc(var(--stone-w) * .42 + 4px); margin: 14px 0 0; }
  .kt-step__n { top: calc(var(--stone-w) * .085); font-size: 21px; }
  .kt-step__t { grid-row: 2; }
  .kt-step__d { grid-row: 3; max-width: none; }
  .kt-step__t { font-size: 19px; }
}

/* Kuru's corner of the right page: a cream paper window (his stills are painted on that cream) and his bubble */
.kt__kuru { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: end; gap: 10px; margin: 0 0 22px; }
.kt__window { position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 4 / 5; border-radius: 50% 50% 14px 16px / 30% 30% 14px 16px; background: #FFF4E4;
  box-shadow: inset 0 4px 12px rgba(90, 42, 0, .22), inset 0 0 0 4px rgba(255, 255, 255, .5), 0 1px 1px rgba(90, 42, 0, .25), 0 10px 18px -10px rgba(90, 42, 0, .45); rotate: -1.5deg; }
/* the stage frame (.ku__fig) a little wider than the window: Kuru fills it, and his cheer's cap and confetti still show */
.ku__fig.kt__fig { position: absolute; left: 50%; bottom: -3%; width: 124%; translate: -50% 0; cursor: pointer; }
.ku__bubble { position: relative; align-self: center; width: fit-content; max-width: 100%; font: 800 19px/1.3 var(--font-display);
  border-radius: 1.1em 1.25em 1.15em .3em / 1.2em 1.1em 1.25em .3em; }
.ku__bubble::after { left: -.55em; }

/* ---------- The notebook */
.ku-book { --line: rgba(35, 70, 198, .085); position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-radius: 18px 24px 22px 16px / 16px 22px 24px 18px; color: var(--ink);
  background: linear-gradient(90deg, transparent calc(50% - 26px), rgba(90, 42, 0, .07) calc(50% - 4px), rgba(90, 42, 0, .14) 50%, rgba(90, 42, 0, .06) calc(50% + 6px), transparent calc(50% + 30px)),
    var(--card) url(/assets/art/textures/paper-tile.webp) 0 0 / 512px 512px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 1px 1.5px rgba(90, 42, 0, .32), 0 26px 46px -22px rgba(90, 42, 0, .55), 0 0 0 7px #E9C893, 0 0 0 8px rgba(90, 42, 0, .18); }
.ku-book__page { position: relative; min-width: 0; padding: clamp(26px, 3vw, 40px) clamp(22px, 3vw, 44px) 28px clamp(52px, 5vw, 72px);
  background: repeating-linear-gradient(transparent 0 33px, var(--line) 33px 35px) 0 66px / 100% 100% no-repeat; }
.ku-book__page::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(36px, 3.6vw, 52px); width: 2px; background: rgba(229, 99, 90, .45); }
.ku-book__page--right { padding-left: clamp(30px, 4vw, 56px); }
.ku-book__page--right::before { display: none; }
.ku-book__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ku-std { background: var(--lemon); color: #7A4A10; }
.ku-q { margin-top: 22px; font: 800 clamp(23px, 2.15vw, 30px)/1.35 var(--font-display); letter-spacing: -.005em; outline-offset: 6px; text-wrap: pretty; }
.ku-u { position: relative; white-space: nowrap; }
.ku-u__mark { position: absolute; left: -2%; right: -2%; bottom: -.02em; height: .34em; overflow: clip; pointer-events: none; }
.ku-u__mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ku-u__mark path { fill: none; stroke: #47506E; stroke-width: 2.6; stroke-linecap: round; opacity: .8; }
.ku-choose { margin-top: 26px; font: 800 15.5px/1.2 var(--font-body); letter-spacing: .02em; color: var(--ink-2); }
.ku-answers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.ku-ans { position: relative; display: grid; place-items: center; min-height: 72px; padding: 6px; border: 0; color: var(--ink); font: 800 32px/1 var(--font-display);
  background: var(--card); border-radius: 14px 17px 15px 13px / 16px 13px 17px 15px;
  box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .13), 0 1px 1px rgba(90, 42, 0, .22), 0 6px 10px -7px rgba(90, 42, 0, .45);
  transition: transform var(--m-quick, 200ms) var(--m-settle, ease), background-color var(--m-quick, 200ms) var(--m-settle, ease); }
@media (hover: hover) and (pointer: fine) { .ku-ans:not([aria-disabled="true"]):hover { background: #FFFFFF; } }
.ku-ans:not([aria-disabled="true"]):active { transform: translateY(1px) scale(.97); transition-duration: var(--m-press, 100ms); }
.ku-ans[aria-disabled="true"] { cursor: default; }
.ku-ans.is-wrong { color: rgba(30, 42, 90, .5); background: rgba(255, 253, 248, .6); box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .1); }
.ku-ans.is-right { background: var(--mint); box-shadow: inset 0 0 0 2.5px #3E9A55, 0 1px 1px rgba(90, 42, 0, .25), 0 8px 12px -8px rgba(90, 42, 0, .45); }
.ku-ans .pk-mark { position: absolute; right: -8px; top: -8px; --pk-mark-size: 28px; }
.ku-cross { position: absolute; inset: 10% 14%; width: 72%; height: 80%; pointer-events: none; overflow: visible; }
.ku-cross path { fill: none; stroke: #4A5068; stroke-width: 3.2; stroke-linecap: round; opacity: .72; }
.ku-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.ku-actions[hidden] { display: none; }
.ku-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px; border: 0; color: var(--ink); font: 800 17px/1 var(--font-body);
  border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 2px rgba(30, 42, 90, .14);
  transition: transform var(--m-press, 100ms) var(--m-settle, ease), background-color var(--m-quick, 200ms) var(--m-settle, ease); }
.ku-btn--hint { background: var(--lemon); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 1px rgba(90, 42, 0, .3), 0 6px 10px -7px rgba(90, 42, 0, .5); }
@media (hover: hover) and (pointer: fine) { .ku-btn:hover { background: #FFFFFF; } .ku-btn--hint:hover { background: #FFEBA6; } }
.ku-btn:active { transform: scale(.97); }
.ku-btn[hidden] { display: none; }
.ku-btn--go { background: var(--blue); color: #FFFFFF; box-shadow: 0 1px 1px rgba(11, 26, 85, .4), 0 8px 14px -8px rgba(11, 26, 85, .6); }
@media (hover: hover) and (pointer: fine) { .ku-btn--go:hover { background: var(--blue-deep); } }
/* stepping stones: one fills for each hint used */
.ku-stones { display: inline-flex; gap: 4px; }
.ku-stones i { width: 10px; height: 8px; border-radius: 50% 50% 45% 55% / 60% 55% 45% 40%; background: rgba(90, 42, 0, .18); }
.ku-stones i.is-on { background: var(--sun-deep); box-shadow: 0 1px 0 rgba(90, 42, 0, .3); }
.ku-stones i[hidden] { display: none; }

/* Kuru's replies on the left page */
.ku-feed { display: grid; gap: 12px; margin-top: 22px; }
.ku-feed[hidden] { display: none; }
.ku-note { font: 600 18px/1.5 var(--font-body); color: var(--ink); }
.ku-note b { display: block; font: 800 20px/1.3 var(--font-display); color: #A0520E; }
.ku-note--right b { color: #1F6B3A; font-size: 22px; }
.ku-feed .ku-btn--go { justify-self: start; }
.ku-work { position: relative; padding: 14px 18px 15px; font: 700 18px/1.5 var(--font-display); color: #3D4460; rotate: -.4deg;
  background: var(--lemon); border-radius: 10px 14px 12px 9px / 12px 9px 14px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 1px rgba(90, 42, 0, .22), 0 8px 14px -10px rgba(90, 42, 0, .5); }
.ku-how { display: grid; gap: 10px; }
.ku-how p { font: 800 19px/1.3 var(--font-display); }
.ku-how__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ku-opt { min-height: 46px; padding: 0 16px; border: 0; border-radius: 12px 14px 13px 11px / 13px 11px 14px 12px; background: var(--sky); color: var(--blue-deep);
  font: 800 16.5px/1.1 var(--font-body); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 1px rgba(90, 42, 0, .2);
  transition: transform var(--m-press, 100ms) var(--m-settle, ease), background-color var(--m-quick, 200ms) var(--m-settle, ease); }
@media (hover: hover) and (pointer: fine) { .ku-opt:not([aria-disabled="true"]):hover { background: #C4DAFF; } }
.ku-opt:not([aria-disabled="true"]):active { transform: scale(.97); }
.ku-opt[aria-pressed="true"] { background: var(--blue); color: #FFFFFF; }
.ku-opt[aria-disabled="true"]:not([aria-pressed="true"]) { opacity: .55; cursor: default; }

/* the hint ladder on the right page: folded slips stepping down, one opens per hint */
.ku-ladder { display: grid; gap: 10px; counter-reset: none; }
.ku-hint { --step: 0; position: relative; margin-left: calc(var(--step) * 14px); padding: 13px 44px 13px 16px; border-radius: 10px 4px 12px 9px / 12px 4px 13px 10px;
  background: var(--kraft); color: var(--ink);
  rotate: var(--tilt, 0deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 1px rgba(90, 42, 0, .22), 0 6px 10px -7px rgba(90, 42, 0, .45); }
/* a folded-down corner on a closed slip */
.ku-hint::after { content: ""; position: absolute; right: 0; top: 0; width: 22px; height: 22px; border-radius: 0 4px 0 6px;
  background: linear-gradient(225deg, var(--card) 50%, #F6E6C8 50%); box-shadow: -1px 1px 2px rgba(90, 42, 0, .18); }
.ku-hint:nth-child(1) { --tilt: -.5deg; } .ku-hint:nth-child(2) { --tilt: .4deg; } .ku-hint:nth-child(3) { --tilt: -.3deg; } .ku-hint:nth-child(4) { --tilt: .5deg; }
.ku-hint__label { font: 800 15.5px/1.2 var(--font-body); letter-spacing: .02em; color: #57391A; }
.ku-hint__text, .ku-hint .ku-model { display: none; }
.ku-hint.is-open { padding-right: 18px; background: var(--card); color: var(--ink); rotate: 0deg; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 1px 1.5px rgba(90, 42, 0, .28), 0 10px 18px -12px rgba(90, 42, 0, .5); }
.ku-hint.is-open::after { display: none; }
.ku-hint.is-open .ku-hint__label { color: #A0520E; }
.ku-hint.is-open .ku-hint__text { display: block; margin-top: 6px; font: 700 18px/1.45 var(--font-body); }
.ku-hint.is-open .ku-model { display: flex; }
.ku-hint.is-latest { background: #FFFFFF; box-shadow: inset 0 0 0 2.5px var(--sun), 0 1px 1.5px rgba(90, 42, 0, .28), 0 12px 20px -12px rgba(90, 42, 0, .55); }
/* the picture: tiffin boxes with idlis (kit .pk-tiffin), lit one by one for hint 3, the last one glowing for hint 4 */
.ku-model { flex-wrap: wrap; align-items: flex-start; gap: 14px 16px; margin-top: 12px; font-size: 21px; }
.ku-box { position: relative; display: grid; justify-items: center; gap: 6px; }
.ku-box::before { content: ""; position: absolute; left: 50%; top: 32%; width: 3.4em; height: 3.4em; margin: -1.7em 0 0 -1.7em; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 203, 61, .85), rgba(255, 203, 61, 0)); opacity: 0; transform: scale(.6);
  transition: opacity var(--m-small, 400ms) steps(3, end), transform var(--m-small, 400ms) steps(3, end); }
.ku-box.is-lit::before { opacity: .75; transform: none; }
.ku-box.is-glow::before { opacity: 1; transform: scale(1.18); background: radial-gradient(closest-side, rgba(255, 143, 31, .75), rgba(255, 203, 61, 0)); }
.ku-box .pk-tiffin { isolation: isolate; }
.ku-box__n { min-height: 1.1em; font: 800 .82em/1 var(--font-display); color: #A0520E; }
.ku-sum { align-self: center; font: 800 .82em/1 var(--font-display); color: #A0520E; padding: 4px 10px; border-radius: 8px; background: rgba(255, 226, 138, .6); }

.ku-book__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding: 18px 24px 22px;
  border-top: 1.5px dashed rgba(90, 42, 0, .18); font: 700 16.5px/1.45 var(--font-body); color: var(--ink-2); text-align: center; }
.ku-book__foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--blue); text-decoration: underline; text-underline-offset: .18em; }

/* no scripting: the question and a closed "See how Kuru explains it" */
.ku-nojs { display: none; margin-top: 22px; }
.ku-nojs summary { cursor: pointer; font: 800 17px/1.3 var(--font-body); color: var(--blue); }
.ku-nojs ol { display: grid; gap: 8px; margin: 14px 0; padding-left: 0; }
@media (scripting: none) {
  .ku-js { display: none !important; }
  .ku-nojs { display: block; }
  .ku-book { grid-template-columns: minmax(0, 1fr); background: var(--card) url(/assets/art/textures/paper-tile.webp) 0 0 / 512px 512px; }
}

/* ---------- Narrower */
@media (max-width: 899.98px) {
  .ku-book { grid-template-columns: minmax(0, 1fr); background: var(--card) url(/assets/art/textures/paper-tile.webp) 0 0 / 512px 512px; }
  .ku-book__page--right { padding-top: 0; padding-left: clamp(52px, 5vw, 72px); background: none; }
  .kt__kuru { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  .ku-book__page--left { padding-bottom: 18px; }
}
@media (max-width: 599.98px) {
  .ku-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ku-ans { min-height: 64px; font-size: 28px; }
  .ku-book__page { padding-left: 46px; padding-right: 18px; }
  .ku-book__page::before { left: 30px; }
  .ku-book__page--right { padding-left: 46px; }
  .kt__kuru { grid-template-columns: minmax(0, 132px) minmax(0, 1fr); }
  .ku__bubble { font-size: 16.5px; }
  .ku-hint { margin-left: 0; }
  .ku-model { font-size: 17px; }
}

/* ---------- Motion (on twos for paper; springs and short settles for UI). Pre-states only once 07-kuru.js marked the section. */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .ku [data-b].b-wait:not(.b-in) { opacity: 0; }
  .ku [data-b].b-in { animation: var(--b-anim) var(--b-dur, 500ms) steps(1, end) var(--b-at, 0ms) both; }
  .ku [data-b="book"] { --b-anim: ku-drop; }
  .ku [data-b="stone"] { --b-anim: ku-stone; --b-dur: 420ms; }
  .ku__bubble.is-new { animation: ku-say 330ms steps(1, end); }
  .ku-hint.is-opening { transform-origin: 50% 0; animation: ku-unfold 640ms linear both; }
  .ku-feed > .is-new { animation: ku-in 400ms var(--m-settle, ease) both; }
  .ku-u__mark.is-draw { animation: ku-clip 500ms steps(6, end) both; }
  .ku-u__mark.is-draw svg { animation: ku-clip-in 500ms steps(6, end) both; }
  .ku-cross.is-draw { animation: ku-cross 330ms steps(1, end) both; }
}
@keyframes ku-stone { 0% { opacity: 0; transform: translateY(14px) scale(.94); } 20% { opacity: 1; transform: translateY(-4px) scale(1.03); } 40% { transform: translateY(1px) scale(.99); } 60%, 100% { opacity: 1; transform: none; } }
@keyframes ku-hop {
  0% { opacity: 0; transform: translateY(-34%) scale(.96, 1.05); }
  12.5% { opacity: 1; transform: translateY(-20%) scale(.97, 1.04); }
  25% { transform: translateY(-8%) scale(.99, 1.02); }
  37.5% { transform: translateY(0) scale(1.07, .9); }
  50% { transform: translateY(-3%) scale(.98, 1.03); }
  62.5% { transform: translateY(0) scale(1.02, .98); }
  75%, 100% { opacity: 1; transform: none; }
}
@keyframes ku-drop {
  0% { opacity: 0; transform: translateY(-22px) rotate(-.8deg) scale(1.02); }
  16.67% { opacity: 1; transform: translateY(-11px) rotate(-.45deg) scale(1.01); }
  33.33% { transform: translateY(-4px) rotate(-.15deg) scale(1.003); }
  50% { transform: translateY(-1px); }
  66.67%, 100% { opacity: 1; transform: none; }
}
@keyframes ku-stick {
  0% { opacity: 0; transform: translate(10px, -16px) rotate(6deg) scale(1.06); }
  20% { opacity: 1; transform: translate(4px, -7px) rotate(3deg) scale(1.03); }
  40% { transform: translate(1px, -2px) rotate(1deg) scale(1.01); }
  60%, 100% { opacity: 1; transform: none; }
}
@keyframes ku-wave {
  0% { transform: rotate(0deg); } 8.33% { transform: rotate(-3.5deg); } 16.67% { transform: rotate(2.5deg); } 25% { transform: rotate(-3deg); }
  33.33% { transform: rotate(2deg); } 41.67% { transform: rotate(-1.5deg); } 50%, 100% { transform: none; }
}
@keyframes ku-pop { 0% { opacity: 0; transform: translateY(14%) scale(.6); } 16.67% { opacity: 1; transform: translateY(6%) scale(.86); } 33.33% { transform: translateY(-3%) scale(1.06); } 50%, 100% { opacity: 1; transform: none; } }
@keyframes ku-say { 0% { transform: scale(.82) rotate(-3deg); opacity: 0; } 25% { transform: scale(1.04) rotate(1deg); opacity: 1; } 50%, 100% { transform: none; opacity: 1; } }
@keyframes ku-unfold { 0% { opacity: .3; transform: perspective(700px) rotateX(-78deg); animation-timing-function: var(--pm-glide, ease-out); } 58% { opacity: 1; transform: perspective(700px) rotateX(6deg); animation-timing-function: var(--pm-spring, ease-out); } 100% { opacity: 1; transform: none; } }
@keyframes ku-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ku-clip { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes ku-clip-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes ku-cross { 0% { opacity: 0; transform: scale(1.25) rotate(-6deg); } 25% { opacity: 1; transform: scale(1.06) rotate(-2deg); } 50%, 100% { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ku [data-b], .ku__bubble, .ku-hint, .ku-feed > *, .ku-u__mark, .ku-u__mark svg, .ku-cross { animation: none !important; opacity: 1; transform: none; }
  .kt-step__t, .kt-step__rock, .kt-step__n { transition: none; }
  .ku-ans, .ku-btn, .ku-opt, .ku-box::before { transition: none; }
}
@media (prefers-contrast: more) {
  .ku-ans, .ku-hint, .ku-btn, .ku-opt { box-shadow: inset 0 0 0 2px var(--ink); }
  .ku-hint__label { color: var(--ink); }
}
@media (forced-colors: active) {
  .ku-ans, .ku-btn, .ku-opt, .ku-hint { border: 1px solid ButtonText; }
  .ku-ans.is-right { outline: 3px solid Highlight; }
}

/* R6 (9 Nov): full-body felt Kuru in the hop and in the book window */
.kt-hop { aspect-ratio: 160 / 213; }
.kt-hop__img { object-fit: contain; object-position: 50% 100%; -webkit-mask-image: none; mask-image: none; }
.ku__fig.kt__fig { width: 90%; bottom: 0; }
.kt__fig .ku__still { width: 100%; height: auto; object-fit: contain; object-position: 50% 100%; -webkit-mask-image: none; mask-image: none; }

/* R6 motion: the question is chalked up: it fades in as the book opens and a puff of chalk dust drifts off its first words (CSS only) */
.ku-q { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .ku-book.b-in .ku-q { animation: ku-chalk-in 800ms var(--pm-glide, ease-out) calc(var(--b-at, 0ms) + 520ms) backwards; }
  html.js:not(.rm) .ku-book.b-in .ku-q::after { content: ""; position: absolute; left: -.2em; top: -.1em; width: 6em; height: 2.2em; pointer-events: none; transform-origin: 20% 60%;
    background: radial-gradient(closest-side at 22% 60%, rgba(120, 132, 170, .5), transparent 70%), radial-gradient(closest-side at 52% 40%, rgba(120, 132, 170, .38), transparent 70%), radial-gradient(closest-side at 78% 66%, rgba(120, 132, 170, .3), transparent 70%);
    animation: ku-dust 1300ms ease-out calc(var(--b-at, 0ms) + 620ms) both; }
}
@keyframes ku-chalk-in { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
@keyframes ku-dust { 0% { opacity: 0; transform: translate(0, 4px) scale(.3); } 22% { opacity: 1; } 100% { opacity: 0; transform: translate(26px, -16px) scale(1.7); } }

/* R6: Kuru is a 12-frame felt sprite (Flow sheet keyed in tools/sheet_key.py): 0 stand, 1 step, 2 push-off, 3 rising, 4 up,
   5 flap, 6 landing squash, 7 bounce, 8 wink, 9 wave, 10 cheer, 11 stand. The script sets the frame while he hops; without it
   the pose attribute picks a still frame. */
.kt-hop__sprite { position: absolute; inset: 0; background: url(/assets/cast/mascots/kuru-jump.webp) 0 0 / 400% 300% no-repeat; image-rendering: auto; }
.kt-hop[data-pose="hello"] .kt-hop__sprite { background-position: 33.3333% 100%; }
.kt-hop[data-pose="sit"] .kt-hop__sprite { background-position: 0 0; }
.kt-hop[data-pose="try"] .kt-hop__sprite { background-position: 0 100%; }
.kt-hop[data-pose="point"] .kt-hop__sprite { background-position: 100% 100%; }
.kt-hop[data-pose="think"] .kt-hop__sprite { background-position: 33.3333% 0; }
.kt-hop[data-pose="cheer"] .kt-hop__sprite { background-position: 66.6667% 100%; }
