/* The AgentGuru video, round 6 (12 Oct 2026): the list. One stage, nine beats. The player adds
   .at-1 ... .at-9 as the beats arrive and keeps them, so a rule on .at-N means "from this beat on"
   and a later beat's rule overrides an earlier one. Rules on [data-beat="N"] hold for that beat only
   (poses, focus). Sizes are in container units so the stage scales as one picture.
   1 the list writes itself  2 it never ends  3 the hat, the lights, the agents  4 Pea  5 Dickens
   6 Beagle  7 your call  8 the list ends  9 the end card */

@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }

.reel { position: relative; z-index: 1; }
.reel-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 30px; overflow: hidden; container-type: inline-size; background: #0d0c0b; box-shadow: 0 0 0 1px rgba(242, 181, 68, .22), 0 50px 120px -40px rgba(217, 146, 26, .7); isolation: isolate; user-select: none; }
@media (max-width: 640px) { .reel-stage { border-radius: 18px; } }
.reel-stage * { box-sizing: border-box; }
.reel-stage img { max-width: none; }

/* ---------- the set: a dark stage with one spotlight, then the lights come up on a warm studio */
.f-night { position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 58%, #2a2118 0%, rgba(42, 33, 24, 0) 70%), linear-gradient(180deg, #0a0908 0%, #13110f 70%, #1b1814 100%); }
.f-day { position: absolute; inset: 0; opacity: 0; background: radial-gradient(75% 70% at 50% 30%, #fffaf1 0%, #f8eedc 60%, #f1e3c9 100%); transition: opacity 1.1s ease .15s; }
.f-day::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 17%; background: linear-gradient(180deg, rgba(222, 199, 158, 0), rgba(222, 199, 158, .55)); border-top: .12cqw solid rgba(205, 178, 132, .35); }
.f-spot { position: absolute; inset: 0; z-index: 1; transition: opacity 1s ease; pointer-events: none; }
.f-spot::before { content: ""; position: absolute; left: 50%; top: -4%; width: 52%; height: 104%; transform: translateX(-50%); clip-path: polygon(41% 0, 59% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, rgba(255, 226, 170, .2), rgba(255, 226, 170, .07) 75%, rgba(255, 226, 170, 0)); }
.f-spot::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56%; height: 16%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 220, 160, .26), rgba(255, 220, 160, 0)); }
.f-stars { position: absolute; inset: 0 0 30% 0; opacity: 0; transition: opacity 1.4s ease; }
.f-stars i { position: absolute; border-radius: 50%; background: #fff; animation: twinkle 4s ease-in-out infinite; }
.at-3 .f-day { opacity: 1; }
.at-3 .f-spot { opacity: 0; }
.at-9 .f-day { opacity: 0; transition: opacity 1s ease; }
.at-9 .f-stars { opacity: 1; }

/* ---------- caption */
.f-cap { position: absolute; z-index: 40; left: 4%; right: 4%; top: 4%; text-align: center; font: 800 4.1cqw/1.05 var(--display); letter-spacing: -.035em; color: #fff; text-shadow: 0 .4cqw 2.4cqw rgba(10, 8, 4, .45); opacity: 0; transform: translateY(1.2cqw); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1), color 1s ease; }
.f-cap.show { opacity: 1; transform: none; }
.at-3 .f-cap { color: #1c1b19; text-shadow: none; }
.at-9 .f-cap { color: #fff; }

/* ---------- the list: a charcoal clip with a gold count, and paper that keeps feeding out */
.f-lw { position: absolute; z-index: 10; left: 50%; top: 15%; bottom: 4%; width: 25%; transform: translateX(-50%); transform-origin: 50% 100%; transition: left 1s cubic-bezier(.5, 0, .25, 1), top 1s cubic-bezier(.5, 0, .25, 1), transform 1s cubic-bezier(.5, 0, .25, 1), opacity .6s ease; }
.l-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; height: 4.4cqw; padding: 0 1.1cqw 0 1.3cqw; border-radius: 1cqw 1cqw .4cqw .4cqw; background: linear-gradient(180deg, #2c2925, #1f1d1a); color: #fff; box-shadow: 0 .9cqw 2cqw rgba(0, 0, 0, .35), inset 0 .12cqw 0 rgba(255, 255, 255, .08); }
.l-top b { font: 800 1.7cqw/1 var(--display); letter-spacing: -.02em; transition: opacity .35s ease; }
.l-a, .l-b { position: absolute; left: 1.3cqw; top: 50%; transform: translateY(-50%); }
.l-b { opacity: 0; }
.l-n { position: relative; display: grid; margin-left: auto; min-width: 3.6cqw; padding: .42cqw .8cqw; border-radius: 99px; background: #f2b544; color: #1c1b19; font: 800 1.3cqw/1 var(--display); text-align: center; opacity: 0; transform: scale(.6); transition: opacity .3s ease, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.l-n > span { grid-area: 1 / 1; transition: opacity .25s ease; }
.l-n1 { counter-reset: n var(--n); }
.l-n1::before { content: counter(n); }
.l-n1::after { content: "+"; display: inline-block; max-width: 0; overflow: hidden; vertical-align: top; }
.l-n2 { opacity: 0; }
.l-paper { position: relative; z-index: 2; height: 0; margin: 0 .55cqw; overflow: hidden; border-radius: 0 0 .5cqw .5cqw; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 2.48cqw, #efe5d3 2.48cqw 2.56cqw) 0 .6cqw / 100% 100% no-repeat, #fffdf8; box-shadow: 0 1.2cqw 2.4cqw rgba(0, 0, 0, .3); }
.l-lines { display: grid; padding: .6cqw 1cqw; transition: opacity .3s ease; }
.l-ln { position: relative; display: flex; align-items: center; gap: .8cqw; height: 2.56cqw; overflow: hidden; font: 700 1.24cqw/1 var(--body); color: #1c1b19; white-space: nowrap; opacity: 0; transform: translateY(-.7cqw); transition: opacity .3s ease, transform .35s cubic-bezier(.3, 1.4, .5, 1), height .5s ease; }
.l-ln[data-who="pea"] { --c: #4e8a2f; }
.l-ln[data-who="dk"] { --c: #e2553f; }
.l-ln[data-who="bg"] { --c: #c98a4b; }
.l-ln i { position: relative; flex: none; width: 1.25cqw; height: 1.25cqw; border: .16cqw solid #3a3632; border-radius: .32cqw; transition: background .25s ease, border-color .25s ease; }
.l-ln i::after { content: ""; position: absolute; left: 30%; top: 6%; width: 32%; height: 62%; border: solid #fff; border-width: 0 .2cqw .2cqw 0; transform: rotate(45deg) scale(0); transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.l-ln > span { position: relative; transition: color .3s ease; }
.l-ln > span::after { content: ""; position: absolute; left: -3%; top: 52%; width: 0; height: .2cqw; border-radius: 99px; background: var(--c, #1c1b19); transition: width .35s ease; }
.l-feedbox { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity .3s ease; }
.l-feed { display: grid; padding: 0 1cqw; }
.l-feed span { display: flex; align-items: center; gap: .8cqw; height: 2.56cqw; font: 700 1.24cqw/1 var(--body); color: #3d3a35; white-space: nowrap; }
.l-feed span::before { content: ""; flex: none; width: 1.25cqw; height: 1.25cqw; border: .16cqw solid #6b665e; border-radius: .32cqw; }

/* beat 0, the still before it plays: the clip in the spotlight */
/* beat 1: the paper feeds down to the floor, the lines write themselves, the count climbs */
.at-1 .l-n { opacity: 1; transform: none; transition-delay: .5s; }
.at-1 .l-paper { height: 41.6cqw; transition: height 4.2s cubic-bezier(.35, 0, .65, 1) .45s; }
.at-1 .l-ln { opacity: 1; transform: none; transition-delay: calc(.7s + var(--j) * .32s); }
.at-1 .l-n1 { animation: n-list 3.6s linear .7s both; }
@keyframes n-list { from { --n: 0; } to { --n: 11; } }

/* beat 2: it never ends. The whole sheet streams, the heap grows, the count runs past 99 */
.at-2 .l-lines { opacity: 0; transition-delay: .1s; }
.at-2 .l-feedbox { opacity: 1; }
.at-2 .l-feed { animation: feed .85s linear infinite; }
@keyframes feed { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.at-2 .l-n1 { animation: n-run 3s cubic-bezier(.55, 0, .9, .4) .2s both; }
.at-2 .l-n1::after { animation: plus .01s linear 3.2s forwards; }
@keyframes n-run { from { --n: 11; } to { --n: 99; } }
@keyframes plus { to { max-width: 1em; } }
.at-2 .f-lw { animation: strain 1.4s ease-in-out 2.4s 2; }
@keyframes strain { 0%, 100% { rotate: 0deg; } 30% { rotate: -1.3deg; } 70% { rotate: 1.1deg; } }

/* the heap on the floor */
.f-heap { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 0; }
.f-heap i { position: absolute; left: 50%; bottom: calc(var(--k) * 1.2cqw); width: calc(var(--w) * 1%); height: 1.7cqw; margin-left: calc(var(--w) * -.5%); border-radius: .35cqw; background: linear-gradient(180deg, #fffdf8 0%, #f3ead9 100%); box-shadow: 0 .35cqw .7cqw rgba(0, 0, 0, .28), inset 0 -.18cqw 0 rgba(120, 100, 70, .1); opacity: 0; transform: translate(calc(var(--x) * .35cqw), -9cqw) rotate(0deg); transition: transform .45s cubic-bezier(.4, 1.5, .5, 1), opacity .15s ease; }
.f-heap i::after { content: ""; position: absolute; left: 12%; right: 34%; top: 44%; height: .24cqw; border-radius: 99px; background: #d9cfbd; }
.f-heap i:nth-child(odd) { --tilt: -2.4deg; }
.f-heap i:nth-child(even) { --tilt: 2deg; }
.at-2 .f-heap i { opacity: 1; transform: translate(calc(var(--x) * .35cqw), 0) rotate(var(--tilt)); transition-delay: calc(.35s + var(--k) * .22s); }
/* each agent takes its share off the heap: Pea the top four, Dickens the next, Beagle the rest */
.at-4 .f-heap i:nth-child(n+9) { opacity: 0; transform: translate(-58cqw, -16cqw) rotate(-30deg) scale(.4); transition: transform .8s cubic-bezier(.5, 0, .3, 1), opacity .3s ease .5s; transition-delay: calc(.5s + (var(--k) - 8) * .45s); }
.at-5 .f-heap i:nth-child(n+5) { opacity: 0; transform: translate(-40cqw, -16cqw) rotate(-24deg) scale(.4); transition: transform .8s cubic-bezier(.5, 0, .3, 1), opacity .3s ease .5s; transition-delay: calc(.6s + (var(--k) - 4) * .45s); }
.at-6 .f-heap i { opacity: 0; transform: translate(-22cqw, -16cqw) rotate(-18deg) scale(.4); transition: transform .8s cubic-bezier(.5, 0, .3, 1), opacity .3s ease .5s; transition-delay: calc(1s + var(--k) * .2s); }

/* beat 3 on: the list steps aside to make room for the agents */
.at-3 .f-lw { left: 84%; transform: translateX(-50%) scale(.84); }
.at-3 .l-lines { opacity: 1; transition-delay: .5s; }
.at-3 .l-feedbox { opacity: 0; }
.at-3 .l-paper { box-shadow: 0 1.2cqw 2.4cqw -.6cqw rgba(60, 40, 15, .28); }

/* lines get crossed off as each agent takes them, in that agent's colour */
.at-4 .l-ln[data-who="pea"] i, .at-5 .l-ln[data-who="dk"] i, .at-6 .l-ln[data-who="bg"] i { background: var(--c); border-color: var(--c); transition-delay: var(--d); }
.at-4 .l-ln[data-who="pea"] i::after, .at-5 .l-ln[data-who="dk"] i::after, .at-6 .l-ln[data-who="bg"] i::after { transform: rotate(45deg) scale(1); transition-delay: var(--d); }
.at-4 .l-ln[data-who="pea"] > span, .at-5 .l-ln[data-who="dk"] > span, .at-6 .l-ln[data-who="bg"] > span { color: #9b958b; transition-delay: var(--d); }
.at-4 .l-ln[data-who="pea"] > span::after, .at-5 .l-ln[data-who="dk"] > span::after, .at-6 .l-ln[data-who="bg"] > span::after { width: 106%; transition-delay: var(--d); }

/* slips of paper fly from the list to the agent at work */
.f-slips i { position: absolute; z-index: 13; left: 80%; top: calc(36% + var(--s) * 9%); width: 7%; height: 2.2cqw; border-radius: .35cqw; background: #fffdf8; box-shadow: 0 .4cqw .9cqw rgba(60, 40, 15, .3); opacity: 0; }
.f-slips i::after { content: ""; position: absolute; left: 14%; right: 26%; top: 44%; height: .24cqw; border-radius: 99px; background: var(--c); }
.f-slips .s-pea { --c: #4e8a2f; --tx: -64cqw; }
.f-slips .s-dk { --c: #e2553f; --tx: -42cqw; }
.f-slips .s-bg { --c: #c98a4b; --tx: -20cqw; }
@keyframes slip { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 12% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--tx), -6cqw) rotate(-14deg) scale(.6); } }
[data-beat="4"] .f-slips .s-pea, [data-beat="5"] .f-slips .s-dk, [data-beat="6"] .f-slips .s-bg { animation: slip .7s cubic-bezier(.5, 0, .4, 1) var(--d) both; }

/* ---------- beat 3: the hat drops, the agents come out of it */
.f-hat { position: absolute; z-index: 16; left: 35%; bottom: 3%; width: 14%; height: auto; opacity: 0; transform: translate(-50%, -300%) rotate(-20deg); filter: drop-shadow(0 1.6cqw 1.6cqw rgba(45, 32, 15, .35)); }
.at-3 .f-hat { animation: hatdrop .8s cubic-bezier(.3, 1.4, .5, 1) .9s forwards, hatwiggle .45s ease-in-out 1.8s 2, hatgo .45s ease 3.9s forwards; }
@keyframes hatdrop { 0% { opacity: 1; transform: translate(-50%, -300%) rotate(-20deg); } 100% { opacity: 1; transform: translate(-50%, 0) rotate(0); } }
@keyframes hatwiggle { 0%, 100% { opacity: 1; transform: translate(-50%, 0) rotate(0); } 30% { opacity: 1; transform: translate(-50%, 0) rotate(-7deg) scale(1.05, .95); } 70% { opacity: 1; transform: translate(-50%, 0) rotate(6deg) scale(.96, 1.04); } }
@keyframes hatgo { 0% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 30%) scale(.4); } }
.f-sparks { position: absolute; z-index: 15; left: 35%; bottom: 17%; width: 0; height: 0; }
.f-sparks i { position: absolute; width: 1.4cqw; height: 1.4cqw; margin: -.7cqw; opacity: 0; border-radius: 50%; background: radial-gradient(closest-side, #fff, #ffd57a 50%, transparent); }
.at-3 .f-sparks i { animation: spark 1.2s ease-out 2.2s forwards; }
.f-sparks i:nth-child(1) { --dx: -12cqw; --dy: -9cqw; } .f-sparks i:nth-child(2) { --dx: 11cqw; --dy: -11cqw; }
.f-sparks i:nth-child(3) { --dx: -5cqw; --dy: -15cqw; } .f-sparks i:nth-child(4) { --dx: 6cqw; --dy: -16cqw; }
.f-sparks i:nth-child(5) { --dx: -16cqw; --dy: -3cqw; } .f-sparks i:nth-child(6) { --dx: 16cqw; --dy: -4cqw; }
.f-sparks i:nth-child(7) { --dx: -2cqw; --dy: -19cqw; } .f-sparks i:nth-child(8) { --dx: 3cqw; --dy: -7cqw; }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(.4); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.3); } }

/* ---------- the agents. Each one stands in its own column; its poses swap in place */
.f-a { position: absolute; z-index: 12; bottom: 3%; left: var(--ax); width: 20%; height: 42%; margin-left: -10%; opacity: 0; transform-origin: 50% 100%; transform: translate(var(--hx), 25%) scale(.12); transition: transform .85s cubic-bezier(.3, 1.5, .5, 1), opacity .15s ease, left .9s cubic-bezier(.4, 0, .2, 1); }
.f-a img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%); opacity: 0; filter: drop-shadow(0 1.3cqw 1.1cqw rgba(45, 32, 15, .28)); transition: opacity .12s ease; }
.f-a .p0 { opacity: 1; }
.a-pea { --ax: 13%; --hx: 22cqw; --pop: 2.5s; }
.a-dk { --ax: 35%; --hx: 0cqw; --pop: 3s; }
.a-bg { --ax: 57%; --hx: -22cqw; --pop: 3.5s; height: 37%; }
.a-bg .p1 { height: 80%; }
.at-3 .f-a { opacity: 1; transform: none; transition-delay: var(--pop), var(--pop), 0s; }
/* the agent at work gets the spotlight pose; the others stand by */
[data-beat="4"] .a-pea .p0, [data-beat="5"] .a-dk .p0, [data-beat="6"] .a-bg .p0 { opacity: 0; }
[data-beat="4"] .a-pea .p1, [data-beat="5"] .a-dk .p1 { opacity: 1; }
[data-beat="4"] .a-pea { animation: busy .9s ease-in-out .3s 5; }
[data-beat="5"] .a-dk { animation: scribe .5s ease-in-out .7s 7; }
[data-beat="6"] .a-bg .p1 { animation: on-then-off 1.55s steps(1) both; }
[data-beat="6"] .a-bg .p2 { animation: off-then-on 1.55s steps(1) both; }
[data-beat="6"] .a-bg { animation: sniffwalk .4s ease-in-out 3, hopup .6s cubic-bezier(.3, 1.6, .5, 1) 1.55s; }
@keyframes on-then-off { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes off-then-on { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes busy { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-7%) scale(1.03, .97); } }
@keyframes scribe { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2.5deg) translateY(-1.5%); } }
@keyframes sniffwalk { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3%) rotate(1.5deg); } }
@keyframes hopup { 0% { transform: translateY(0); } 45% { transform: translateY(-9%) scale(1.04, .96); } 100% { transform: translateY(0); } }
/* name tags as they land */
.f-tag { position: absolute; z-index: 18; bottom: 1.4%; left: var(--ax); padding: .45cqw 1.2cqw; border-radius: 99px; background: #1c1b19; color: #fff; font: 800 1.45cqw/1 var(--display); letter-spacing: -.01em; white-space: nowrap; box-shadow: 0 .6cqw 1.6cqw rgba(45, 32, 15, .25); opacity: 0; transform: translate(-50%, 40%) scale(.8); transition: opacity .3s ease, transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.t-pea { --ax: 13%; --pop: 3s; } .t-dk { --ax: 35%; --pop: 3.5s; } .t-bg { --ax: 57%; --pop: 4s; }
.at-3 .f-tag { opacity: 1; transform: translate(-50%, 0); transition-delay: var(--pop); }
.at-4 .f-tag { opacity: 0; transform: translate(-50%, 40%) scale(.8); transition-delay: 0s; }

/* ---------- the work, readable: one card above each agent */
.f-card { position: absolute; z-index: 14; top: 14%; text-align: left; left: var(--cx); width: 20.5%; margin-left: -10.25%; padding: 1.1cqw 1.2cqw 1.2cqw; border-radius: 1.3cqw; background: #fff; box-shadow: 0 1.3cqw 3cqw -1cqw rgba(45, 32, 15, .38), 0 0 0 .1cqw rgba(45, 32, 15, .06); opacity: 0; transform: translateY(2.2cqw) scale(.88); transform-origin: 50% 100%; transition: transform .55s cubic-bezier(.3, 1.5, .5, 1), opacity .3s ease; }
.f-card::after { content: ""; position: absolute; left: 50%; bottom: -.7cqw; width: 1.6cqw; height: 1.6cqw; margin-left: -.8cqw; background: #fff; border-radius: .2cqw; transform: rotate(45deg); }
.c-pea { --cx: 13%; --c: #4e8a2f; --soft: #e5efdb; --tone: #2d5a1b; }
.c-dk { --cx: 35%; --c: #e2553f; --soft: #ffe7e1; --tone: #9c2f1d; }
.c-bg { --cx: 57%; --c: #c98a4b; --soft: #f8ead9; --tone: #1c1b19; }
.c-h { display: flex; align-items: baseline; justify-content: space-between; gap: .6cqw; margin-bottom: .6cqw; }
.c-h b { display: inline-flex; align-items: center; gap: .55cqw; font: 800 1.5cqw/1 var(--display); letter-spacing: -.02em; color: #1c1b19; }
.c-h b::before { content: ""; width: .9cqw; height: .9cqw; border-radius: 50%; background: var(--c); }
.c-h small { font: 700 .95cqw/1 var(--body); color: #7a756d; white-space: nowrap; }
.c-row { display: flex; align-items: center; justify-content: space-between; gap: .6cqw; padding: .5cqw 0; border-top: .1cqw solid #efe9de; font: 700 1.1cqw/1.1 var(--body); color: #1c1b19; white-space: nowrap; opacity: 0; transform: translateX(-1.2cqw); transition: opacity .3s ease, transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.c-row em, .c-more span { font: 800 .82cqw/1 var(--body); font-style: normal; letter-spacing: .07em; text-transform: uppercase; padding: .32cqw .6cqw; border-radius: 99px; background: var(--soft); color: var(--tone); }
.c-post { font: 800 1.42cqw/1.22 var(--display); letter-spacing: -.015em; color: #1c1b19; }
.c-post span { opacity: 0; transition: opacity .2s ease; }
.c-more { display: flex; gap: .5cqw; margin-top: .8cqw; opacity: 0; transform: translateY(.6cqw); transition: opacity .3s ease, transform .4s ease; }
.c-find { font: 800 1.42cqw/1.22 var(--display); letter-spacing: -.015em; color: #1c1b19; opacity: 0; transform: scale(.94); transform-origin: 0 50%; transition: opacity .3s ease, transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.c-idea { display: flex; align-items: center; gap: .5cqw; margin-top: .7cqw; font: 700 1.1cqw/1.1 var(--body); color: #5d5850; opacity: 0; transition: opacity .3s ease; }
.c-idea::before { content: ""; width: .7cqw; height: .7cqw; border-radius: 50%; background: #f2b544; box-shadow: 0 0 .8cqw rgba(242, 181, 68, .9); }
.c-ok { display: inline-grid; margin-top: .9cqw; padding: .42cqw .9cqw; border-radius: 99px; background: #fff1d6; color: #1c1b19; font: 800 .98cqw/1 var(--body); opacity: 0; transform: scale(.7); transition: opacity .25s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1), background .25s ease, color .25s ease; }
.c-ok s { grid-area: 1 / 1; text-decoration: none; transition: opacity .15s ease; }
.c-ok .b { opacity: 0; }

.at-4 .c-pea, .at-5 .c-dk, .at-6 .c-bg { opacity: 1; transform: none; transition-delay: .3s; }
.at-4 .c-pea .c-row { opacity: 1; transform: none; transition-delay: var(--d); }
.at-5 .c-dk .c-post span { opacity: 1; transition-delay: calc(.8s + var(--w) * .2s); }
.at-5 .c-dk .c-more { opacity: 1; transform: none; transition-delay: var(--d); }
.at-6 .c-bg .c-find { opacity: 1; transform: none; transition-delay: 1.6s; }
.at-6 .c-bg .c-idea { opacity: 1; transition-delay: var(--d); }
.at-4 .c-pea .c-ok, .at-5 .c-dk .c-ok, .at-6 .c-bg .c-ok { opacity: 1; transform: none; transition-delay: 3s; }

/* ---------- beat 7: your call. The cursor approves each card in turn */
.f-cursor { position: absolute; z-index: 30; left: 104%; top: 104%; width: 2.8cqw; height: 2.8cqw; opacity: 0; transform: translate(-22%, -12%); filter: drop-shadow(0 .3cqw .5cqw rgba(0, 0, 0, .3)); }
[data-beat="7"] .f-cursor { animation: approve 4.6s cubic-bezier(.45, 0, .25, 1) .2s both; }
@keyframes approve {
  0% { left: 104%; top: 104%; opacity: 0; }
  8% { opacity: 1; }
  22% { left: var(--x1, 18%); top: var(--y1, 47%); transform: translate(-22%, -12%) scale(1); }
  25% { transform: translate(-22%, -12%) scale(.82); }
  28% { left: var(--x1, 18%); top: var(--y1, 47%); transform: translate(-22%, -12%) scale(1); }
  47% { left: var(--x2, 40%); top: var(--y2, 47%); transform: translate(-22%, -12%) scale(1); }
  50% { transform: translate(-22%, -12%) scale(.82); }
  53% { left: var(--x2, 40%); top: var(--y2, 47%); transform: translate(-22%, -12%) scale(1); }
  72% { left: var(--x3, 62%); top: var(--y3, 47%); transform: translate(-22%, -12%) scale(1); }
  75% { transform: translate(-22%, -12%) scale(.82); }
  78% { left: var(--x3, 62%); top: var(--y3, 47%); transform: translate(-22%, -12%) scale(1); opacity: 1; }
  100% { left: calc(var(--x3, 62%) + 8%); top: calc(var(--y3, 47%) + 14%); opacity: 0; }
}
.at-7 .f-card .c-ok { background: #dff3e4; color: #22713a; }
.at-7 .c-ok .a { opacity: 0; }
.at-7 .c-ok .b { opacity: 1; }
.at-7 .c-pea .c-ok, .at-7 .c-pea .c-ok s { transition-delay: 1.35s; }
.at-7 .c-dk .c-ok, .at-7 .c-dk .c-ok s { transition-delay: 2.5s; }
.at-7 .c-bg .c-ok, .at-7 .c-bg .c-ok s { transition-delay: 3.65s; }
[data-beat="7"] .c-pea .c-ok { animation: stamp .35s ease 1.35s; }
[data-beat="7"] .c-dk .c-ok { animation: stamp .35s ease 2.5s; }
[data-beat="7"] .c-bg .c-ok { animation: stamp .35s ease 3.65s; }
@keyframes stamp { 40% { transform: scale(1.18); } }

/* ---------- beat 8: the list ends. The crossed-off lines fold away, two are left, the agents cheer */
.at-8 .f-card { opacity: 0; transform: translateY(-2cqw) scale(.9); transition: opacity .35s ease, transform .4s ease; transition-delay: 0s; }
.at-8 .f-lw { left: 50%; top: 36.5%; transform: translateX(-50%) scale(1.35); transition-delay: .2s; }
.at-8 .l-ln:not([data-who="you"]) { height: 0; opacity: 0; transition: height .45s cubic-bezier(.5, 0, .2, 1), opacity .25s ease; transition-delay: calc(.6s + var(--j) * .05s); }
.at-8 .l-ln[data-who="you"] i { border-color: #e09a22; box-shadow: 0 0 0 .3cqw rgba(242, 181, 68, .25); transition-delay: 1.3s; }
.at-8 .l-paper { height: 6.4cqw; transition: height .8s cubic-bezier(.5, 0, .2, 1) .7s; }
.at-8 .l-a, .at-8 .l-n1 { opacity: 0; transition-delay: 1s; }
.at-8 .l-b, .at-8 .l-n2 { opacity: 1; transition-delay: 1.1s; }
[data-beat="8"] .l-n { animation: stamp .4s ease 1.2s; }
[data-beat="8"] .f-lw { animation: glow 2.4s ease-in-out 1.6s 2; }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(242, 181, 68, 0)); } 50% { filter: drop-shadow(0 0 2.2cqw rgba(242, 181, 68, .7)); } }
.at-8 .a-pea { left: 30%; }
.at-8 .a-dk { left: 50%; }
.at-8 .a-bg { left: 70%; }
[data-beat="8"] .f-a .p0 { opacity: 0; }
[data-beat="8"] .a-pea .p2, [data-beat="8"] .a-dk .p2, [data-beat="8"] .a-bg .p0 { opacity: 1; }
[data-beat="8"] .a-pea { animation: hopup .6s cubic-bezier(.3, 1.6, .5, 1) 1.5s 3; }
[data-beat="8"] .a-dk { animation: hopup .6s cubic-bezier(.3, 1.6, .5, 1) 1.7s 3; }
[data-beat="8"] .a-bg { animation: hopup .6s cubic-bezier(.3, 1.6, .5, 1) 1.9s 3; }

/* ---------- beat 9: the end card, under the stars */
.at-9 .f-lw { opacity: 0; transform: translateX(-50%) translateY(-4cqw) scale(.9); transition-delay: 0s; }
.at-9 .f-a { opacity: 0; transform: translateY(20%) scale(.7); transition: transform .5s ease, opacity .4s ease; transition-delay: 0s; }
.f-end { position: absolute; z-index: 25; inset: 0 0 30% 0; display: grid; place-content: center; justify-items: center; opacity: 0; transform: scale(.92); transition: opacity 1s ease .5s, transform 1.4s cubic-bezier(.2, .7, .2, 1) .5s; pointer-events: none; }
.f-end-logo { margin: 0; font-size: 8cqw; color: #fff; filter: drop-shadow(0 1cqw 4cqw rgba(242, 181, 68, .45)); }
.f-end-logo .g { color: #f2b544; }
.f-end .hat .cone { fill: #f2b544; }
.f-end .hat .brim { fill: #d99a2b; }
.f-end .hat .band, .f-end .hat .star { fill: #f2b544; }
.at-9 .f-end { opacity: 1; transform: none; }
.f-cast { position: absolute; z-index: 24; left: 0; right: 0; bottom: 0; height: 32%; display: flex; justify-content: center; align-items: flex-end; gap: 7%; pointer-events: none; }
.f-cast img { height: 92%; width: auto; transform: translateY(115%); filter: drop-shadow(0 0 2cqw rgba(242, 181, 68, .35)); transition: transform .9s cubic-bezier(.3, 1.4, .5, 1); }
.at-9 .f-cast img { transform: translateY(6%); transition-delay: calc(1.2s + var(--i) * .25s); }

/* ---------- big play (only while idle) */
.f-big { position: absolute; z-index: 45; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; align-items: center; gap: 1.2cqw; padding: 1.6cqw 3cqw 1.6cqw 2.4cqw; border: 0; border-radius: 99px; background: #fff; color: #181715; font: 800 2.2cqw/1 var(--display); box-shadow: 0 2cqw 5cqw -1cqw rgba(0, 0, 0, .55); }
.f-big svg { width: 2.6cqw; height: 2.6cqw; color: #e09a22; }
.reel.is-idle .f-big { display: inline-flex; }
@media (max-width: 640px) { .f-big { font-size: 15px; padding: 12px 20px; gap: 8px; } .f-big svg { width: 18px; height: 18px; } }

/* ---------- the control bar */
.reel-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.f-dots { display: flex; gap: 6px; flex: 1 1 200px; max-width: 420px; }
.f-dots i { position: relative; flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.f-dots i::after { content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: 0 50%; background: #fff; border-radius: 4px; }
.f-dots i.is-done::after { transform: scaleX(1); }
.f-dots i.is-now::after { animation: fill var(--dur, 4s) linear forwards; }
.reel.is-paused .f-dots i.is-now::after { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.f-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.f-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; font: 700 14px/1 var(--body); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); transition: background .2s; }
.f-btn:hover { background: rgba(255, 255, 255, .18); }
.f-btn svg { width: 16px; height: 16px; }
.f-btn.f-sound.want { background: #fff; color: #181715; box-shadow: 0 0 0 4px rgba(242, 181, 68, .35); animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 4px rgba(242, 181, 68, .35); } 50% { box-shadow: 0 0 0 8px rgba(242, 181, 68, .15); } }
.reel.is-paused .reel-stage *, .reel.is-paused .reel-stage *::before, .reel.is-paused .reel-stage *::after { animation-play-state: paused !important; }

/* still checks (?reelbeat=N) skip the motion */
.reel-stage.static, .reel-stage.static *, .reel-stage.static *::before, .reel-stage.static *::after { transition: none !important; animation-delay: -30s !important; }

/* phones: the stage is small, so the words inside it get bigger and the busiest parts thin out */
@media (max-width: 640px) {
  .reel-bar { gap: 10px; }
  .f-dots { flex-basis: 100%; max-width: none; }
  .f-btns { width: 100%; justify-content: space-between; }
  .f-btn { padding: 0 13px; }
  .f-restart span, .f-play span { display: none; }
  .f-cap { font-size: 5.4cqw; top: 3.5%; }
  .f-lw { width: 34%; top: 16%; }
  .at-3 .f-lw { left: 88%; transform: translateX(-50%) scale(.62); }
  .at-8 .f-lw { left: 50%; top: 30%; transform: translateX(-50%) scale(1.15); }
  .at-9 .f-lw { left: 50%; }
  .l-top { height: 5.6cqw; }
  .l-top b { font-size: 2.3cqw; }
  .l-n { font-size: 1.9cqw; min-width: 5cqw; }
  .l-ln, .l-feed span { height: 3.4cqw; font-size: 1.85cqw; }
  .l-ln i, .l-feed span::before { width: 1.7cqw; height: 1.7cqw; }
  .l-paper { background: #fffdf8; }
  .at-8 .l-paper { height: 8cqw; }
  .f-card { width: 23.5%; margin-left: -11.75%; top: 13%; padding: 1.4cqw; }
  .c-pea { --cx: 13.5%; } .c-dk { --cx: 37.5%; } .c-bg { --cx: 61.5%; }
  .c-h b { font-size: 2.1cqw; }
  .c-h small { display: none; }
  .c-row { font-size: 1.75cqw; padding: .7cqw 0; }
  .c-row em { display: none; }
  .c-more span { font-size: 1.3cqw; }
  .c-row:nth-of-type(4), .c-row:nth-of-type(5), .c-more, .c-idea { display: none; }
  .c-post, .c-find { font-size: 2.1cqw; }
  .c-ok { font-size: 1.5cqw; }
  .a-pea, .t-pea { --ax: 13.5%; } .a-dk, .t-dk { --ax: 37.5%; } .a-bg, .t-bg { --ax: 61.5%; }
  .a-pea { --hx: 24cqw; } .a-bg { --hx: -24cqw; }
  .f-hat, .f-sparks { left: 37.5%; }
  .f-slips .s-pea { --tx: -72cqw; } .f-slips .s-dk { --tx: -48cqw; } .f-slips .s-bg { --tx: -24cqw; }
  .f-a { height: 38%; }
  .f-tag { font-size: 2.4cqw; }
  .f-end-logo { font-size: 10cqw; }
}

/* ---------- v11 (11 Nov 2026): Pea alone. Beagle is retired and Pea is the core product, so Pea pops out of the hat
   by itself and walks from card to card: the day (conducting), the post (writing), the spot (magnifier). The cards,
   lines and slips keep their three columns, all in Pea's green. Pea finishes on one neat stack, as in its own film. */
.l-ln[data-who="p2"], .l-ln[data-who="p3"] { --c: #4e8a2f; }
.at-5 .l-ln[data-who="p2"] i, .at-6 .l-ln[data-who="p3"] i { background: var(--c); border-color: var(--c); transition-delay: var(--d); }
.at-5 .l-ln[data-who="p2"] i::after, .at-6 .l-ln[data-who="p3"] i::after { transform: rotate(45deg) scale(1); transition-delay: var(--d); }
.at-5 .l-ln[data-who="p2"] > span, .at-6 .l-ln[data-who="p3"] > span { color: #9b958b; transition-delay: var(--d); }
.at-5 .l-ln[data-who="p2"] > span::after, .at-6 .l-ln[data-who="p3"] > span::after { width: 106%; transition-delay: var(--d); }
.f-slips .s-p2 { --c: #4e8a2f; --tx: -42cqw; }
.f-slips .s-p3 { --c: #4e8a2f; --tx: -20cqw; }
[data-beat="5"] .f-slips .s-p2, [data-beat="6"] .f-slips .s-p3 { animation: slip .7s cubic-bezier(.5, 0, .4, 1) var(--d) both; }
.c-dk, .c-bg { --c: #4e8a2f; --soft: #e5efdb; --tone: #2d5a1b; }

.a-pea.solo { --ax: 35%; --hx: 0cqw; --pop: 2.55s; width: 22%; height: 46%; margin-left: -11%; transition: transform .85s cubic-bezier(.3, 1.5, .5, 1), opacity .15s ease, left 1s cubic-bezier(.45, 0, .25, 1); }
.f-tag.t-pea { --ax: 35%; --pop: 3.1s; }
.a-pea.solo .p3, .a-pea.solo .p4, .a-pea.solo .p6 { height: 100%; }
.a-pea.solo .p5 { height: 96%; }
@keyframes poseon { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes poseoff { 0% { opacity: 1; } 100% { opacity: 0; } }
.at-4 .a-pea.solo .p0 { opacity: 0; }
/* beat 4: walk left to the first card, then conduct the day */
.at-4 .a-pea.solo { left: 13%; }
[data-beat="4"] .a-pea.solo .p5 { animation: poseoff 1s steps(1) both; }
[data-beat="4"] .a-pea.solo .p1 { opacity: 0; animation: poseon 1s steps(1) both; }
[data-beat="4"] .a-pea.solo { animation: busy .9s ease-in-out 1.05s 4; }
/* beat 5: walk right to the post, then write */
.at-5 .a-pea.solo { left: 35%; }
[data-beat="5"] .a-pea.solo .p5 { transform: translateX(-50%) scaleX(-1); animation: poseoff 1s steps(1) both; }
[data-beat="5"] .a-pea.solo .p3 { animation: poseon 1s steps(1) both; }
[data-beat="5"] .a-pea.solo { animation: scribe .5s ease-in-out 1.1s 7; }
/* beat 6: walk right to the market, then the magnifier */
.at-6 .a-pea.solo { left: 57%; }
[data-beat="6"] .a-pea.solo .p5 { transform: translateX(-50%) scaleX(-1); animation: poseoff 1s steps(1) both; }
[data-beat="6"] .a-pea.solo .p4 { animation: poseon 1s steps(1) both; }
[data-beat="6"] .a-pea.solo { animation: hopup .6s cubic-bezier(.3, 1.6, .5, 1) 1.6s; }
/* beat 7: your call. Pea points the way while you approve */
[data-beat="7"] .a-pea.solo .p1 { opacity: 1; }
/* beat 8: back left, up on one neat stack */
.at-8 .a-pea.solo { left: 19%; }
[data-beat="8"] .a-pea.solo .p2 { opacity: 0; }
[data-beat="8"] .a-pea.solo .p5 { animation: poseoff 1s steps(1) both; }
[data-beat="8"] .a-pea.solo .p6 { animation: poseon 1s steps(1) both; }
[data-beat="8"] .a-pea.solo { animation: hopup .6s cubic-bezier(.3, 1.6, .5, 1) 1.4s 2; }
.f-cast img { height: 100%; }
@media (max-width: 640px) {
  .a-pea.solo { --ax: 37.5%; width: 25%; margin-left: -12.5%; height: 40%; }
  .f-tag.t-pea { --ax: 37.5%; }
  .at-4 .a-pea.solo { left: 13.5%; }
  .at-5 .a-pea.solo { left: 37.5%; }
  .at-6 .a-pea.solo { left: 61.5%; }
  .at-8 .a-pea.solo { left: 17%; }
  .f-slips .s-p2 { --tx: -48cqw; } .f-slips .s-p3 { --tx: -24cqw; }
}
