Skip to content
VibeCodeBench
Back to the app

The code

The Most Uncomfortable Web Page by GPT-6.2 Astra

Exactly as the AI wrote it. Shown as text, so nothing runs on this page.

index.html

works · auto-checked (Checked by an automated pass. Not hand-played yet.)33.0 KB · 419 lines · no libraries
Download
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#f5f1e6">
<title>Patience, please. — Bureau of Minor Inconveniences</title>
<style>
:root{--paper:#f5f1e6;--sheet:#fffcf3;--ink:#24251f;--muted:#66675c;--red:#ef5738;--blue:#374eab;--yellow:#f7d77e;--mono:"Courier New",Courier,monospace;--sans:Arial,Helvetica,sans-serif}
*{box-sizing:border-box}
html{min-height:100%;color:var(--ink);background:var(--paper)}
body{margin:0;min-width:280px;font-family:var(--sans);line-height:1.45}
body::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:10;opacity:.046;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.81' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' filter='url(%23n)' opacity='.85' d='M0 0h160v160H0z'/%3E%3C/svg%3E")}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
button:focus-visible,a:focus-visible{outline:3px solid var(--blue);outline-offset:4px}
button:disabled{cursor:default}
button svg{pointer-events:none}
[hidden]{display:none!important}
svg{display:block}
.sym{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.symbols{position:absolute;width:0;height:0;overflow:hidden}
.wrap{width:min(1180px,calc(100% - 104px));margin-inline:auto}
.mono,.eyebrow,.ticket-label,.card-meta,.status,.tag,.counter,.doc-ref,.copy-label{font-family:var(--mono)}
.masthead{border-bottom:1.5px solid var(--ink)}
.nav{min-height:80px;display:flex;align-items:center;justify-content:space-between;gap:22px}
.identity{display:flex;align-items:center;gap:12px}
.bureau-mark{width:43px;height:43px;flex:none}
.brand-name{font-size:16px;line-height:1.03;letter-spacing:-.65px;font-weight:800}
.nav-actions{display:flex;align-items:center;gap:26px}
.counter{font-size:11px;font-weight:bold;display:flex;align-items:center;gap:9px}
.dot{width:8px;height:8px;border-radius:50%;background:#597143;border:1px solid #35432c;display:inline-block;flex:none}
.text-btn{background:none;border:none;padding:9px 0;min-height:44px;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.text-btn:hover,.link:hover{text-decoration:underline;text-underline-offset:4px}
.nav-actions .text-btn{padding-left:26px;border-left:1px solid #aaa899}
.nav-actions .sym{width:15px;height:15px}
.hero{display:grid;grid-template-columns:minmax(0,1fr) 32%;align-items:center;gap:22px;padding:24px 0 22px;min-height:282px}
.eyebrow{font-weight:bold;font-size:11px;line-height:1.3;letter-spacing:1.5px;display:flex;gap:10px;align-items:center;color:#47483e}
.stripes{height:12px;width:31px;display:inline-block;transform:skewX(-23deg);background:repeating-linear-gradient(90deg,var(--red) 0 4px,transparent 4px 7px)}
h1{font-family:var(--sans);font-size:clamp(62px,7.15vw,106px);line-height:1.04;letter-spacing:-.083em;font-weight:800;margin:18px 0 14px}
h1 em{font-family:Georgia,"Times New Roman",serif;font-weight:400;letter-spacing:-.088em;position:relative;white-space:nowrap;margin-left:.025em}
.scribble{position:absolute;bottom:-.025em;left:3%;width:96%;height:.1em;overflow:visible;color:var(--red);z-index:-1}
.hero-copy{position:relative;z-index:1}
.intro{margin:0;color:#505148;font-size:clamp(15px,1.2vw,18px);line-height:1.55;max-width:515px;letter-spacing:-.017em}
.clerk{width:100%;height:auto;max-height:240px;overflow:visible}
.clerk .arm,.clerk .outline{stroke:var(--ink);stroke-linecap:round;stroke-linejoin:round}
.workspace{display:grid;grid-template-columns:minmax(0,2.56fr) minmax(246px,1fr);gap:32px;align-items:start}
.desk{position:relative;isolation:isolate}
.desk::before{position:absolute;content:"";inset:6px -4px -5px 5px;border:1px solid var(--ink);background:#e1decf;transform:rotate(.45deg);z-index:-1}
.desk-front{border:1.5px solid var(--ink);background:var(--sheet)}
.card-head{min-height:51px;display:flex;align-items:center;justify-content:space-between;background:var(--blue);color:#fffdf1;padding:0 24px;border-bottom:1.5px solid var(--ink);gap:12px}
.desk-name{display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:-.35px;font-size:17px}
.desk-name .sym{width:21px;height:21px;stroke-width:1.55}
.card-meta{font-size:11px;letter-spacing:.8px;display:flex;align-items:center;gap:10px;font-weight:bold;white-space:nowrap}
.card-body{padding:24px 25px 0}
h2{font-size:clamp(25px,2.2vw,34px);line-height:1.14;letter-spacing:-.055em;margin:0 0 7px;font-weight:750}
.instruction{font-size:14px;line-height:1.5;color:#56574f;margin:0 0 18px}
.field{position:relative;min-height:139px;border:1px dashed #9c9d8f;background-color:#f2f1e7;background-image:linear-gradient(90deg,#5c6b5520 1px,transparent 1px),linear-gradient(#5c6b5520 1px,transparent 1px);background-size:16px 16px;background-position:center;isolation:isolate}
.field::before,.field::after{content:"+";position:absolute;font:16px/1 var(--mono);color:#828775;pointer-events:none;z-index:-1}
.field::before{left:8px;top:5px}.field::after{right:8px;bottom:5px}
.primary{min-height:48px;border:1.5px solid var(--ink);box-shadow:3px 3px 0 var(--ink);background:var(--red);display:inline-flex;align-items:center;justify-content:center;gap:17px;padding:9px 18px;font-size:15px;letter-spacing:-.3px;font-weight:750}
.primary:hover{background:#fb6745}
.primary:active{box-shadow:1px 1px 0 var(--ink)}
.catch{position:absolute;left:50%;top:49%;transform:translate(-50%,-50%) rotate(-2deg);white-space:nowrap;transition:left .17s ease-out,top .17s ease-out,transform .17s ease-out}
.field[data-spot="1"] .catch{left:calc(100% - 100px);top:28%;transform:translate(-50%,-50%) rotate(2deg)}
.field[data-spot="2"] .catch{left:100px;top:71%;transform:translate(-50%,-50%) rotate(-.6deg)}
.desk-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:3px 0 5px;min-height:53px}
.status{font-size:11px;color:#51554b;display:flex;align-items:center;gap:8px;line-height:1.35}
.status::before{content:"";border:1.5px solid #817e6d;border-radius:50%;width:7px;height:7px;flex:none}
.desk[data-stage="3"] .status::before{background:#5a7147;border-color:#5a7147}
.link{font-family:var(--mono);font-size:11px;font-weight:bold;background:transparent;border:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:6px 0;color:#4d5149}
.link .sym{width:14px;height:14px}
.ticket-wrap{position:relative;padding:2px 4px 0 0}
.ticket{background:var(--yellow);border:1.5px solid var(--ink);box-shadow:3px 4px 0 #d0c7ac;transform:rotate(1.7deg);position:relative}
.ticket-top{padding:17px 21px 13px}
.ticket-caption{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #393b2d;padding-bottom:10px}
.ticket-caption .sym{width:21px;height:21px;stroke-width:1.6}
.ticket-label{font-size:10px;letter-spacing:1.3px;font-weight:bold}
.ticket-number{text-align:center;font-size:clamp(47px,4.9vw,76px);letter-spacing:-.085em;font-weight:800;line-height:1.07;margin:13px 0 3px;font-variant-numeric:tabular-nums}
.ticket-sub{text-align:center;font:10px/1.3 var(--mono);letter-spacing:1.2px;text-transform:uppercase}
.perf{height:1px;position:relative;margin-top:3px;border-top:1.5px dashed #716347}
.perf::before,.perf::after{content:"";position:absolute;width:17px;height:17px;border:1.5px solid var(--ink);border-radius:50%;top:-9.5px;background:var(--paper)}
.perf::before{clip-path:inset(-1px -1px -1px 50%);left:-10px}.perf::after{clip-path:inset(-1px 50% -1px -1px);right:-10px}
.ticket-bottom{padding:20px 22px 17px}
.tally{display:flex;justify-content:space-between;gap:8px;align-items:center;font:12px var(--mono)}
.tally b{font-size:12px}
.segments{display:flex;gap:4px;margin:9px 0 17px}
.segments span{border:1px solid #655b40;background:#fae5a9;height:7px;flex:1}
.segments span.done{background:var(--ink);border-color:var(--ink)}
.barcode-line{display:flex;align-items:center;justify-content:space-between;gap:8px}
.barcode{width:49%;height:34px;background:repeating-linear-gradient(90deg,#24251f 0px 1px,transparent 1px 3px,#24251f 3px 5px,transparent 5px 7px,#24251f 7px 8px,transparent 8px 10px,#24251f 10px 14px,transparent 14px 16px,#24251f 16px 18px,transparent 18px 22px,#24251f 22px 23px,transparent 23px 25px,#24251f 25px 28px,transparent 28px 30px,#24251f 30px 31px,transparent 31px 34px)}
.ink-stamp{font:800 12px/1 var(--mono);letter-spacing:.6px;color:#a33729;border:2px solid #a33729;outline:1px solid #a33729;outline-offset:-4px;transform:rotate(-9deg);padding:7px 8px 6px;text-transform:uppercase}
.ticket-note{margin:17px 8px 0;text-align:center;font:italic 14px Georgia,serif;color:#6c695b}
.footer{margin-top:35px;border-top:1px solid #a8a899;min-height:63px;display:flex;align-items:center;justify-content:space-between;gap:15px}
.doc-ref{font-size:10px;letter-spacing:.7px;color:#696a60}
.footer .link{font-size:12px;color:var(--blue)}
.review{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:137px;padding:15px 26px;gap:10px}
.review-data{width:100%;display:flex;align-items:baseline;justify-content:space-between;font:10px var(--mono);letter-spacing:.7px}
.review-data strong{font-size:15px;letter-spacing:0}
.review-track{width:100%;height:15px;border:1px solid var(--ink);background:var(--sheet);padding:2px}
.review-fill{height:100%;width:0;background:repeating-linear-gradient(-50deg,var(--blue) 0 6px,#5b6bb8 6px 9px)}
.small-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:var(--sheet);color:var(--ink);border:1px solid var(--ink);min-height:44px;padding:5px 13px;font-size:13px;font-weight:bold;box-shadow:2px 2px 0 var(--ink)}
.small-action:disabled{border-style:dashed;box-shadow:none;color:#5f645b;background:#f3f2e8}
.cookie-area{min-height:138px;padding:16px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center}
.cookie-slip{display:flex;flex-direction:column;justify-content:space-between;position:relative;gap:4px;background:#fff5d8;border:1px solid var(--ink);box-shadow:2px 2px 0 #82816d;padding:8px 12px;min-width:122px;transform:rotate(-1.6deg)}
.cookie-slip:nth-child(2){background:#e2e9fc;transform:rotate(2deg)}.cookie-slip:nth-child(3){background:#ffe3d4;transform:rotate(-3deg)}
.copy-label{font-size:9px;letter-spacing:1px;font-weight:bold}
.cookie-title{font-size:15px;font-weight:bold;letter-spacing:-.4px}
.cookie-slip button{background:transparent;border:0;border-top:1px dotted #838275;min-height:44px;padding:1px 0;text-align:left;font:700 12px var(--mono);display:flex;align-items:center;justify-content:space-between;gap:8px}
.cookie-slip button:hover{color:var(--blue)}
.receipt{padding:21px 24px;min-height:139px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.receipt-copy{display:flex;flex-direction:column;gap:6px}
.receipt-copy b{font:italic 24px Georgia,serif}
.receipt-copy span{font:11px var(--mono)}
.seal{color:var(--blue);width:76px;height:76px;flex:none;transform:rotate(9deg)}
.guide{border:1.5px solid var(--ink);background:var(--sheet);box-shadow:5px 5px 0 var(--ink);padding:0;width:min(425px,calc(100% - 40px));max-height:85vh;color:var(--ink)}
.guide::backdrop{background:#25271f66}
.guide-head{display:flex;align-items:center;justify-content:space-between;background:var(--blue);color:white;padding:4px 12px 4px 22px;font-weight:bold}
.guide-head button{display:grid;place-items:center;min-width:44px;min-height:44px;background:transparent;color:white;border:0;font-size:24px}
.guide-body{padding:24px}
.guide-body p{font-size:14px;line-height:1.6;margin:10px 0}
.guide-body ol{padding-left:22px;font-size:14px;line-height:1.7}
.guide-body .primary{margin:10px 5px 4px 0}
.sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(min-width:1500px){.hero{min-height:310px}.card-body{padding-top:29px}.field{min-height:157px}.review,.receipt,.cookie-area{min-height:155px}}
@media(max-width:1050px){.wrap{width:calc(100% - 64px)}.workspace{gap:23px;grid-template-columns:minmax(0,2.55fr) minmax(220px,1fr)}.hero{min-height:255px;grid-template-columns:minmax(0,1fr) 30%;gap:10px}.ticket-bottom{padding-inline:16px}.ink-stamp{font-size:10px}.intro{max-width:460px}.card-body{padding-inline:19px}}
@media(max-width:760px){.wrap{width:calc(100% - 38px)}.nav{min-height:70px}.brand-name{font-size:14px}.bureau-mark{width:36px;height:36px}.identity{gap:8px}.nav-actions{gap:12px}.nav-actions .text-btn{padding-left:12px}.counter{font-size:10px}.hero{min-height:222px;grid-template-columns:minmax(0,1fr) 30%;padding:24px 0}.eyebrow{font-size:9px;letter-spacing:1px}.stripes{width:23px;height:9px}h1{font-size:clamp(46px,7.4vw,62px);margin:14px 0}.intro{font-size:14px;line-height:1.5}.workspace{grid-template-columns:minmax(0,1fr) 195px;gap:17px}.card-head{padding:0 15px;min-height:46px}.desk-name{font-size:15px;gap:7px}.card-meta{font-size:9px;letter-spacing:.2px}.card-body{padding:18px 14px 0}.instruction{font-size:13px}.ticket-top{padding:15px 14px 11px}.ticket-bottom{padding:14px}.ticket-number{font-size:48px}.ticket-note{font-size:12px}.ticket-label{letter-spacing:.6px}.tally{font-size:11px}.desk-foot{flex-wrap:wrap;gap:0 10px}.desk-foot:has(.status:only-child){padding-block:12px}.status,.link{font-size:10px}.doc-ref{font-size:9px}}
@media(max-width:620px){.workspace{grid-template-columns:minmax(0,1fr);gap:23px}.hero{grid-template-columns:minmax(0,1fr) 31%;gap:0}.ticket-wrap{width:min(100%,410px);justify-self:center;padding-right:0}.ticket{display:grid;grid-template-columns:1fr 1.15fr;transform:rotate(-1deg)}.ticket-top{padding:12px 14px}.ticket-caption{padding-bottom:6px}.ticket-caption .sym{display:none}.ticket-number{margin:6px 0 1px;font-size:40px}.ticket-sub{font-size:8px}.perf{position:absolute;left:46.5%;top:0;bottom:0;border-top:0;border-left:1px dashed #716347;margin:0;height:auto}.perf::before,.perf::after{display:none}.ticket-bottom{align-self:center;padding:13px 14px}.segments{margin-bottom:13px}.barcode{height:22px;width:43%}.ink-stamp{font-size:9px;padding:6px}.ticket-note{margin-top:12px}.footer{margin-top:20px;min-height:53px}.card-body{padding:19px 17px 0}.card-head{padding-inline:17px}.desk-foot{min-height:49px;flex-wrap:nowrap}.counter{display:none}.nav-actions .text-btn{border:none;padding:0}.hero .clerk{transform:scale(1.12);transform-origin:center right}.desk-name{font-size:16px}.field{min-height:135px}}
@media(max-width:460px){.hero{grid-template-columns:minmax(0,1fr) 33%;padding:21px 0;min-height:216px}.hero-copy{display:contents}.hero .eyebrow{grid-row:1;grid-column:1}.hero h1{grid-row:2;grid-column:1;position:relative;z-index:1;font-size:clamp(45px,12vw,55px);line-height:.98;margin:9px 0 12px}.hero em{display:block;width:max-content;margin:0}.hero .intro{grid-row:3;grid-column:1/-1;max-width:380px;font-size:13px}.hero .clerk{grid-row:1/3;grid-column:2;width:132%;max-width:none;justify-self:end;transform:none}.doc-ref{letter-spacing:0}.desk-foot .link{white-space:nowrap}.receipt{padding:15px}.review{padding-inline:16px}.finish-title{font-size:39px!important}.cookie-area{gap:6px;padding:10px}.cookie-slip{min-width:104px;padding:6px 8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" class="symbols" aria-hidden="true"><defs>
<symbol id="i-arrow" viewBox="0 0 24 24"><path d="M4 12h15m-6-6 6 6-6 6"/></symbol>
<symbol id="i-up" viewBox="0 0 24 24"><path d="M6 18 18 6M6 6h12v12"/></symbol>
<symbol id="i-doc" viewBox="0 0 24 24"><path d="M5 2.5h10l4 4v15H5zM14 3v5h5M8.5 12h7m-7 4h5"/></symbol>
<symbol id="i-ticket" viewBox="0 0 24 24"><path d="M2.5 6h19v4a2 2 0 0 0 0 4v4h-19v-4a2 2 0 0 0 0-4zM15 7.5v2m0 2v1m0 2v2"/></symbol>
<symbol id="i-play" viewBox="0 0 24 24"><path d="m7 4 12 8-12 8z"/></symbol>
<symbol id="i-stop" viewBox="0 0 24 24"><path d="M6 6h12v12H6z"/></symbol>
<symbol id="i-restart" viewBox="0 0 24 24"><path d="M4 5v6h6M4.5 11a8 8 0 1 1 1.5 7"/></symbol>
</defs></svg>
<header class="masthead"><div class="wrap nav">
<div class="identity">
<svg class="bureau-mark" viewBox="0 0 48 48" aria-hidden="true">
<path fill="#ef5738" stroke="#24251f" stroke-width="1.5" d="m24 1 4.2 3.4 5.3-.8 2.3 4.8 5.1 1.6.2 5.3 3.9 3.7-2.1 5 2.1 4.9-3.9 3.7-.2 5.3-5.1 1.6-2.3 4.8-5.3-.8L24 47l-4.2-3.5-5.3.8-2.3-4.8-5.1-1.6-.2-5.3L3 28.9l2.1-4.9L3 19l3.9-3.7.2-5.3 5.1-1.6 2.3-4.8 5.3.8z"/>
<circle cx="24" cy="24" r="15.6" fill="none" stroke="#24251f" stroke-width="1.2"/>
<g fill="#24251f" transform="rotate(-9 24 24)"><path d="M21 24c2-3 0-4-1.6-6.5-2-3.4.4-6 4.5-6s6.7 2.7 4.7 6c-1.5 2.5-3.7 4-1.7 6zM16.5 25h15l2 5.5h-19zM14.6 32h18.7v2H14.6z"/></g>
</svg><div class="brand-name">Bureau of Minor<br>Inconveniences</div></div>
<div class="nav-actions"><span class="counter"><i class="dot"></i>Counter open</span><button class="text-btn" id="guideOpen">Visitor guide <svg class="sym"><use href="#i-up"/></svg></button></div>
</div></header>
<main class="wrap">
<section class="hero" aria-labelledby="headline">
<div class="hero-copy"><div class="eyebrow"><span class="stripes" aria-hidden="true"></span> PUBLIC WAITING ROOM</div>
<h1 id="headline">Patience, <em>please.<svg class="scribble" viewBox="0 0 200 12" preserveAspectRatio="none" aria-hidden="true"><path d="M2 8Q78 1 198 6Q107 5 9 11Z" fill="currentColor"/></svg></em></h1>
<p class="intro" id="intro">Three mildly inconvenient formalities stand between you and the rest of your day. Shall we begin?</p></div>
<svg class="clerk" viewBox="0 0 360 245" role="img" aria-label="A red rubber stamp clerk in oversized shoes reluctantly reporting for duty.">
<defs>
<pattern id="dots" width="4.1" height="4.1" patternUnits="userSpaceOnUse" patternTransform="rotate(18)"><circle cx="1" cy="1" r=".75" fill="#6f745e"/></pattern>
<pattern id="redhatch" width="4" height="4" patternUnits="userSpaceOnUse" patternTransform="rotate(28)"><path d="M0 0v4" stroke="#9d3324" stroke-width="1.2"/></pattern>
</defs>
<ellipse cx="185" cy="218" rx="102" ry="8" fill="url(#dots)" opacity=".65"/>
<path d="m79 66 2.3 6.7 6.7 2.4-6.9 2.2-2.1 6.6-2.2-6.6-6.7-2.3 6.7-2.3zM284 144l1.7 5 5.2 1.8-5.2 1.6-1.7 5-1.6-5-5.1-1.6 5.1-1.8z" fill="#24251f"/>
<g transform="rotate(-8 182 128)">
<!-- Rubber-hose legs and well-worn office shoes. -->
<g fill="none" stroke="#24251f" stroke-width="8" stroke-linecap="round"><path d="M159 162q2 16-6 24l-9 13"/><path d="M200 164q9 14 4 24l3 14"/></g>
<g class="outline" stroke-width="2.6" fill="#fffae9">
<path d="m141 192 12 6-4 13c-2 5-8 7-14 6l-26-3c-7-1-9-7-5-12 6-9 19-9 28-6z"/><path d="M103 207c10 5 30 8 46 6l-2 5c-8 3-29 0-41-4q-5-2-3-7z" fill="#37372d"/>
<path d="m200 196 13-1 3 8c7-5 14-8 20-5 8 3 12 10 8 15-4 6-31 8-42 5-5-2-6-10-2-22z"/><path d="M199 211c9 6 36 5 47-3 2 4-1 9-7 11-8 3-27 4-38 0q-5-2-2-8z" fill="#37372d"/>
<path d="m131 196-4 6m10-5-4 6m83-1 4 4m0-7 5 4" fill="none" stroke-width="1.6"/>
</g>
<!-- One bent elbow and the white glove carrying the latest form. -->
<path class="arm" d="M139 137q-24 20-42-12" fill="none" stroke-width="7"/>
<path class="arm" d="M220 133q32 5 16 26" fill="none" stroke-width="7"/>
<g class="outline" stroke-width="2.2">
<path d="m96 129-8-7c-6 2-10-1-9-5-6 0-8-5-5-8-5-4-1-8 3-8 6 0 11 4 14 6-2-7 0-11 4-11 4 1 4 5 5 10 0 5 4 8 3 13l-2 6z" fill="#fff9e7"/>
<path d="m69 111 6-32 31 8-7 32-14-4z" fill="#f3d77e"/><path d="m78 86 20 5m-21 0 14 4m-15 1 11 3" fill="none" stroke-width="1.3"/>
<path d="M94 126c-9 1-14-3-13-8 1-4 5-5 8-3l7 4m-16-9c3 0 8 2 11 4" fill="#fff9e7"/>
<path d="M237 154c5 0 7 7 4 10l-6 5c0 5-6 6-8 3-3 2-7 1-7-3-5-1-5-6-2-10l5-5c0-5 5-8 8-5 2 3 0 5-2 9z" fill="#fff9e7"/><path d="m228 165-3 5m8-3-3 5" fill="none" stroke-width="1.3"/>
</g>
<!-- Turned wooden handle, engraved rim and the clerk's face. -->
<g class="outline" stroke-width="2.8">
<path d="M163 113c8-10 9-20 2-30-8-12-22-21-21-37 1-16 16-28 37-29 23-1 41 9 42 27 1 15-11 24-20 38-9 13-5 20 4 32z" fill="#ed5738"/>
<path d="M185 20c23 2 34 13 33 25-1 14-14 25-21 37-7 12-5 19 0 29l-11-1c-4-10-4-21 2-32 7-14 18-26 17-38 0-10-8-17-20-20z" fill="url(#redhatch)" stroke="none"/>
<path d="M153 45c0-10 10-18 24-20" fill="none" stroke="#ffb194" stroke-width="5"/><path d="M154 51l1 3" stroke="#ffb194" stroke-width="3"/>
<path d="M161 106c11-5 35-5 46 0l3 7c-13 5-40 6-52 0z" fill="#d94b30"/>
<path d="m132 116 19-8c17 5 43 5 59-1l13 9 7 16-97 4z" fill="#f47a56"/>
<path d="m131 115 92 1-1 37-96-1z" fill="#ef603e"/>
<path d="m223 116 10 9-1 33-10-5z" fill="#c6462a"/>
<path d="m126 149 96 3 10 5-3 10-101-2-8-5z" fill="#35352b"/>
<path d="m126 149 96 3 10 5-103-1-8-3z" fill="#f9d79a" stroke-width="1.6"/>
<path d="m130 161 94 2m-86-45 76 2" fill="none" stroke-width="1" stroke="#a43d29"/>
</g>
<g class="outline" stroke-width="1.7"><ellipse cx="161" cy="131" rx="5.6" ry="8" fill="#fffae9"/><ellipse cx="181" cy="131" rx="5.6" ry="8" fill="#fffae9"/><ellipse cx="159" cy="133" rx="2" ry="3.8"/><ellipse cx="179" cy="133" rx="2" ry="3.8"/><path d="m154 123 12 2m9-2 11-1m-18 18q6 4 14-1" fill="none" stroke-width="2.3"/></g>
<g stroke="#803e2b" stroke-width="1.2"><path d="m147 136-3 4m7-4-3 4m44-4-2 4m6-4-2 4"/></g>
</g>
<g fill="none" stroke="#39392f" stroke-linecap="round"><path d="m125 45-7-6m7 17-10-1m15-19-3-7" stroke-width="2"/><path d="M292 68c-7-13-24-15-43-10m5-5-7 6 9 2" stroke-width="1.3"/></g>
<g transform="rotate(7 295 79)" fill="#646657" font-family="monospace" font-size="9.5"><text x="263" y="80">FIG. 01</text><text x="263" y="92">Duty clerk</text></g>
</svg>
</section>
<div class="workspace">
<section class="desk" id="desk" data-stage="0" aria-labelledby="deskTitle"><div class="desk-front">
<div class="card-head"><div class="desk-name"><svg class="sym"><use href="#i-doc"/></svg>Processing desk</div><span class="card-meta" id="formNo">FORM 01 / 03</span></div>
<div class="card-body"><h2 id="deskTitle" tabindex="-1">Confirm your presence.</h2>
<p class="instruction" id="instruction">Press the button below. It’s a little shy.</p>
<div class="field" id="field" data-spot="0">
<div id="catchPanel"><button id="catch" class="primary catch">I’m right here <svg class="sym"><use href="#i-arrow"/></svg></button></div>
<div id="reviewPanel" class="review" hidden>
<div class="review-data"><span>APPROVAL PROGRESS</span><strong id="percent">0%</strong></div>
<div class="review-track" role="progressbar" id="track" aria-label="Approval progress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="review-fill" id="fill"></div></div>
<button class="small-action" id="process">Begin processing <span aria-hidden="true">→</span></button></div>
<div id="cookiePanel" class="cookie-area" hidden></div>
<div id="receiptPanel" class="receipt" hidden><div class="receipt-copy"><span>CERTIFICATE OF COMPLETION</span><b>Sufficiently patient.</b><span>Issued to ticket holder A–404</span></div>
<svg class="seal" viewBox="0 0 80 80" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="2.5" d="m40 3 8 4 9 1 5 7 8 5 1 9 5 11-5 9-1 10-8 5-5 7-9 1-8 5-9-5-9-1-5-7-8-5-1-10-5-9 5-11 1-9 8-5 5-7 9-1z"/><circle cx="40" cy="40" r="27" fill="none" stroke="currentColor" stroke-dasharray="2 2"/><path d="m24 41 10 11 22-25" fill="none" stroke="currentColor" stroke-width="6"/></svg></div>
</div>
<div class="desk-foot"><span id="status" class="status" role="status">Awaiting confirmation</span><button class="link" id="manual">File manually <svg class="sym"><use href="#i-up"/></svg></button></div>
</div></div></section>
<aside class="ticket-wrap" aria-label="Your queue ticket"><div class="ticket">
<div class="ticket-top"><div class="ticket-caption"><span class="ticket-label">VISITOR TICKET</span><svg class="sym"><use href="#i-ticket"/></svg></div>
<div class="ticket-number">A–404</div><div class="ticket-sub">Your queue number</div></div>
<div class="perf" aria-hidden="true"></div>
<div class="ticket-bottom"><div class="tally"><span>Forms filed</span><b id="tally">0 / 3</b></div>
<div class="segments" aria-hidden="true"><span></span><span></span><span></span></div>
<div class="barcode-line"><div class="barcode" aria-hidden="true"></div><span class="ink-stamp" id="stamp">Pending</span></div></div>
</div><p class="ticket-note">Please retain for the duration of the ordeal.</p></aside>
</div>
<footer class="footer"><span class="doc-ref">B.M.I. &nbsp;/&nbsp; VISITOR SERVICES</span><button class="link" id="demo"><svg class="sym"><use id="demoIcon" href="#i-play"/></svg><span id="demoText">Watch demo</span></button></footer>
</main>
<dialog id="guide" class="guide" aria-labelledby="guideTitle"><div class="guide-head"><span>Visitor services</span><button aria-label="Close visitor guide" id="guideClose">×</button></div>
<div class="guide-body"><h2 id="guideTitle">Visitor guide</h2><p>Keep your ticket handy. The clerk needs three things from you.</p>
<ol><li>Catch the confirmation button.</li><li>Wait for your patience to be processed.</li><li>Settle the cookie paperwork.</li></ol>
<p>Every form has a <b>File manually</b> shortcut. Use it whenever the desk gets on your nerves.</p>
<button class="primary" id="guideDone">Back to the desk <span aria-hidden="true">→</span></button></div></dialog>
<script>
(function(){
  'use strict';
  const byId = id => document.getElementById(id);
  const panels = ['catchPanel','reviewPanel','cookiePanel','receiptPanel'].map(byId);
  const formTitles = ['Confirm your presence.','Wait for approval.','Close the cookie notice.','Your paperwork is complete.'];
  const directions = ['Press the button below. It’s a little shy.','Start the progress bar. The last percent is a stickler for procedure.','Each dismissal requires a copy for our records. Naturally.','The clerk has certified your remarkable ability to put up with this.'];
  const notices = ['Awaiting confirmation','Ready to process','One notice pending','Session complete'];
  const firstHeadline = byId('headline').innerHTML;
  const firstIntro = byId('intro').textContent;
  const manualMarkup = byId('manual').innerHTML;
  const segments = Array.from(document.querySelectorAll('.segments span'));
  let stage = 0, moves = 0, copies = 1, reviewState = 'idle', animation = 0;
  let demoRunning = false, demoTimers = [], demoWasActiveOnPress = false;
  function say(message){ byId('status').textContent = message; }
  function progress(value){
    byId('percent').textContent = value + '%';
    byId('fill').style.width = value + '%';
    byId('track').setAttribute('aria-valuenow', String(value));
  }
  function makeSlip(number){
    const slip = document.createElement('div');
    slip.className = 'cookie-slip';
    slip.innerHTML = '<span class="copy-label">COPY 0' + number + '</span><strong class="cookie-title">Cookie notice</strong><button type="button" aria-label="Close cookie notice copy ' + number + '">Close <span aria-hidden="true">×</span></button>';
    slip.querySelector('button').addEventListener('click', closeCopy);
    byId('cookiePanel').appendChild(slip);
  }
  function setStage(next, focus){
    cancelAnimationFrame(animation);
    stage = next;
    panels.forEach((panel, index) => { panel.hidden = index !== next; });
    byId('desk').dataset.stage = next;
    byId('deskTitle').textContent = formTitles[next];
    byId('instruction').textContent = directions[next];
    byId('formNo').textContent = next < 3 ? 'FORM 0' + (next + 1) + ' / 03' : 'FILE CLOSED';
    byId('tally').textContent = next + ' / 3';
    segments.forEach((seg, index) => seg.classList.toggle('done', index < next));
    byId('stamp').textContent = next === 3 ? 'Approved' : 'Pending';
    byId('manual').innerHTML = next === 3 ? 'Start again <svg class="sym"><use href="#i-restart"/></svg>' : manualMarkup;
    say(notices[next]);
    if(next === 0){
      moves = 0;
      byId('field').dataset.spot = '0';
      byId('catch').firstChild.nodeValue = 'I’m right here ';
      byId('headline').innerHTML = firstHeadline;
      byId('headline').classList.remove('finish-title');
      byId('intro').textContent = firstIntro;
    }
    if(next === 1){
      reviewState = 'idle';
      progress(0);
      byId('process').textContent = 'Begin processing →';
      byId('process').disabled = false;
    }
    if(next === 2){
      copies = 1;
      byId('cookiePanel').replaceChildren();
      makeSlip(1);
    }
    if(next === 3){
      byId('headline').innerHTML = 'Thank you for<br><em>your patience.</em>';
      byId('headline').classList.add('finish-title');
      byId('intro').textContent = 'You may now resume your previously scheduled life.';
    }
    if(focus && !demoRunning){
      (next === 3 ? byId('headline') : byId('deskTitle')).setAttribute('tabindex','-1');
      (next === 3 ? byId('headline') : byId('deskTitle')).focus({preventScroll:true});
      if(next === 3) window.scrollTo(0,0);
    }
  }
  function dodge(){
    if(stage !== 0 || moves >= 2) return;
    moves++;
    byId('field').dataset.spot = String(moves);
    say(moves === 1 ? 'Presence almost confirmed' : 'It has agreed to cooperate');
    if(moves === 2) byId('catch').firstChild.nodeValue = 'Still here ';
  }
  const catchButton = byId('catch');
  let ignoreClickUntil = 0;
  catchButton.addEventListener('pointerenter', event => {
    if(!demoRunning && event.pointerType === 'mouse' && moves < 2) dodge();
  });
  catchButton.addEventListener('pointerdown', event => {
    ignoreClickUntil = 0;
    if(moves < 2 && event.pointerType !== 'mouse'){
      dodge();
      ignoreClickUntil = performance.now() + 550;
    }
  });
  catchButton.addEventListener('click', event => {
    if(stage !== 0 || (event.detail !== 0 && performance.now() < ignoreClickUntil)) return;
    if(event.detail === 0 || moves >= 2) setStage(1,true);
    else dodge();
  });
  function beginReview(){
    if(stage !== 1 || reviewState !== 'idle') return;
    reviewState = 'working';
    byId('process').disabled = true;
    byId('process').textContent = 'Processing…';
    say('Consulting the rubber stamp');
    const start = performance.now();
    let reconsidered = false;
    function frame(now){
      if(stage !== 1 || reviewState !== 'working') return;
      const t = now - start;
      let value;
      if(t < 1800) value = Math.floor(99*t/1800);
      else if(t < 2650) value = 99;
      else if(t < 3550) value = 99 - Math.floor(36*(t-2650)/900);
      else if(t < 3950) value = 63;
      else value = Math.min(100,63 + Math.floor(37*(t-3950)/1250));
      if(t >= 2650 && !reconsidered){ reconsidered = true; say('Reconsidering the last percent'); }
      progress(value);
      if(value < 100) animation = requestAnimationFrame(frame);
      else {
        reviewState = 'ready';
        byId('process').disabled = false;
        byId('process').textContent = 'Collect approval →';
        say('Approved on second thought');
      }
    }
    animation = requestAnimationFrame(frame);
  }
  byId('process').addEventListener('click', () => {
    if(reviewState === 'ready') setStage(2,true);
    else beginReview();
  });
  function closeCopy(){
    if(stage !== 2) return;
    if(copies === 3){setStage(3,true);return;}
    copies++;
    makeSlip(copies);
    say(copies === 2 ? 'Duplicate issued. Try closing again.' : 'Triplicate filed. One last Close.');
  }
  byId('manual').addEventListener('click', () => { setStage(stage === 3 ? 0 : stage + 1,true); });
  const guide = byId('guide');
  byId('guideOpen').addEventListener('click', () => {stopDemo();guide.showModal();});
  byId('guideClose').addEventListener('click', () => guide.close());
  byId('guideDone').addEventListener('click', () => guide.close());
  guide.addEventListener('click', event => { if(event.target === guide){const r=guide.getBoundingClientRect();if(event.clientX<r.left || event.clientX>r.right || event.clientY<r.top || event.clientY>r.bottom) guide.close();} });
  function demoButton(){
    byId('demoIcon').setAttribute('href',demoRunning ? '#i-stop' : '#i-play');
    byId('demoText').textContent = demoRunning ? 'Stop demo' : 'Watch demo';
  }
  function stopDemo(){
    demoRunning = false;
    demoTimers.forEach(clearTimeout);
    demoTimers = [];
    demoButton();
  }
  function startDemo(){
    stopDemo();
    demoRunning = true;
    demoButton();
    setStage(0,false);
    function at(delay,action){demoTimers.push(setTimeout(() => {if(demoRunning) action();},delay));}
    at(1300,dodge);
    at(2450,dodge);
    at(3650,() => setStage(1,false));
    at(4550,beginReview);
    at(10500,() => setStage(2,false));
    at(11900,closeCopy);
    at(13500,closeCopy);
    at(15300,closeCopy);
    at(20200,startDemo);
  }
  function realInput(event){
    if(!event.isTrusted) return;
    const toggle = byId('demo').contains(event.target);
    if(demoRunning){
      demoWasActiveOnPress = toggle;
      stopDemo();
    }else if(!toggle){demoWasActiveOnPress = false;}
  }
  document.addEventListener('pointerdown',realInput,true);
  document.addEventListener('touchstart',realInput,{capture:true,passive:true});
  document.addEventListener('keydown',realInput,true);
  byId('demo').addEventListener('click', () => {
    if(demoWasActiveOnPress || demoRunning){ demoWasActiveOnPress = false; stopDemo(); }
    else startDemo();
  });
  if(location.hash === '#demo') startDemo();
  window.addEventListener('hashchange', () => {if(location.hash === '#demo') startDemo();else stopDemo();});
})();
</script>
</body>
</html>