/* The audit's steps as small animated scenes: what the robot is doing, drawn in the report's own
   materials (white paper windows, ink-blue lines, the yellow measuring tape). Used by the tracking
   page (/audit/<id>) and by the home page's steps. Markup: scenes.js.
   Every size is in cqw, so a scene scales with its box. Base styles are the finished picture:
   under reduced motion the animations are dropped and each scene rests on it. */

.scn { --sc-ink: #16264a; --sc-paper: #ffffff; --sc-line: #d6dbe7; --sc-wash: #eef1f8; --sc-tape: #ffd23f; --sc-tape-edge: #d9ac00;
      --sc-pass: #1b774a; --sc-fail: #c2311d; --sc-t: 7s;
      position: relative; width: 100%; aspect-ratio: 16 / 10; container-type: inline-size; overflow: hidden;
      color: var(--sc-ink); font-family: var(--font-text, system-ui, sans-serif); isolation: isolate; }
.scn *, .scn *::before, .scn *::after { box-sizing: border-box; }
.scn i { font-style: normal; display: block; }

/* paper window */
.scn-win { position: absolute; inset: 9cqw 10cqw auto 10cqw; height: 46cqw; background: var(--sc-paper); border-radius: 1.6cqw;
          box-shadow: 0 3cqw 8cqw -2cqw rgba(0, 0, 0, .55), 0 0 0 .12cqw rgba(255, 255, 255, .08); overflow: hidden; }
.scn-bar { display: flex; align-items: center; gap: 1cqw; height: 4.6cqw; padding: 0 1.6cqw; background: var(--sc-wash); border-bottom: .15cqw solid var(--sc-line); }
.scn-bar b { width: 1cqw; height: 1cqw; border-radius: 50%; background: var(--sc-line); }
.scn-bar span { margin-left: 1cqw; flex: 1; height: 2.4cqw; border-radius: 1.2cqw; background: var(--sc-paper); box-shadow: inset 0 0 0 .15cqw var(--sc-line);
               font: 500 1.35cqw/2.4cqw var(--font-mono, ui-monospace, monospace); padding: 0 1.2cqw; color: #5e6c87; white-space: nowrap; overflow: hidden; }
.scn-cart { position: relative; width: 2.6cqw; height: 2.6cqw; border-radius: .6cqw; background: var(--sc-paper); box-shadow: inset 0 0 0 .15cqw var(--sc-line); }
.scn-cart::after { content: "1"; position: absolute; top: -.9cqw; right: -.9cqw; width: 1.9cqw; height: 1.9cqw; border-radius: 50%; background: var(--sc-ink); color: #fff;
                  font: 600 1.1cqw/1.9cqw var(--font-text, sans-serif); text-align: center; animation: scn-badge var(--sc-t) infinite both; }
.sk { height: 1.3cqw; border-radius: .65cqw; background: var(--sc-line); }
.sk + .sk { margin-top: 1.1cqw; }
.sk.w40 { width: 40%; } .sk.w60 { width: 60%; } .sk.w80 { width: 80%; }
.sk.dark { background: var(--sc-ink); height: 1.9cqw; }

/* the measuring tape */
.scn-tape { position: relative; height: 3cqw; border-radius: .3cqw 0 0 .3cqw;
           background: repeating-linear-gradient(90deg, var(--sc-ink) 0 .25cqw, transparent .25cqw 10%) 0 0 / 100% 46% no-repeat,
                       repeating-linear-gradient(90deg, var(--sc-ink) 0 .12cqw, transparent .12cqw 2%) 0 0 / 100% 24% no-repeat, var(--sc-tape);
           border-bottom: .25cqw solid var(--sc-tape-edge); }
.scn-tape::after { content: ""; position: absolute; top: -.5cqw; bottom: -.5cqw; right: -.7cqw; width: .7cqw; background: var(--sc-ink); border-radius: 0 .35cqw .35cqw 0; }

/* pointer */
.scn-cursor { position: absolute; z-index: 5; width: 3cqw; height: 3cqw; left: 0; top: 0;
             background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 2.5v17l4.6-4.3 3 6.6 2.6-1.2-3-6.5H19z' fill='%2316264a' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
             filter: drop-shadow(0 .4cqw .6cqw rgba(0, 0, 0, .35)); }
.scn-stop { position: absolute; z-index: 6; display: inline-flex; align-items: center; gap: 1cqw; padding: 1.1cqw 1.8cqw 1.1cqw 1.3cqw; border-radius: 3cqw; background: var(--sc-tape); color: var(--sc-ink);
           font: 600 1.7cqw/1 var(--font-text, sans-serif); white-space: nowrap; box-shadow: 0 1.2cqw 3cqw -1cqw rgba(0, 0, 0, .5); }
.scn-stop::before { content: ""; width: 1.5cqw; height: 1.5cqw; border-radius: .3cqw; background: var(--sc-ink); }

/* 1. the address typed into the field (home page) */
.scn--url .scn-field { position: absolute; left: 12cqw; right: 12cqw; top: 22cqw; height: 9cqw; display: flex; align-items: center; gap: 1.5cqw; padding: 0 1.2cqw 0 3cqw; border-radius: 2cqw;
                     background: var(--sc-paper); box-shadow: 0 3cqw 8cqw -2cqw rgba(0, 0, 0, .55); }
.scn--url .scn-typed { flex: 1; overflow: hidden; }
.scn--url .scn-typed span { display: inline-block; max-width: 100%; overflow: hidden; white-space: nowrap; vertical-align: bottom; font: 500 2.6cqw/1.3 var(--font-mono, monospace);
                          border-right: .3cqw solid var(--sc-ink); width: 21ch; animation: scn-type var(--sc-t) steps(21) infinite both; }
.scn--url .scn-go { display: inline-flex; align-items: center; height: 6.6cqw; padding: 0 2.6cqw; border-radius: 1.4cqw; background: var(--sc-ink); color: #fff; font: 500 2.1cqw/1 var(--font-text, sans-serif); white-space: nowrap;
                  animation: scn-press-late var(--sc-t) infinite both; }
.scn--url .scn-ring { position: absolute; right: 13cqw; top: 23.2cqw; width: 22cqw; height: 6.6cqw; border-radius: 1.4cqw; box-shadow: 0 0 0 .3cqw var(--sc-tape); opacity: 0; animation: scn-ring var(--sc-t) infinite both; }
.scn--url .scn-note { position: absolute; left: 15cqw; top: 34cqw; font: 400 1.7cqw/1 var(--font-text, sans-serif); color: rgba(255, 255, 255, .62); }
@keyframes scn-type { 0%, 6% { width: 0; } 52%, 100% { width: 21ch; } }
@keyframes scn-press-late { 0%, 62%, 74%, 100% { transform: none; } 67% { transform: scale(.94); } }
@keyframes scn-ring { 0%, 66% { opacity: 0; transform: scale(1); } 70% { opacity: 1; } 88%, 100% { opacity: 0; transform: scale(1.25, 1.7); } }

/* 2. pages and catalogue read */
.scn--pages .scn-sheet { position: absolute; top: 8cqw; width: 26cqw; height: 36cqw; padding: 3cqw 2.6cqw; background: var(--sc-paper); border-radius: 1.4cqw; box-shadow: 0 3cqw 7cqw -2cqw rgba(0, 0, 0, .55); }
.scn--pages .scn-sheet:nth-child(1) { left: 12cqw; transform: rotate(-7deg); }
.scn--pages .scn-sheet:nth-child(2) { left: 37cqw; top: 6cqw; z-index: 1; }
.scn--pages .scn-sheet:nth-child(3) { left: 62cqw; transform: rotate(7deg); }
.scn--pages .scn-sheet::before { content: ""; display: block; height: 9cqw; margin-bottom: 2cqw; border-radius: .8cqw; background: var(--sc-wash); }
.scn--pages .scn-beam { position: absolute; z-index: 2; left: 6cqw; right: 6cqw; top: 6cqw; height: .5cqw; border-radius: 1cqw; background: var(--sc-tape);
                      box-shadow: 0 0 3cqw 1cqw rgba(255, 210, 63, .45), 0 -6cqw 6cqw 0 rgba(255, 210, 63, .08); opacity: 0; animation: scn-beam 3.5s cubic-bezier(.5, 0, .5, 1) infinite both; }
.scn-chips { position: absolute; z-index: 3; left: 0; right: 0; bottom: 5cqw; display: flex; justify-content: center; gap: 1.4cqw; margin: 0; padding: 0; list-style: none; }
.scn-chips li { display: inline-flex; align-items: center; gap: .9cqw; height: 4.4cqw; padding: 0 1.8cqw 0 1.3cqw; border-radius: 2.2cqw; background: rgba(255, 255, 255, .1); color: #fff;
               font: 500 1.5cqw/1 var(--font-mono, monospace); box-shadow: inset 0 0 0 .15cqw rgba(255, 255, 255, .16); animation: scn-chip var(--sc-t) infinite both; }
.scn-chips li::before { content: ""; width: 1.9cqw; height: 1.9cqw; border-radius: 50%; background: var(--sc-tape) no-repeat center / 62% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.3 2.3 4.7-5' fill='none' stroke='%2316264a' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.scn-chips li:nth-child(2) { animation-delay: .9s; } .scn-chips li:nth-child(3) { animation-delay: 1.8s; } .scn-chips li:nth-child(4) { animation-delay: 2.7s; }
@keyframes scn-beam { 0% { transform: translateY(0); opacity: 0; } 10%, 85% { opacity: 1; } 100% { transform: translateY(40cqw); opacity: 0; } }
@keyframes scn-chip { 0% { opacity: .28; transform: translateY(.6cqw); } 10%, 100% { opacity: 1; transform: none; } }

/* 3. the home page in a fresh browser: banner and trackers */
.scn--home .scn-body { position: relative; height: calc(100% - 4.6cqw); padding: 3cqw; }
.scn--home .scn-hero { height: 16cqw; border-radius: 1cqw; background: var(--sc-wash); margin-bottom: 2.4cqw; }
.scn--home .scn-banner { position: absolute; left: 3cqw; right: 3cqw; bottom: 2.4cqw; display: flex; align-items: center; gap: 1.2cqw; padding: 1.6cqw 2cqw; border-radius: 1.2cqw; background: var(--sc-ink);
                       animation: scn-banner var(--sc-t) infinite both; }
.scn--home .scn-banner .sk { flex: 1; margin: 0; background: rgba(255, 255, 255, .35); }
.scn--home .scn-banner b { height: 3.4cqw; padding: 0 1.6cqw; border-radius: .8cqw; font: 500 1.4cqw/3.4cqw var(--font-text, sans-serif); white-space: nowrap; }
.scn--home .scn-banner b:nth-of-type(1) { color: #fff; box-shadow: inset 0 0 0 .15cqw rgba(255, 255, 255, .5); }
.scn--home .scn-banner b:nth-of-type(2) { background: #fff; color: var(--sc-ink); }
.scn-dot { position: absolute; z-index: 4; width: 2cqw; height: 2cqw; border-radius: 50%; background: var(--sc-tape); box-shadow: 0 0 0 .3cqw var(--sc-ink); animation: scn-pop var(--sc-t) infinite both; }
.scn-dot::after { content: ""; position: absolute; inset: -.3cqw; border-radius: 50%; box-shadow: 0 0 0 .25cqw var(--sc-tape); animation: scn-sonar 1.8s ease-out infinite; }
.scn-dot:nth-of-type(1) { left: 22cqw; top: 19cqw; animation-delay: 1.4s; }
.scn-dot:nth-of-type(2) { left: 47cqw; top: 14cqw; animation-delay: 1.9s; }
.scn-dot:nth-of-type(3) { left: 68cqw; top: 24cqw; animation-delay: 2.4s; }
.scn-dot:nth-of-type(4) { left: 36cqw; top: 31cqw; animation-delay: 2.9s; }
.scn-dot:nth-of-type(5) { left: 78cqw; top: 15cqw; animation-delay: 3.4s; }
.scn--home .scn-stop { left: 50%; bottom: 3cqw; transform: translateX(-50%); }
@keyframes scn-banner { 0%, 6% { transform: translateY(160%); } 16%, 100% { transform: none; } }
@keyframes scn-pop { 0% { transform: scale(0); } 6%, 100% { transform: scale(1); } }
@keyframes scn-sonar { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }

/* 4. the purchase on a desktop: product, cart, stop at checkout */
.scn--desktop .scn-body { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; height: calc(100% - 4.6cqw); padding: 3cqw; }
.scn--desktop .scn-photo, .scn--mobile .scn-photo { border-radius: 1cqw; background: var(--sc-wash) no-repeat center / 34% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 8h12l1 12H5zM9 8a3 3 0 016 0' fill='none' stroke='%23b9c1d6' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.scn--desktop .scn-info { padding-top: 1cqw; }
.scn-add { display: block; margin-top: 3cqw; height: 5.4cqw; border-radius: 1cqw; background: var(--sc-ink); color: #fff; font: 500 1.7cqw/5.4cqw var(--font-text, sans-serif); text-align: center; white-space: nowrap;
          animation: scn-press var(--sc-t) infinite both; }
.scn-drawer { position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: 44%; padding: 3cqw 2.4cqw; background: var(--sc-paper); box-shadow: -2cqw 0 5cqw -2cqw rgba(22, 38, 74, .35);
             animation: scn-drawer var(--sc-t) infinite both; }
.scn-drawer strong { display: block; font: 500 2cqw/1 var(--font-text, sans-serif); margin-bottom: 2.4cqw; }
.scn-drawer .scn-add { background: var(--sc-tape); color: var(--sc-ink); animation-name: scn-press-2; margin-top: 5cqw; }
.scn--desktop .scn-cursor { animation: scn-cursor-d var(--sc-t) cubic-bezier(.45, 0, .2, 1) infinite both; }
.scn--desktop .scn-stop { right: 6cqw; bottom: 3.4cqw; animation: scn-stop var(--sc-t) infinite both; }
@keyframes scn-cursor-d { 0%, 6% { transform: translate(84cqw, 50cqw); } 24%, 34% { transform: translate(66cqw, 37.5cqw); } 58%, 70% { transform: translate(73cqw, 40.5cqw); } 90%, 100% { transform: translate(84cqw, 50cqw); } }
@keyframes scn-press { 0%, 25%, 33%, 100% { transform: none; } 29% { transform: scale(.94); } }
@keyframes scn-press-2 { 0%, 60%, 68%, 100% { transform: none; } 64% { transform: scale(.94); } }
@keyframes scn-badge { 0%, 29% { transform: scale(0); } 34%, 100% { transform: scale(1); } }
@keyframes scn-drawer { 0%, 38% { transform: translateX(105%); } 48%, 94% { transform: none; } 100% { transform: translateX(105%); } }
@keyframes scn-stop { 0%, 66% { opacity: 0; transform: translateY(1.5cqw); } 72%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* 5. the same purchase on a phone */
.scn-phone { position: absolute; left: 50%; top: 4cqw; width: 26cqw; height: 54cqw; margin-left: -13cqw; padding: 1cqw; border-radius: 4cqw; background: #050a18; box-shadow: 0 3cqw 8cqw -2cqw rgba(0, 0, 0, .6), inset 0 0 0 .2cqw rgba(255, 255, 255, .18); }
.scn-phone > div { position: relative; height: 100%; padding: 4cqw 1.6cqw 0; border-radius: 3.1cqw; background: var(--sc-paper); overflow: hidden; }
.scn-phone > div::before { content: ""; position: absolute; top: 1.1cqw; left: 50%; width: 7cqw; height: 1.5cqw; margin-left: -3.5cqw; border-radius: 1cqw; background: #050a18; }
.scn--mobile .scn-photo { height: 19cqw; margin-bottom: 2cqw; }
.scn--mobile .scn-cart { position: absolute; top: 3.2cqw; right: 1.8cqw; z-index: 2; }
.scn--mobile .scn-sticky { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4cqw 1.6cqw 2.2cqw; background: var(--sc-paper); box-shadow: 0 -1cqw 2cqw -1cqw rgba(22, 38, 74, .25); }
.scn--mobile .scn-add { margin: 0; height: 4.8cqw; line-height: 4.8cqw; font-size: 1.5cqw; }
.scn-touch { position: absolute; z-index: 5; left: 50%; bottom: 3.6cqw; width: 4cqw; height: 4cqw; margin-left: -2cqw; border-radius: 50%; background: rgba(255, 210, 63, .55); box-shadow: 0 0 0 .3cqw var(--sc-tape);
            animation: scn-touch var(--sc-t) infinite both; }
.scn--mobile .scn-stop { left: 50%; bottom: 18cqw; transform: translateX(-50%); animation: scn-stop-c var(--sc-t) infinite both; }
.scn-side { position: absolute; top: 50%; width: 22cqw; transform: translateY(-50%); display: grid; gap: 1.6cqw; margin: 0; padding: 0; list-style: none; }
.scn-side--l { left: 7cqw; } .scn-side--r { right: 7cqw; }
.scn-side li { display: flex; align-items: center; gap: 1cqw; font: 500 1.55cqw/1.25 var(--font-text, sans-serif); color: #fff; animation: scn-chip var(--sc-t) infinite both; }
.scn-side li::before { content: ""; flex: none; width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: var(--sc-tape); }
.scn-side li:nth-child(2) { animation-delay: 1.2s; } .scn-side li:nth-child(3) { animation-delay: 2.4s; }
.scn-side--r li { animation-delay: 3.4s; } .scn-side--r li:nth-child(2) { animation-delay: 4.2s; } .scn-side--r li:nth-child(3) { animation-delay: 5s; }
@keyframes scn-touch { 0%, 18% { transform: scale(0); opacity: 0; } 24% { transform: scale(1); opacity: 1; } 30% { transform: scale(.7); opacity: 1; } 40%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes scn-stop-c { 0%, 52% { opacity: 0; transform: translate(-50%, 1.5cqw); } 60%, 95% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }

/* 6. speed */
.scn--speed svg { position: absolute; left: 50%; top: 7cqw; width: 46cqw; height: 26cqw; margin-left: -23cqw; overflow: visible; }
.scn--speed .g-track { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 7; stroke-linecap: round; }
.scn--speed .g-fill { fill: none; stroke: var(--sc-tape); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 283; stroke-dashoffset: 70; animation: scn-gauge 4.5s cubic-bezier(.3, .6, .2, 1) infinite both; }
.scn--speed .g-needle { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; transform-origin: 100px 100px; transform: rotate(45deg); animation: scn-needle 4.5s cubic-bezier(.3, .6, .2, 1) infinite both; }
.scn--speed .g-hub { fill: #fff; }
.scn-vitals { position: absolute; left: 18cqw; right: 18cqw; bottom: 6cqw; display: grid; gap: 1.5cqw; margin: 0; padding: 0; list-style: none; }
.scn-vitals li { display: grid; grid-template-columns: 7cqw 1fr; align-items: center; gap: 1.5cqw; font: 500 1.6cqw/1 var(--font-mono, monospace); color: #fff; }
.scn-vitals i { height: 1.4cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .14); overflow: hidden; }
.scn-vitals i::after { content: ""; display: block; height: 100%; width: var(--w); border-radius: 1cqw; background: var(--sc-tape); transform-origin: 0 50%; animation: scn-grow 4.5s cubic-bezier(.3, .6, .2, 1) infinite both; }
.scn-vitals li:nth-child(2) i::after { animation-delay: .25s; } .scn-vitals li:nth-child(3) i::after { animation-delay: .5s; }
@keyframes scn-gauge { 0% { stroke-dashoffset: 283; } 55%, 100% { stroke-dashoffset: 70; } }
@keyframes scn-needle { 0% { transform: rotate(-90deg); } 45% { transform: rotate(52deg); } 55%, 100% { transform: rotate(45deg); } }
@keyframes scn-grow { 0% { transform: scaleX(0); } 55%, 100% { transform: none; } }

/* 7. the report written */
.scn--report .scn-paper { position: absolute; left: 22cqw; right: 22cqw; top: 6cqw; bottom: -6cqw; padding: 4cqw 4cqw 0; background: var(--sc-paper); border-radius: 1.6cqw 1.6cqw 0 0; box-shadow: 0 3cqw 8cqw -2cqw rgba(0, 0, 0, .55); }
.scn--report .scn-row { display: grid; grid-template-columns: 6cqw 1fr; align-items: center; gap: 1.5cqw; margin-top: 2.6cqw; font: 600 1.7cqw/1 var(--font-text, sans-serif); }
.scn--report .scn-rail { border-bottom: .25cqw dotted var(--sc-line); }
.scn--report .scn-tape { width: var(--w); transform-origin: 0 50%; animation: scn-pull var(--sc-t) cubic-bezier(.2, .7, .15, 1) infinite both; }
.scn--report .scn-row:nth-of-type(2) .scn-tape { animation-delay: .35s; } .scn--report .scn-row:nth-of-type(3) .scn-tape { animation-delay: .7s; }
.scn--report .scn-prio { margin: 4cqw 0 0; padding: 0; list-style: none; counter-reset: p; }
.scn--report .scn-prio li { counter-increment: p; display: grid; grid-template-columns: 4cqw 1fr; align-items: center; padding: 1.6cqw 0; border-top: .3cqw solid var(--sc-ink); animation: scn-line var(--sc-t) infinite both; }
.scn--report .scn-prio li::before { content: counter(p); font: 500 3cqw/.9 var(--font-display, sans-serif); letter-spacing: -.04em; }
.scn--report .scn-prio li:nth-child(1) { animation-delay: 1.6s; } .scn--report .scn-prio li:nth-child(2) { animation-delay: 2.1s; } .scn--report .scn-prio li:nth-child(3) { animation-delay: 2.6s; }
@keyframes scn-pull { 0%, 4% { clip-path: inset(-1cqw 100% -1cqw 0); } 30%, 100% { clip-path: inset(-1cqw -1cqw -1cqw 0); } }
@keyframes scn-line { 0% { opacity: 0; transform: translateY(1cqw); } 8%, 100% { opacity: 1; transform: none; } }

/* waiting in the queue */
.scn--wait .scn-slots { position: absolute; left: 0; right: 0; top: 50%; display: flex; justify-content: center; gap: 2.4cqw; transform: translateY(-50%); }
.scn--wait .scn-slots i { width: 9cqw; height: 12cqw; border-radius: 1.2cqw; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 .15cqw rgba(255, 255, 255, .16); animation: scn-slot 3s ease-in-out infinite both; }
.scn--wait .scn-slots i:nth-child(2) { animation-delay: .25s; } .scn--wait .scn-slots i:nth-child(3) { animation-delay: .5s; } .scn--wait .scn-slots i:nth-child(4) { animation-delay: .75s; } .scn--wait .scn-slots i:nth-child(5) { animation-delay: 1s; }
@keyframes scn-slot { 0%, 60%, 100% { background: rgba(255, 255, 255, .08); transform: none; } 20% { background: var(--sc-tape); transform: translateY(-1.2cqw); } }

@media (prefers-reduced-motion: reduce) {
  .scn *, .scn *::before, .scn *::after { animation: none !important; }
  .scn--pages .scn-beam, .scn--url .scn-ring, .scn-touch { display: none; }
}
