/* Implement page example section. See implement-example.js. Sized in em from the box's width. */
.sp-alt { --ease: cubic-bezier(.16, 1, .3, 1); --spring: cubic-bezier(.34, 1.5, .64, 1); container-type: inline-size; color: var(--ink); font-size: clamp(11px, 2.4cqw, 14px); line-height: 1.3; }
.xx-app { flex: none; display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: .6em; background: #fff; box-shadow: 0 0 0 1px #e4e6e2; }
.xx-app svg { width: 64%; height: 64%; }
.motion-paused .sp-alt *, .motion-paused .sp-alt *::before, .motion-paused .sp-alt *::after { transition: none !important; animation: none !important; }
@keyframes xx-spin { to { transform: rotate(360deg); } }
@keyframes xx-blink { 50% { opacity: .25; } }

/* The race */
.xa-client { display: inline-flex; align-items: center; gap: .6em; margin-bottom: 1em; padding: .4em .95em .4em .4em; border-radius: 2em; background: #fff; box-shadow: 0 .5em 1.2em -.8em rgba(30, 34, 32, .4), 0 0 0 1px #e8e9e6; font-size: .95em; }
.xa-client b { font-weight: 500; }
.xa-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9em; }
.xa-lane { position: relative; padding: 1.1em 1em 1em; border-radius: 1em; background: #e8e9e6; }
.xa-auto { background: var(--ink); color: #f4f4f2; }
.xa-lane header { display: flex; justify-content: space-between; align-items: center; }
.xa-who { display: inline-flex; align-items: center; gap: .45em; font-weight: 500; }
.xa-who svg { width: 1.15em; height: 1.15em; }
.xa-clock { font-size: 1.6em; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.xa-lane { min-width: 0; }
.xa-lane ol { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45em; margin: 1em 0; padding: 0; list-style: none; }
.xa-lane li { min-width: 0; }
.xa-lane li { display: flex; align-items: center; gap: .6em; padding: .5em .55em; border-radius: .7em; background: rgba(255, 255, 255, .55); opacity: .45; transition: opacity .25s, background .25s, box-shadow .25s; }
.xa-auto li { background: #2b2d2f; }
.xa-lane li .xx-app { width: 1.9em; height: 1.9em; border-radius: .5em; }
.xa-lane li span:not(.xx-app) { flex: 1; min-width: 0; overflow: hidden; font-size: .9em; white-space: nowrap; text-overflow: ellipsis; }
.xa-lane li em { color: #8b8e8c; font-size: .78em; font-style: normal; white-space: nowrap; }
.xa-lane li.is-active, .xa-lane li.is-done { opacity: 1; }
.xa-hand li.is-active { background: #fff; box-shadow: 0 0 0 1.5px var(--ink); }
.xa-hand li.is-active span:not(.xx-app)::after { content: "…"; display: inline-block; animation: xx-blink .8s steps(1) infinite; }
.xa-auto li.is-active { background: #3a3d3f; }
.xa-hand li.is-done { background: #fff; }
.xa-bar { height: .35em; overflow: hidden; border-radius: 1em; background: rgba(25, 26, 27, .1); }
.xa-auto .xa-bar { background: rgba(244, 244, 242, .15); }
.xa-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ink); }
.xa-auto .xa-bar i { background: #f4f4f2; }
.xa-done { display: inline-block; margin-top: .9em; padding: .3em .75em; border-radius: 2em; background: var(--ink); color: #fff; font-size: .8em; font-weight: 500; opacity: 0; transform: translateY(.4em); transition: opacity .3s, transform .45s var(--spring); }
.xa-auto .xa-done { background: #f4f4f2; color: var(--ink); }
.xa-lane.is-finished .xa-done { opacity: 1; transform: none; }
.xa-result { display: flex; justify-content: center; align-items: center; gap: .5em; margin-top: 1em; color: var(--muted); font-size: .95em; opacity: 0; transform: translateY(.4em); transition: opacity .4s, transform .5s var(--spring); }
.xa-result b { color: var(--ink); font-weight: 500; }
.xa-result i { width: .3em; height: .3em; margin: 0 .3em; border-radius: 50%; background: #9a9d9b; }
.sp-alt.is-result .xa-result { opacity: 1; transform: none; }
@container (max-width: 400px) { .xa-lanes { grid-template-columns: 1fr; } }
