/* Oddbot: an original little number-transforming robot, drawn in CSS. */
.machine-scene{container-type:inline-size;position:relative;display:flex;align-items:center;justify-content:center;height:216px;gap:0;padding:16px 18px 31px;overflow:hidden;background:#dceefa;border-block:2px solid #8e99b3}
.scene-cloud{position:absolute;width:95px;height:20px;background:#f4faff;border-radius:60px;pointer-events:none}
.scene-cloud:before,.scene-cloud:after{content:'';position:absolute;background:inherit;border-radius:50%}
.scene-cloud:before{width:40px;height:40px;left:12px;bottom:2px}
.scene-cloud:after{width:33px;height:33px;right:12px;bottom:2px}
.scene-cloud-left{left:14px;top:47px}
.scene-cloud-right{right:21px;top:27px;width:82px;height:16px}
.scene-floor{position:absolute;left:0;right:0;bottom:30px;height:35px;background:#c6dfcf;border-top:2px solid #9abdac}
.scene-floor:before{content:'';position:absolute;width:170px;height:12px;left:50%;top:6px;transform:translateX(-50%);border-radius:50%;background:#9ebea75c}
.scene-footnote{position:absolute;left:15px;right:15px;bottom:7px;text-align:center;color:#596c70;font:10px/1.4 var(--sans)}
.flow-port{position:relative;z-index:2;display:flex;flex-shrink:0;flex-direction:column;align-items:center;justify-content:center;width:88px;min-height:86px;border:2px solid #5d5d7c;border-radius:13px;background:#fffdf6;box-shadow:0 4px 0 #8ea6b2;color:var(--ink)}
.port-caption{font:900 11px/1.3 var(--sans);color:#655c73}
.port-number{font:600 30px/1.2 var(--mono);font-variant-numeric:tabular-nums;letter-spacing:-1px;margin-top:5px}
.input-port{margin-right:43px}
.output-port{margin-left:43px}
.input-port:after,.output-port:before{position:absolute;top:27px;color:#626886;font:500 30px/1 var(--display)}
.input-port:after{content:'→';right:-34px}
.output-port:before{content:'→';left:-34px}
.contraption{position:relative;z-index:3;flex-shrink:0;width:150px;height:144px;padding:57px 16px 12px;border:3px solid var(--ink);border-radius:35px 35px 24px 24px;background:#c8edc9;box-shadow:inset -9px -5px 0 #9ecaa6;transform:rotate(-3deg)}
.bot-antenna{position:absolute;left:calc(50% - 2px);top:-22px;width:4px;height:20px;background:var(--ink)}
.bot-antenna:after{content:'';position:absolute;left:-6px;top:-8px;width:17px;height:17px;border:2px solid var(--ink);border-radius:50%;background:#f7a2ab;box-shadow:inset -3px -2px 0 #d87695}
.bot-ear{position:absolute;top:43px;width:17px;height:30px;border:2px solid var(--ink);border-radius:8px;background:#ffe58c;z-index:-1}
.ear-left{left:-15px;transform:rotate(-9deg)}
.ear-right{right:-15px;transform:rotate(9deg)}
.bot-eyes{position:absolute;left:30px;right:30px;top:20px;display:flex;justify-content:space-between;gap:18px}
.bot-eyes i{position:relative;width:26px;height:33px;border:2px solid #506856;border-radius:50%;background:#fffff7;box-shadow:inset 0 3px 0 #e1ead9}
.bot-eyes i:before{content:'';position:absolute;width:9px;height:14px;left:8px;top:10px;border-radius:50%;background:var(--ink)}
.bot-eyes i:after{content:'';position:absolute;width:3px;height:4px;left:10px;top:11px;border-radius:50%;background:white}
.bot-cheek{position:absolute;top:53px;width:16px;height:9px;border-radius:50%;background:#f2a3af}
.cheek-left{left:15px}
.cheek-right{right:15px}
.screen{display:flex;flex-direction:column;align-items:center;justify-content:center;height:66px;padding:4px 5px;background:#eff8db;border:2px solid #6b9476;border-radius:14px;box-shadow:inset 0 3px 0 #d3e8c4;color:#425d50}
.screen-glyph{font:500 37px/.95 var(--display);letter-spacing:-1px}
.screen-bottom{font:800 7px/1.15 var(--sans);margin-top:4px;text-align:center;color:#536e53;white-space:nowrap}
.bot-foot{position:absolute;bottom:-12px;width:32px;height:15px;border:2px solid var(--ink);border-radius:4px 4px 8px 8px;background:#7485b9;z-index:-1}
.foot-left{left:17px;transform:rotate(6deg)}
.foot-right{right:17px;transform:rotate(-6deg)}
.contraption.running{animation:oddbot-think .55s ease-out}
.contraption.running .bot-eyes i:before{left:4px;top:8px}
.contraption[data-state=solved]{background:#b1eac4;box-shadow:inset -9px -5px 0 #82c89a}
.contraption[data-state=solved] .screen{background:#e5ffc4}
.contraption[data-state=solved] .bot-eyes i{height:23px;border-radius:50% 50% 35% 35%;transform:translateY(6px)}
.contraption[data-state=solved] .bot-eyes i:before{height:8px;top:8px}
.contraption[data-state=revealed],.contraption[data-state=inspected]{background:#dcd2f8;box-shadow:inset -9px -5px 0 #b8a8d9}
.contraption[data-state=revealed] .screen,.contraption[data-state=inspected] .screen{background:#eee7ff;border-color:#9b86b6}
@keyframes oddbot-think{0%,100%{transform:rotate(-3deg)}25%{transform:rotate(3deg) translateY(-3px)}65%{transform:rotate(-6deg)}}
@media(max-width:1050px){.input-port{margin-right:32px}.output-port{margin-left:32px}.flow-port{width:76px}.input-port:after{right:-28px}.output-port:before{left:-28px}}
@media(max-width:800px){.machine-scene{height:213px}.input-port{margin-right:43px}.output-port{margin-left:43px}.flow-port{width:88px}.input-port:after{right:-34px}.output-port:before{left:-34px}}
@media(max-width:520px){
 .machine-scene{height:204px;padding:15px 10px 32px}
 .contraption{width:128px;height:134px;padding:54px 13px 10px;border-radius:30px 30px 22px 22px}
 .bot-eyes{left:22px;right:22px;top:18px;gap:13px}
 .bot-eyes i{width:25px;height:31px}
 .bot-cheek{top:49px;width:13px}
 .cheek-left{left:10px}.cheek-right{right:10px}
 .screen{height:59px}.screen-glyph{font-size:33px}.screen-bottom{font-size:6.5px}
 .flow-port{width:65px;min-height:76px;border-radius:11px}
 .port-number{font-size:27px}.port-caption{font-size:11px}
 .input-port{margin-right:23px}.output-port{margin-left:23px}
 .input-port:after,.output-port:before{font-size:24px;top:24px}
 .input-port:after{right:-22px}.output-port:before{left:-22px}
 .scene-cloud-left{left:-28px;top:45px}.scene-cloud-right{right:-20px;top:25px}
 .scene-footnote{font-size:9px;left:10px;right:10px}
}
@media(max-width:360px){
 .flow-port{width:49px;min-height:70px}
 .port-number{font-size:23px}.port-caption{font-size:11px}
 .input-port{margin-right:20px}.output-port{margin-left:20px}
 .contraption{width:118px;height:129px;padding-inline:11px}
 .bot-eyes{left:18px;right:18px}
 .ear-left{left:-12px}.ear-right{right:-12px}
}
@media(prefers-reduced-motion:reduce){.contraption.running{animation:none}}

/* Oddbot's workbench: a working conveyor, inspection window and paper tickets. */
.machine-scene{height:196px;padding:28px 18px 35px;background:#c0dce1;border-block:2px solid #8aa6a6;isolation:isolate}
.machine-scene:before{content:'';position:absolute;inset:9px;border:1px solid #9ab8b4;border-radius:9px;box-shadow:inset 0 0 0 5px #d2e7e3;z-index:-1}
.machine-scene:after{content:'';position:absolute;left:18px;right:18px;top:12px;bottom:29px;background:radial-gradient(circle at 4px 4px,#8dad97 2px,transparent 2.5px) top left/100% 100%,radial-gradient(circle at calc(100% - 4px) 4px,#8dad97 2px,transparent 2.5px);z-index:-1;pointer-events:none}
.scene-cloud{width:70px;height:70px;left:23px;top:22px;background:#eaf5df;border:5px solid #8fac98;border-radius:50%;opacity:.85;z-index:-1}
.scene-cloud:before{width:4px;height:60px;left:28px;bottom:0;background:#8fac98;border-radius:0}
.scene-cloud:after{width:60px;height:4px;left:0;top:28px;background:#8fac98;border-radius:0}
.scene-cloud-right{left:auto;right:23px;width:64px;height:64px;top:24px;opacity:.45}
.scene-cloud-right:before{height:54px;left:25px}
.scene-cloud-right:after{width:54px;top:25px}
.scene-floor{left:25px;right:25px;bottom:27px;height:18px;border:2px solid #5e7c7e;border-radius:11px;background:repeating-linear-gradient(90deg,#7e9b9a 0 19px,#b0c6b9 19px 22px);box-shadow:0 4px 0 #a2b9ac}
.scene-floor:before{width:auto;height:auto;inset:3px;top:3px;left:3px;background:transparent;border:1px solid #bfd3af;border-radius:8px;transform:none}
.scene-footnote{bottom:5px;left:8px;right:8px;color:#496450;font:700 11px/1.5 var(--sans)}
.flow-port{width:80px;min-height:72px;border-color:#6e8979;border-radius:5px 11px 11px 5px;background:#fffdf0;box-shadow:0 4px 0 #8da38a}
.flow-port:before{border-color:#6e8979}
.input-port{margin-right:35px;border-left:5px solid #e4b759}
.output-port{margin-left:35px;border-left:5px solid #d49a82;background:#fff0c5}
.port-caption{font-size:11px;color:#617057}
.port-number{font-size:29px;color:#38544c;margin-top:3px}
.input-port:after,.output-port:before{color:#658873;font-size:26px;top:23px}
.input-port:after{right:-30px}
.output-port:before{left:-31px}
.contraption{--bot-scale:.9;transform:rotate(-3deg) scale(var(--bot-scale));margin-inline:-6px;border-color:#3d5d52;background:#bddfb5;box-shadow:inset -9px -5px 0 #8ab491}
.screen{background:#edf4ca;border-color:#73966b;color:#466a45}
.bot-eyes i{border-color:#627f5c}
.bot-eyes i:before{background:#355b4b}
.bot-ear{background:#f3d075;border-color:#54745e}
.bot-foot{background:#6a8eb4;border-color:#496b70}
.bot-antenna{background:#52725e}
.bot-antenna:after{background:#e9a58e;border-color:#5f7964;box-shadow:inset -3px -2px 0 #cb8976}
.machine-lights{position:absolute;top:15px;right:18px;display:flex;gap:5px;z-index:4}
.machine-lights i{width:7px;height:7px;border:1px solid #89a08a;border-radius:50%;background:#dce6cd}
.machine-lights i.lit{background:#e9b84c;border-color:#ad8e40;box-shadow:0 0 0 2px #f9e8a933}
.machine-scene:has(.contraption.running) .scene-floor{animation:conveyor-turn .55s linear}
.machine-scene:has(.contraption.running) .input-port{animation:ticket-feed .3s ease-out}
.machine-scene:has(.contraption.running) .output-port{animation:ticket-print .28s .27s ease-out}
@keyframes conveyor-turn{to{background-position:44px 0}}
@keyframes ticket-feed{50%{transform:translateX(5px) rotate(2deg)}}
@keyframes ticket-print{50%{transform:translateX(5px);background:#fffbe1}}
@keyframes oddbot-think{0%,100%{transform:rotate(-3deg) scale(var(--bot-scale))}28%{transform:rotate(3deg) translateY(-3px) scale(var(--bot-scale))}68%{transform:rotate(-5deg) scale(var(--bot-scale))}}
@media(max-width:1050px){.input-port{margin-right:23px}.output-port{margin-left:23px}.flow-port{width:70px}.input-port:after{right:-24px}.output-port:before{left:-25px}.contraption{--bot-scale:.84;margin-inline:-10px}}
@media(max-width:800px){.machine-scene{height:186px;padding-top:24px}.input-port{margin-right:35px}.output-port{margin-left:35px}.flow-port{width:80px}.input-port:after{right:-30px}.output-port:before{left:-31px}.contraption{--bot-scale:.9;margin-inline:-6px}}
@media(max-width:520px){.machine-scene{height:151px;padding:24px 9px 25px}.contraption{--bot-scale:.72;margin-inline:-14px}.flow-port{width:62px;min-height:59px;border-radius:5px 9px 9px 5px}.input-port{margin-right:20px}.output-port{margin-left:20px}.port-number{font-size:25px;margin-top:2px}.port-caption{font-size:10px}.input-port:after,.output-port:before{top:18px;font-size:22px}.input-port:after{right:-22px}.output-port:before{left:-23px}.scene-floor{left:17px;right:17px;bottom:24px;height:14px}.scene-footnote{bottom:4px;font-size:10px}.scene-cloud{width:52px;height:52px;left:17px;top:13px;border-width:4px}.scene-cloud:before{height:44px;left:20px}.scene-cloud:after{width:44px;top:20px}.scene-cloud-right{left:auto;right:17px}.machine-lights{top:12px;right:13px;gap:4px}.machine-lights i{width:6px;height:6px}}
@media(max-width:360px){.machine-scene{height:143px}.contraption{--bot-scale:.64;margin-inline:-14px}.flow-port{width:52px;min-height:56px}.input-port{margin-right:15px}.output-port{margin-left:15px}.port-number{font-size:23px}.input-port:after{right:-19px}.output-port:before{left:-20px}.scene-footnote{font-size:9px}.scene-cloud{opacity:.5}}

