/* written by tools/process_demo2.py from the demo (demo-process-v2-4c81e05b); edit there, not here */
/* idea 1 (frames.html): a viewfinder over one world (morph.js pans the world and turns the frame). The world twice:
   a faint copy for everything outside the frame, a full one clipped to it. Lines in the timeline's ink; the camera's red
   only where something is live: the recording dot, the reel's progress. */
.mf { margin: 0; }
.mf svg { display: block; width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mf .faint { opacity: .16; }
.mf .mf-frame { stroke-width: 2.5; }
.mf .mf-rec { stroke: none; fill: var(--accent); transition: fill .3s ease; }
.mf[data-s="reel"] .mf-rec { fill: transparent; }   /* in the reel, the progress bar is what runs */
.mf .ray { stroke-width: 1.5; }
.mf text { fill: var(--ink); stroke: none; font: 700 10px/1 var(--ui); }
.mf .reel-ui { opacity: 0; transition: opacity .3s ease; }
.mf[data-s="reel"] .reel-ui { opacity: 1; transition: opacity .6s ease 1.2s; }
.mf .notch { fill: var(--ink); stroke: none; }
.mf .seg, .mf .seg-on { stroke-width: 3; }
.mf .seg { stroke: var(--rule); }
.mf .seg-on { stroke: var(--accent); transform-box: fill-box; transform-origin: right center; transform: scaleX(0); }
.mf .sub { stroke-width: 6; opacity: .82; }
/* the world's small life, only while the frame is in view */
.mf * { animation-play-state: paused; }
.mf.run * { animation-play-state: running; }
.mf .ray { animation: mf-ray 2.8s ease-in-out infinite alternate; }
.mf .r2 { animation-delay: -.9s; } .mf .r3 { animation-delay: -1.8s; }
@keyframes mf-ray { from { opacity: .25; } to { opacity: .85; } }
/* the bottle turns in place: its label comes round from one edge, faces us, and goes behind the other; a mark on the
   turntable goes round with it */
.mf .label { transform-box: fill-box; transform-origin: center; animation: mf-label 4.8s linear infinite; }
@keyframes mf-label { 0% { transform: translateX(-13px) scaleX(.15); opacity: 0; } 8% { opacity: 1; } 50% { transform: translateX(0) scaleX(1); } 92% { opacity: 1; } 100% { transform: translateX(13px) scaleX(.15); opacity: 0; } }
.mf .turn { animation: mf-turn 4.8s linear infinite; }
@keyframes mf-turn { 0% { transform: translate(-28px, 0); } 25% { transform: translate(0, 4px); } 50% { transform: translate(28px, 0); opacity: 1; } 51%, 99% { opacity: 0; } 100% { transform: translate(-28px, 0); opacity: 0; } }
.mf .mf-rec { animation: mf-blink 2.4s step-end infinite; }
@keyframes mf-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
/* two people walk the path one after the other, left to right, in and out of the frame; legs and arms swing */
.mf .w1, .mf .w2 { animation: mf-walker 12s linear infinite; }
.mf .w1 { animation-delay: -.8s; }
@keyframes mf-walker { from { transform: translate(350px, 213px); } to { transform: translate(790px, 213px); } }
.mf .leg, .mf .arm { transform-box: fill-box; transform-origin: 50% 0; animation: mf-stride .5s ease-in-out infinite alternate; }
.mf .l1, .mf .a2 { animation-direction: alternate-reverse; }
.mf .leg { transform-origin: right top; }
.mf .l2 { transform-origin: left top; }
@keyframes mf-stride { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.mf .birds { animation: mf-birds 12s linear infinite; }
@keyframes mf-birds { from { transform: translate(-40px, 6px); } to { transform: translate(60px, -4px); } }
.mf .nod { animation: mf-nod 3.4s ease-in-out infinite alternate; }
@keyframes mf-nod { from { transform: translateY(0); } to { transform: translateY(1.6px); } }
.mf .sign, .mf .lamp { transform-box: fill-box; transform-origin: 50% 0; animation: mf-swing 3.2s ease-in-out infinite alternate; }
.mf .lamp { animation-duration: 4.4s; }
@keyframes mf-swing { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.mf .steam { animation: mf-steam 2.6s ease-out infinite; }
.mf .t2 { animation-delay: -1.3s; }
@keyframes mf-steam { 0% { transform: translateY(4px); opacity: 0; } 35% { opacity: .9; } 100% { transform: translateY(-8px); opacity: 0; } }
.mf .saw { animation: mf-saw .7s ease-in-out infinite alternate; }
@keyframes mf-saw { from { transform: translateX(-4px); } to { transform: translateX(5px); } }
.mf .s1 { animation: mf-s1 6s linear infinite; } .mf .s2 { animation: mf-s2 6s linear infinite; } .mf .s3 { animation: mf-s3 6s linear infinite; }
@keyframes mf-s1 { 0% { transform: scaleX(0); } 33.3%, 99.9% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes mf-s2 { 0%, 33.3% { transform: scaleX(0); } 66.6%, 99.9% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes mf-s3 { 0%, 66.6% { transform: scaleX(0); } 99.9% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.mf .sub { animation: mf-sub 6s step-end infinite; }
.mf .l2 { animation-name: mf-sub2; }
@keyframes mf-sub { 0%, 100% { opacity: .82; } 33.3% { opacity: .5; } 66.6% { opacity: .82; } }
@keyframes mf-sub2 { 0%, 100% { opacity: .82; } 33.3% { opacity: 0; } 66.6% { opacity: .5; } }
/* the four kinds of work, one tab each */
.mf-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 0; }
.mf-tabs button { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; font: 500 14px/1.2 var(--ui); color: var(--support); background: transparent; cursor: pointer; transition: color .25s ease, background-color .25s ease, border-color .25s ease, transform .16s var(--out-cubic); }
.mf-tabs button b { font: 400 14px/1 var(--latin); letter-spacing: .06em; direction: ltr; }
.mf-tabs button[aria-selected="true"] { color: var(--ground); background: var(--ink); border-color: var(--ink); }
.mf-tabs button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .mf-tabs button[aria-selected="false"]:hover { color: var(--ink); border-color: var(--support); } }
.js .fit:not(.in) .mf { opacity: 0; transform: translateY(16px); }
.js .fit.in .mf { opacity: 1; transform: none; transition: opacity .7s var(--out-cubic), transform .7s var(--out-cubic); }
@media (prefers-reduced-motion: reduce) {
  .mf *, .mf .reel-ui { animation: none !important; transition: opacity .2s ease !important; }
  .mf .seg-on { transform: scaleX(.4); }
  .js .fit .mf { opacity: 1 !important; transform: none !important; }
}
