Back to the app
The code
The Most Uncomfortable Web Page by GPT-6.2 Sol
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.)<!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="#f7f3e8">
<title>Department of Inconvenience</title>
<style>
:root {
color-scheme: light;
--paper: #f7f3e8;
--white: #fffcf4;
--ink: #25231f;
--muted: #655d51;
--yellow: #ffdf62;
--lilac: #d9c9fa;
--lime: #d9e6a8;
--peach: #fac0ac;
--line: 2px solid var(--ink);
--mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
--display: "Arial Black", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 16px; }
body {
margin: 0;
background: var(--paper);
color: var(--ink);
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; touch-action: manipulation; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible { outline: 3px solid #633db3; outline-offset: 4px; }
button:disabled { opacity: 1; }
svg { display: block; flex: none; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.masthead { border-bottom: 1px solid #bdb4a3; }
.mast-inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
min-height: 67px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-glyph {
display: grid;
place-items: center;
width: 36px;
height: 36px;
background: var(--yellow);
border: var(--line);
border-radius: 7px;
box-shadow: 2px 2px 0 var(--ink);
transform: rotate(-5deg);
}
.brand-name {
display: grid;
gap: 3px;
font-family: var(--mono);
font-size: .75rem;
font-weight: 800;
line-height: 1.03;
letter-spacing: .065em;
text-transform: uppercase;
}
.brand-name strong { font-size: 1rem; letter-spacing: -.035em; }
.now-serving {
display: flex;
align-items: center;
gap: 9px;
font: 700 .7rem/1 var(--mono);
letter-spacing: .075em;
text-transform: uppercase;
white-space: nowrap;
}
.serving-light {
width: 8px;
height: 8px;
background: #cd704d;
border: 1px solid var(--ink);
border-radius: 50%;
}
.now-serving[data-ready="true"] .serving-light { background: #83a44f; }
.serving-number {
padding: 6px 8px;
border: 1px solid var(--ink);
background: var(--white);
border-radius: 3px;
font-size: .85rem;
letter-spacing: .01em;
}
.hero {
display: grid;
grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
align-items: center;
gap: clamp(22px, 3.6vw, 57px);
padding-block: 35px 34px;
}
.eyebrow {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 9px 12px;
margin-bottom: 19px;
color: var(--muted);
font: 700 .72rem/1.2 var(--mono);
letter-spacing: .07em;
text-transform: uppercase;
}
.ticket-tag {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
border: 1px dashed var(--ink);
border-radius: 3px;
background: #faeab3;
color: var(--ink);
transform: rotate(-2deg);
}
.hero-title, .thanks-title {
font-family: var(--display);
font-weight: 950;
line-height: .88;
letter-spacing: -.08em;
text-transform: uppercase;
}
.hero-title { font-size: clamp(3.08rem, 6.65vw, 6rem); }
.hero-title > span { display: block; width: max-content; white-space: nowrap; }
.hero-title > span + span { margin-top: .055em; }
.underlined {
isolation: isolate;
position: relative;
}
.underlined::after {
position: absolute;
z-index: -1;
right: .07em;
bottom: .005em;
left: 33%;
height: .14em;
background: var(--yellow);
transform: rotate(-2.2deg) skewX(-10deg);
content: "";
}
.misprint { display: inline-block; transform: translateY(1px) rotate(-3deg); }
.hero-copy, .thanks-copy {
max-width: 37ch;
margin-top: 20px;
color: #524b40;
font-size: clamp(.96rem, 1.45vw, 1.12rem);
line-height: 1.5;
}
.art-board {
position: relative;
isolation: isolate;
min-width: 0;
margin: 0 4px 0 0;
aspect-ratio: 530 / 306;
background: var(--yellow);
background-image: radial-gradient(#72551535 .85px, transparent .85px);
background-size: 12px 12px;
border: var(--line);
border-radius: 9px 7px 9px 7px;
box-shadow: 5px 6px 0 var(--ink);
transform: rotate(1.25deg);
}
.art-board > svg { width: 100%; height: 100%; }
.art-caption {
position: absolute;
top: 12px;
left: 12px;
padding: 4px 6px;
background: var(--yellow);
font: 800 clamp(.54rem, 1vw, .69rem)/1 var(--mono);
letter-spacing: .08em;
}
.estimate {
position: absolute;
right: 13px;
bottom: 13px;
display: grid;
gap: 3px;
padding: 6px 9px;
background: var(--peach);
border: var(--line);
box-shadow: 2px 2px 0 var(--ink);
font: 700 clamp(.49rem, .8vw, .64rem)/1 var(--mono);
letter-spacing: .07em;
transform: rotate(-7deg);
}
.estimate strong { font-size: 1.32em; letter-spacing: -.025em; }
.clock-character { animation: fidget 5.6s ease-in-out infinite; }
.clock-hand { transform-origin: 264px 145px; animation: second-thoughts 5.6s ease-in-out infinite; }
@keyframes fidget {
0%, 100% { transform: translateY(0); }
48% { transform: translateY(-3px); }
73% { transform: translateY(-1px); }
}
@keyframes second-thoughts {
0%, 100% { transform: rotate(0); }
44% { transform: rotate(13deg); }
68% { transform: rotate(-6deg); }
}
.visit-heading {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 9px 14px;
margin-bottom: 13px;
padding-top: 13px;
border-top: 1px solid #bdb4a3;
}
.visit-heading h2 {
font-size: clamp(1.27rem, 2.25vw, 1.65rem);
font-weight: 850;
line-height: 1.1;
letter-spacing: -.055em;
}
.completion {
display: flex;
align-items: center;
gap: 9px;
font: 800 .69rem/1.1 var(--mono);
letter-spacing: .055em;
text-transform: uppercase;
}
.completion-dots { display: flex; gap: 4px; }
.completion-dots span { width: 9px; height: 9px; border: 1px solid var(--ink); border-radius: 50%; }
.completion-dots .filled { background: var(--ink); }
.task-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 17px;
}
.task {
--accent: var(--lilac);
min-width: 0;
display: flex;
flex-direction: column;
overflow: hidden;
border: var(--line);
border-radius: 8px;
background: var(--white);
box-shadow: 3px 4px 0 var(--ink);
}
.task-wait { --accent: var(--lime); }
.task-cookies { --accent: var(--peach); }
.task-band {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
min-height: 33px;
padding: 5px 13px;
background: var(--accent);
border-bottom: var(--line);
font: 800 .69rem/1.12 var(--mono);
letter-spacing: .085em;
text-transform: uppercase;
}
.normal-mark { transform: rotate(6deg); }
.task .done-mark, .task.is-cleared .normal-mark { display: none; }
.task.is-cleared .done-mark { display: block; }
.task-content {
display: flex;
flex: 1;
flex-direction: column;
padding: 13px 14px 11px;
}
.task h3 {
font-weight: 850;
font-size: clamp(1.18rem, 2.25vw, 1.63rem);
line-height: 1.13;
letter-spacing: -.055em;
}
.task-description {
min-height: 2.55em;
margin: 4px 0 8px;
color: var(--muted);
font-size: .87rem;
line-height: 1.32;
}
.interaction { height: 104px; margin-top: auto; }
.task-note {
min-height: 2.55em;
margin-top: 9px;
color: var(--muted);
font: 700 .7rem/1.32 var(--mono);
}
.is-cleared .task-note { color: #3f5623; }
.action {
display: inline-flex;
justify-content: center;
align-items: center;
gap: 8px;
min-height: 44px;
padding: 7px 12px;
border: var(--line);
border-radius: 5px;
background: var(--accent, var(--yellow));
box-shadow: 2px 2px 0 var(--ink);
font-size: .86rem;
font-weight: 800;
line-height: 1.12;
transition: transform .15s ease, box-shadow .15s ease;
}
.action:disabled {
color: #594f43;
background: #eee9db;
box-shadow: 1px 1px 0 #6c6257;
}
@media (hover: hover) {
.action:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.text-button:hover { text-decoration-thickness: 2px; }
}
.action:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.runner-field {
--runner-width: min(140px, calc(100% - 18px));
--runner-x: calc((100% - var(--runner-width)) / 2 - 1px);
--runner-y: 27px;
position: relative;
overflow: hidden;
border: 1px dashed #968779;
border-radius: 4px;
background-color: #f4eee3;
background-image: radial-gradient(#7c6b593d 1px, transparent 1px);
background-position: 5px 5px;
background-size: 12px 12px;
}
.runner-field[data-position="right"] {
--runner-x: calc(100% - var(--runner-width) - 10px);
--runner-y: 43px;
}
.runner-field[data-position="left"] {
--runner-x: 10px;
--runner-y: 12px;
}
.runner-field .crosshair {
position: absolute;
width: 10px;
height: 10px;
color: #7e705e;
}
.crosshair::before, .crosshair::after { position: absolute; background: currentColor; content: ""; }
.crosshair::before { width: 10px; height: 1px; top: 5px; }
.crosshair::after { width: 1px; height: 10px; left: 5px; }
.crosshair.first { top: 8px; left: 8px; }
.crosshair.last { bottom: 8px; right: 8px; }
.runner {
position: absolute;
left: var(--runner-x);
top: var(--runner-y);
width: var(--runner-width);
transition: left .3s cubic-bezier(.2,.75,.28,1), top .3s cubic-bezier(.2,.75,.28,1),
transform .15s ease, box-shadow .15s ease;
}
.meter-field {
display: grid;
grid-template-rows: auto 15px 44px;
align-content: space-between;
gap: 5px;
padding: 1px 1px 2px 0;
}
.meter-heading {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 4px;
color: var(--muted);
font: 800 .67rem/1.1 var(--mono);
letter-spacing: .04em;
text-transform: uppercase;
}
.meter-heading strong { color: var(--ink); font-size: 1.17rem; letter-spacing: -.06em; }
.meter {
overflow: hidden;
border: 1.5px solid var(--ink);
border-radius: 3px;
background: #eee7d7;
transform: translateX(1px);
}
.meter-fill {
width: var(--value, 0%);
height: 100%;
background: repeating-linear-gradient(135deg, #b3cc72 0 7px, #c7da94 7px 14px);
box-shadow: 1px 0 0 #627543;
transition: width .36s cubic-bezier(.2,.64,.32,1);
}
.cookie-field {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 5px 7px;
align-content: center;
}
.cookie-field[data-count="2"] { grid-template-rows: repeat(2, 47px); }
.cookie-field[data-count="4"] { grid-template: repeat(2, 47px) / repeat(2, minmax(0, 1fr)); }
.cookie-paper {
display: flex;
min-width: 0;
align-items: center;
padding-left: 7px;
gap: 6px;
background: #fff2e6;
border: 1.5px solid var(--ink);
border-radius: 4px;
box-shadow: 1px 2px 0 #c18e7d;
animation: delivered .24s ease-out both;
}
.cookie-paper:nth-child(even) { --lean: 1deg; }
.cookie-paper:nth-child(odd) { --lean: -1deg; }
@keyframes delivered {
from { transform: translateY(5px) rotate(calc(var(--lean) + 3deg)); }
to { transform: translateY(0) rotate(var(--lean)); }
}
.cookie-field[data-count="1"] .cookie-paper {
min-height: 59px;
margin-inline: 1px 3px;
padding-left: 9px;
gap: 8px;
box-shadow: 2px 3px 0 #c18e7d;
}
.cookie-label { display: grid; gap: 2px; min-width: 0; line-height: 1.1; }
.cookie-label b { font-size: .77rem; }
.cookie-label small { color: var(--muted); font: 700 .61rem/1.15 var(--mono); }
.cookie-field[data-count="2"] .cookie-label small { display: none; }
.cookie-field[data-count="4"] .cookie-label { display: none; }
.cookie-field[data-count="4"] .cookie-icon { width: 18px; height: 18px; }
.close-notice {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
align-self: stretch;
min-width: 57px;
min-height: 44px;
margin-left: auto;
padding: 3px 6px;
border: 0;
border-left: 1px solid var(--ink);
border-radius: 0 3px 3px 0;
background: var(--peach);
font-size: .72rem;
font-weight: 850;
}
.close-notice:active { background: #f1aa94; }
.cookie-empty {
display: flex;
min-height: 79px;
align-items: center;
justify-content: center;
gap: 9px;
padding: 7px;
border: 1px dashed #968779;
border-radius: 4px;
background: #f4eee3;
color: var(--muted);
font: 800 .72rem/1.2 var(--mono);
text-transform: uppercase;
}
.checkout {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: 12px;
margin-top: 20px;
padding: 10px 12px;
border: var(--line);
border-radius: 7px;
background: #efe9da;
box-shadow: 2px 3px 0 var(--ink);
}
.receipt-icon {
display: grid;
place-items: center;
width: 39px;
height: 41px;
border: 1px solid var(--ink);
border-radius: 4px;
background: var(--yellow);
transform: rotate(-4deg);
}
.checkout h2 { font-size: 1.05rem; font-weight: 850; line-height: 1.15; letter-spacing: -.035em; }
.checkout p { margin-top: 3px; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.finish-button { min-width: 150px; }
.room-footer {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 0 12px;
margin-top: 9px;
padding-bottom: 11px;
}
.text-button {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 44px;
padding: 0 2px;
border: 0;
background: transparent;
color: #51493e;
font: 700 .72rem/1.2 var(--mono);
text-decoration: underline;
text-underline-offset: 3px;
}
.demo-running .demo-launch { visibility: hidden; }
.demo-spot { outline: 2px dashed var(--ink); outline-offset: 5px; }
.demo-chip {
position: fixed;
z-index: 3;
right: 12px;
bottom: 12px;
display: flex;
align-items: center;
gap: 7px;
max-width: calc(100% - 24px);
padding: 8px 10px;
border: var(--line);
border-radius: 5px;
background: var(--yellow);
box-shadow: 2px 2px 0 var(--ink);
font: 800 .68rem/1.2 var(--mono);
pointer-events: none;
}
.receipt-layout {
display: grid;
grid-template-columns: 1.18fr .82fr;
gap: clamp(28px, 6vw, 89px);
align-items: center;
padding-block: clamp(44px, 11vh, 105px) 48px;
}
.thanks-title { font-size: clamp(3rem, 6.25vw, 6.1rem); }
.thanks-title:focus { outline: none; }
.thanks-copy { margin-bottom: 21px; }
.restart { min-width: 143px; }
.printed-receipt {
position: relative;
margin: 4px 4px 4px 0;
padding: clamp(19px, 3.2vw, 33px);
border: var(--line);
border-radius: 4px;
background: var(--white);
box-shadow: 6px 7px 0 var(--ink);
font-family: var(--mono);
transform: rotate(2deg);
}
.printed-receipt::before {
position: absolute;
top: 8px;
right: 8px;
bottom: 8px;
left: 8px;
border: 1px solid #d9cdbc;
border-radius: 2px;
pointer-events: none;
content: "";
}
.receipt-type {
color: var(--muted);
font-size: .73rem;
font-weight: 800;
letter-spacing: .09em;
}
.receipt-number { display: block; margin-top: 3px; font-size: clamp(2rem, 5vw, 4.3rem); line-height: 1; letter-spacing: -.08em; }
.receipt-items { display: grid; gap: 11px; margin: 18px 0 0; padding: 15px 0; border-block: 1px dashed #8a7b67; }
.receipt-items div { display: flex; justify-content: space-between; gap: 10px; font-size: .77rem; line-height: 1.2; }
.receipt-items dd { margin: 0; font-weight: 800; text-align: right; }
.receipt-total { display: flex; justify-content: space-between; gap: 10px; margin-top: 11px; font-size: .77rem; font-weight: 800; }
.receipt-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.barcode {
width: 47%;
height: 33px;
background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px,
var(--ink) 4px 7px, transparent 7px 10px, var(--ink) 10px 11px, transparent 11px 13px,
var(--ink) 13px 17px, transparent 17px 20px, var(--ink) 20px 22px, transparent 22px 25px);
}
.stamp {
padding: 5px 7px;
border: 3px double #a64e3e;
border-radius: 3px;
color: #a64e3e;
font-size: clamp(.61rem, 1.2vw, .82rem);
font-weight: 900;
line-height: 1;
text-align: center;
letter-spacing: .025em;
transform: rotate(-8deg);
}
@media (max-width: 950px) {
.wrap { width: calc(100% - 48px); }
.task-grid { gap: 13px; }
.task-content { padding-inline: 11px; }
}
@media (max-width: 760px) {
.wrap { width: min(560px, calc(100% - 36px)); }
.mast-inner { min-height: 61px; }
.hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 27px 25px; }
.hero-title { font-size: clamp(2.55rem, 12.1vw, 5.4rem); }
.eyebrow { margin-bottom: 14px; }
.hero-copy { margin-top: 14px; }
.art-board { margin-right: 5px; transform: rotate(.8deg); }
.visit-heading { margin-bottom: 12px; }
.task-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
.task-content { padding: 13px 14px 11px; }
.task h3 { font-size: 1.55rem; }
.task-description { min-height: 0; margin-bottom: 11px; }
.task-note { min-height: 1.4em; }
.receipt-layout { grid-template-columns: minmax(0, 1fr); gap: 25px; padding-top: 34px; }
.thanks-title { max-width: 11ch; font-size: clamp(2.85rem, 11.6vw, 5.4rem); }
.printed-receipt { transform: rotate(1deg); }
}
@media (max-width: 430px) {
.wrap { width: calc(100% - 32px); }
.brand { gap: 7px; }
.brand-glyph { width: 31px; height: 32px; }
.brand-glyph svg { width: 19px; height: 19px; }
.brand-name { font-size: .65rem; }
.brand-name strong { font-size: .84rem; }
.now-serving { gap: 5px; font-size: .58rem; }
.serving-number { font-size: .72rem; padding-inline: 5px; }
.serving-light { width: 6px; height: 6px; }
.checkout { grid-template-columns: auto minmax(0, 1fr); }
.finish-button { grid-column: 1 / -1; width: 100%; }
.estimate { right: 8px; bottom: 8px; padding: 5px 7px; }
.art-caption { top: 8px; left: 7px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
</style>
</head>
<body>
<header class="masthead">
<div class="wrap mast-inner">
<div class="brand">
<span class="brand-glyph" aria-hidden="true">
<svg width="23" height="23" viewBox="0 0 24 24" fill="none">
<path d="m13 2 .9 6.2 5.8-2.6-3.8 5.1 6 2.1-6.3 1.1 2 6.1-4.8-4.2-3.2 5.5.2-6.5L3 16l4.7-4.2L2.8 8l6.3 1.3L9 3.2l2.5 5.1z" fill="#25231f"/>
</svg>
</span>
<span class="brand-name">Department of <strong>Inconvenience</strong></span>
</div>
<div class="now-serving" id="serving-status" data-ready="false">
<span class="serving-light" aria-hidden="true"></span>
<span>Now serving</span>
<strong class="serving-number" id="serving-number">041</strong>
</div>
</div>
</header>
<main class="wrap">
<div id="waiting-room">
<section class="hero" aria-labelledby="page-title">
<div class="hero-text">
<p class="eyebrow">
<span class="ticket-tag">
<svg width="17" height="13" viewBox="0 0 18 14" aria-hidden="true">
<path d="M2 2h14v3a2 2 0 0 0 0 4v3H2V9a2 2 0 0 0 0-4V2Z" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"/>
<path d="M6 4v1m0 2v1m0 2v.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/>
</svg>
Your ticket 042
</span>
Online waiting room
</p>
<h1 class="hero-title" id="page-title" tabindex="-1"><span>Please</span> <span class="underlined">be patien<span class="misprint">t.</span></span></h1>
<p class="hero-copy">To collect your receipt, please complete three tasks that should have been much easier.</p>
</div>
<figure class="art-board" aria-label="A crooked cartoon alarm clock holding a queue ticket">
<svg viewBox="0 0 530 306" aria-hidden="true">
<g fill="none" stroke-linecap="round" stroke-linejoin="round">
<path d="M52 194c31-24 58-21 67-1 6 16-8 28-35 31m312-157c22-16 47-13 59 0 10 12-1 26-17 21" stroke="#9a702f" stroke-width="2" stroke-dasharray="4 7"/>
<path d="M95 79l3 12 12 3-12 3-3 12-3-12-12-3 12-3Zm337 84 2.7 8 8.3 2.7-8.3 2.9-2.7 8.4-2.9-8.4-8.1-2.9 8.1-2.7Z" fill="#fff5cd" stroke="#25231f" stroke-width="2.1"/>
<path d="M134 59l-6-8m18 3-1-13m12 14 7-9m187 167 13 2m-16 7 11 7" stroke="#25231f" stroke-width="2.6"/>
<circle cx="392" cy="42" r="3.2" fill="#25231f"/>
<circle cx="121" cy="239" r="3" fill="#25231f"/>
<circle cx="466" cy="130" r="2.6" fill="#25231f"/>
<ellipse cx="264" cy="266" rx="132" ry="12" fill="#c6983d" opacity=".53"/>
</g>
<g class="clock-character">
<g transform="rotate(-8 265 151)" stroke="#25231f" stroke-linecap="round" stroke-linejoin="round">
<path d="M226 216q-1 24-23 39m100-37q-2 19 20 33M184 153q-31 22-51-15m216 11q26 14 51-13" fill="none" stroke-width="7"/>
<path d="M216 248q-6-10-16-8-8 1-16 8l-10 8q-6 7 5 11h37q7 0 8-7l-2-9z" fill="#fac0ac" stroke-width="3.7"/>
<path d="M313 247q5-10 16-7 9 1 17 10l9 7q5 8-6 10h-33q-7 0-8-7l1-8z" fill="#fac0ac" stroke-width="3.7"/>
<path d="M175 261q7 2 15 2h31m89 0h32q6 0 11-2m-164-13 8 3m-4-6 8 3m133-1-8 3m11 1-8 3" fill="none" stroke-width="2.2"/>
<path d="M137 143q-7 3-13-1-7-5-7-11 0-4 4-4 2-1 6 2-4-8 0-10 4-3 8 3 4-2 7 1 5 4 3 9-1 7-8 11Z" fill="#fff8e7" stroke-width="3.3"/>
<path d="M401 144q-8-3-10-9l-6-10q-2-5 2-6 3-2 7 4l4 5-2-17q0-5 4-5 4 0 5 6l2 10 5-13q2-4 5-3 4 1 2 7l-3 11 6-5q4-3 7 0 2 3-2 7l-9 10q-7 10-17 8Z" fill="#fff8e7" stroke-width="3.3"/>
<path d="M403 134q3-5 8-5" fill="none" stroke-width="2.4"/>
<g transform="rotate(-13 124 114)">
<path d="M94 100h58v9q-5 0-5 5t5 5v9H94v-9q5 0 5-5t-5-5z" fill="#fff8e7" stroke-width="3"/>
<path d="M109 103v22" fill="none" stroke-width="1.65" stroke-dasharray="2 4"/>
<text x="114" y="119" stroke="none" fill="#25231f" font-family="monospace" font-size="13" font-weight="bold">042</text>
</g>
<path d="m203 83-16-16m133 15 13-17" fill="none" stroke-width="5.5"/>
<path d="M170 75q3-15 15-22 14-8 27 2l-35 27q-6 0-7-7Zm144-21q11-10 24-5 13 5 17 21 1 6-5 7l-40-16q0-4 4-7Z" fill="#fac0ac" stroke-width="4"/>
<path d="M179 74l26-20m111 6 32 12" fill="none" stroke-width="1.7"/>
<rect x="255" y="41" width="23" height="27" rx="4" fill="#d9c9fa" stroke-width="3.7"/>
<rect x="249" y="38" width="36" height="11" rx="4" fill="#fff8e7" stroke-width="3.5"/>
<circle cx="275" cy="147" r="86" fill="#fa9d7d" stroke-width="4.6"/>
<circle cx="264" cy="144" r="86" fill="#d9c9fa" stroke-width="4.6"/>
<circle cx="264" cy="144" r="73" fill="#fff8e7" stroke-width="3.4"/>
<path d="M264 78v9m0 114v9m-67-66h9m116 0h9m-100-57 4 7m58 100 4 7m-90-90 7 4m100 58 7 4m-114 0 7-4m100-58 7-4m-90 90 4-7m58-100 4-7" fill="none" stroke-width="2.6"/>
<path d="M229 116q7-7 16-4m35-7q9-3 16 4" fill="none" stroke-width="3.2"/>
<ellipse cx="240" cy="129" rx="7" ry="10.5" fill="#25231f" stroke="none"/>
<ellipse cx="287" cy="122" rx="7" ry="10.5" fill="#25231f" stroke="none"/>
<circle cx="242" cy="126" r="2.1" fill="#fff8e7" stroke="none"/>
<circle cx="289" cy="119" r="2.1" fill="#fff8e7" stroke="none"/>
<ellipse cx="229" cy="151" rx="8" ry="4.3" fill="#fac0ac" stroke="none"/>
<ellipse cx="298" cy="149" rx="8" ry="4.3" fill="#fac0ac" stroke="none"/>
<path d="M247 169q14 13 29-2m-32 4 4-4" fill="none" stroke-width="3.4"/>
<g class="clock-hand">
<path d="m261 118 3 27 19 9" fill="none" stroke-width="3.6"/>
<circle cx="264" cy="145" r="4" fill="#fa9d7d" stroke-width="2"/>
</g>
</g>
</g>
</svg>
<figcaption class="art-caption">FIG. 01 / THE WAIT</figcaption>
<span class="estimate">EST. WAIT <strong>EVENTUALLY</strong></span>
</figure>
</section>
<section class="visit" aria-labelledby="visit-title">
<div class="visit-heading">
<h2 id="visit-title">Today's obstacles</h2>
<div class="completion">
<span class="completion-dots" aria-hidden="true"><span></span><span></span><span></span></span>
<span id="cleared-count" aria-live="polite">0 / 3 cleared</span>
</div>
</div>
<div class="task-grid">
<article class="task task-chase" id="chase-task" aria-labelledby="chase-title">
<div class="task-band">
<span>01 / Dexterity</span>
<svg class="normal-mark" width="19" height="19" viewBox="0 0 20 20" aria-hidden="true"><path d="m4 3 12 8-6 .8-2.5 5.7L4 3Zm6 9 3.3 4.4" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round"/></svg>
<svg class="done-mark" width="19" height="19" viewBox="0 0 20 20" aria-hidden="true"><path d="m4 10 4 4 8-8" fill="none" stroke="currentColor" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
<div class="task-content">
<h3 id="chase-title">Chase the button</h3>
<p class="task-description">It gets nervous when you get close.</p>
<div class="interaction runner-field" id="runner-field" data-position="center">
<span class="crosshair first" aria-hidden="true"></span>
<span class="crosshair last" aria-hidden="true"></span>
<button class="action runner" id="chase-button" type="button">
<span id="chase-label">Catch me</span>
<svg width="15" height="15" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9m-4-4 4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
</button>
</div>
<p class="task-note" id="chase-note" aria-live="polite">Tap the button. If it'll let you.</p>
</div>
</article>
<article class="task task-wait" id="meter-task" aria-labelledby="meter-title">
<div class="task-band">
<span>02 / Timekeeping</span>
<svg class="normal-mark" width="19" height="19" viewBox="0 0 20 20" aria-hidden="true"><path d="M5 3h10M5 17h10M6 3v2c0 2 2 4 4 5-2 1-4 3-4 5v2m8-14v2c0 2-2 4-4 5 2 1 4 3 4 5v2" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>
<svg class="done-mark" width="19" height="19" viewBox="0 0 20 20" aria-hidden="true"><path d="m4 10 4 4 8-8" fill="none" stroke="currentColor" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
<div class="task-content">
<h3 id="meter-title">Wait for 100%</h3>
<p class="task-description">The last percent is the longest.</p>
<div class="interaction meter-field">
<div class="meter-heading"><span id="meter-label">Standing by</span><strong id="meter-percent">0%</strong></div>
<div class="meter" id="meter" role="progressbar" aria-label="Waiting progress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
<div class="meter-fill" id="meter-fill"></div>
</div>
<button class="action" id="wait-button" type="button">
<span id="wait-button-label">Start waiting</span>
<svg width="15" height="15" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5.8" fill="none" stroke="currentColor" stroke-width="1.55"/><path d="M8 4.5V8l2.1 1.4" fill="none" stroke="currentColor" stroke-width="1.55" stroke-linecap="round" stroke-linejoin="round"/></svg>
</button>
</div>
<p class="task-note" id="meter-note" aria-live="polite">Estimated time remaining · a bit.</p>
</div>
</article>
<article class="task task-cookies" id="cookie-task" aria-labelledby="cookie-title">
<div class="task-band">
<span>03 / Paperwork</span>
<svg class="normal-mark" width="19" height="19" viewBox="0 0 20 20" aria-hidden="true"><path d="M4 5h12v11H4zM7 2h11v11m-11-4h6m-6 3h3" fill="none" stroke="currentColor" stroke-width="1.55" stroke-linecap="round" stroke-linejoin="round"/></svg>
<svg class="done-mark" width="19" height="19" viewBox="0 0 20 20" aria-hidden="true"><path d="m4 10 4 4 8-8" fill="none" stroke="currentColor" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
<div class="task-content">
<h3 id="cookie-title">Close the notice</h3>
<p class="task-description">It has a remarkably large family.</p>
<div class="interaction cookie-field" id="cookie-field" data-count="1"></div>
<p class="task-note" id="cookie-note" aria-live="polite" tabindex="-1">One fake cookie notice. Probably.</p>
</div>
</article>
</div>
<div class="checkout" id="checkout">
<span class="receipt-icon" aria-hidden="true">
<svg width="24" height="24" viewBox="0 0 24 24">
<path d="M6 3h12v18l-3-2-3 2-3-2-3 2z" fill="#fffcf4" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/>
<path d="M9 8h6M9 11h6m-6 3h3" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
</svg>
</span>
<div>
<h2>Collect your receipt</h2>
<p id="checkout-note">Clear all three obstacles to open the counter.</p>
</div>
<button class="action finish-button" id="finish-button" type="button" disabled>
Finish visit
<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9m-4-4 4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
</button>
</div>
</section>
<footer class="room-footer">
<button class="text-button demo-launch" id="demo-launch" type="button">
<svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><path d="m3 2 7 4-7 4z" fill="currentColor"/></svg>
Watch the 20s demo
</button>
<button class="text-button" id="skip-button" type="button">Skip the queue <span aria-hidden="true">↗</span></button>
</footer>
</div>
<section class="receipt-layout" id="receipt-screen" aria-labelledby="thanks-title" hidden>
<div>
<p class="eyebrow"><span class="ticket-tag">Ticket 042</span> Finally served</p>
<h1 class="thanks-title" id="thanks-title" tabindex="-1">Thank you for your <span class="underlined">patience.</span></h1>
<p class="thanks-copy" id="thanks-copy">Somehow, that was our fastest service today.</p>
<button class="action restart" id="restart-button" type="button">
<svg width="17" height="17" viewBox="0 0 18 18" aria-hidden="true"><path d="M3 8a6 6 0 1 1 1 5M3 3v5h5" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"/></svg>
Queue again
</button>
</div>
<div class="printed-receipt" aria-label="Your service receipt">
<p class="receipt-type">SERVICE RECEIPT / CUSTOMER COPY</p>
<strong class="receipt-number">NO. 042</strong>
<dl class="receipt-items">
<div><dt>Moving button</dt><dd id="receipt-button">Caught</dd></div>
<div><dt>Waiting progress</dt><dd id="receipt-meter">100%, eventually</dd></div>
<div><dt>Fake notices</dt><dd id="receipt-cookies">Dismissed</dd></div>
</dl>
<p class="receipt-total"><span>TOTAL DUE</span><strong>0 SECONDS MORE</strong></p>
<div class="receipt-bottom" aria-hidden="true">
<span class="barcode"></span>
<span class="stamp">EVENTUALLY<br>SERVED</span>
</div>
</div>
</section>
</main>
<div class="demo-chip" id="demo-chip" hidden>
<svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><path d="m3 2 7 4-7 4z" fill="currentColor"/></svg>
Demo · Touch or click to take over
</div>
<script>
(() => {
"use strict";
const get = (id) => document.getElementById(id);
const room = get("waiting-room");
const receipt = get("receipt-screen");
const chaseTask = get("chase-task");
const meterTask = get("meter-task");
const cookieTask = get("cookie-task");
const checkout = get("checkout");
const tasks = [chaseTask, meterTask, cookieTask];
const completionDots = document.querySelectorAll(".completion-dots span");
const runnerField = get("runner-field");
const chaseButton = get("chase-button");
const chaseLabel = get("chase-label");
const chaseNote = get("chase-note");
const waitButton = get("wait-button");
const waitButtonLabel = get("wait-button-label");
const meterNote = get("meter-note");
const cookieField = get("cookie-field");
const cookieNote = get("cookie-note");
const finishButton = get("finish-button");
const demoChip = get("demo-chip");
const meterTimers = new Set();
const demoTimers = new Set();
const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
const visit = {
attempts: 0,
percent: 0,
waiting: false,
demoWait: false,
notices: 1,
served: false
};
let demoRunning = false;
const cookieIcon = '<svg class="cookie-icon" width="22" height="22" viewBox="0 0 24 24" aria-hidden="true"><path d="M13 3a4 4 0 0 0 4 5 3.4 3.4 0 0 0 4 3.2 9 9 0 1 1-8-8.2Z" fill="#ffdf62" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/><path d="M8 9h.1m5 3h.1m-5 4h.1m8 .1h.1" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"/></svg>';
const closeIcon = '<svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><path d="m3 3 6 6m0-6L3 9" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>';
function completedTasks() {
return [visit.attempts === 3, visit.percent === 100, visit.notices === 0];
}
function updateVisit() {
const completed = completedTasks();
const cleared = completed.filter(Boolean).length;
const ready = cleared === tasks.length;
tasks.forEach((task, index) => {
task.classList.toggle("is-cleared", completed[index]);
completionDots[index].classList.toggle("filled", completed[index]);
});
get("cleared-count").textContent = cleared + " / 3 cleared";
get("checkout-note").textContent = ready
? "The counter is ready. Against all odds."
: "Clear all three obstacles to open the counter.";
finishButton.disabled = !ready;
}
function chase() {
if (visit.attempts === 3 || visit.served) return;
visit.attempts += 1;
const caught = visit.attempts === 3;
const positions = ["center", "right", "left", "center"];
const labels = ["Catch me", "Over here", "For real now", "Caught"];
const notes = [
"Tap the button. If it'll let you.",
"Rude. Try the other side.",
"It promises to hold still this time.",
"Button successfully apprehended."
];
runnerField.dataset.position = positions[visit.attempts];
chaseLabel.textContent = labels[visit.attempts];
chaseNote.textContent = notes[visit.attempts];
chaseButton.disabled = caught;
if (caught) updateVisit();
}
function schedule(timers, delay, action) {
const timer = window.setTimeout(() => {
timers.delete(timer);
action();
}, delay);
timers.add(timer);
}
function cancelTimers(timers) {
timers.forEach((timer) => window.clearTimeout(timer));
timers.clear();
}
function setMeter(value, label) {
visit.percent = value;
get("meter-label").textContent = label;
get("meter-percent").textContent = value + "%";
get("meter").setAttribute("aria-valuenow", String(value));
get("meter-fill").style.setProperty("--value", value + "%");
}
function resetMeter() {
cancelTimers(meterTimers);
visit.waiting = false;
visit.demoWait = false;
setMeter(0, "Standing by");
waitButton.disabled = false;
waitButtonLabel.textContent = "Start waiting";
meterNote.textContent = "Estimated time remaining · a bit.";
}
function startWaiting(fromDemo = false) {
if (visit.waiting || visit.percent === 100 || visit.served) return;
visit.waiting = true;
visit.demoWait = fromDemo;
waitButton.disabled = true;
waitButtonLabel.textContent = "Waiting…";
meterNote.textContent = "Please remain approximately patient.";
setMeter(4, "Getting started");
const frames = [
[300, 25, "Making really good time"],
[620, 53, "Nearly halfway"],
[970, 78, "Past the easy bit"],
[1320, 96, "Nearly there"],
[1740, 99, "Basically done"],
[2500, 68, "Reconsidering"],
[3110, 85, "Working forward again"],
[3500, 96, "Checking the check"],
[3890, 99, "Here we go again"],
[4580, 100, "Eventually complete"]
];
frames.forEach(([delay, value, label]) => {
schedule(meterTimers, delay, () => {
setMeter(value, label);
if (value === 68) meterNote.textContent = "It went backward. Very official.";
if (value === 100) {
visit.waiting = false;
visit.demoWait = false;
waitButtonLabel.textContent = "Waiting complete";
meterNote.textContent = "100%. A historic day.";
updateVisit();
}
});
});
}
function renderNotices() {
const count = visit.notices;
cookieField.dataset.count = String(count);
if (count === 0) {
cookieField.innerHTML = '<div class="cookie-empty"><svg width="17" height="17" viewBox="0 0 20 20" aria-hidden="true"><path d="m4 10 4 4 8-8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg> Inbox unusually empty</div>';
return;
}
const notices = Array.from({ length: count }, (_, index) => {
const paper = document.createElement("div");
paper.className = "cookie-paper";
const buttonLabel = count === 4 ? "Close all fake cookie notices" : "Close fake cookie notice " + (index + 1);
paper.innerHTML = cookieIcon
+ '<span class="cookie-label"><b>Fake cookies</b><small>Administrative crumbs</small></span>'
+ '<button type="button" class="close-notice" aria-label="' + buttonLabel + '">Close' + closeIcon + '</button>';
return paper;
});
cookieField.replaceChildren(...notices);
}
function closeNotice() {
if (visit.notices === 0 || visit.served) return;
const returnFocus = cookieField.contains(document.activeElement);
visit.notices = visit.notices === 4 ? 0 : visit.notices * 2;
const notes = {
2: "That made two. Interesting.",
4: "Four notices. Any Close will clear them.",
0: "Forms filed. Crumbs contained."
};
renderNotices();
cookieNote.textContent = notes[visit.notices];
if (visit.notices === 0) updateVisit();
if (returnFocus) {
const destination = cookieField.querySelector("button") || (finishButton.disabled ? cookieNote : finishButton);
destination.focus({ preventScroll: true });
}
}
function changeScreen(served, moveFocus) {
visit.served = served;
room.hidden = served;
receipt.hidden = !served;
get("serving-number").textContent = served ? "042" : "041";
get("serving-status").dataset.ready = String(served);
window.scrollTo({ top: 0, left: 0, behavior: "auto" });
if (moveFocus) get(served ? "thanks-title" : "page-title").focus({ preventScroll: true });
}
function resetVisit(moveFocus = false) {
resetMeter();
visit.attempts = 0;
visit.notices = 1;
runnerField.dataset.position = "center";
chaseButton.disabled = false;
chaseLabel.textContent = "Catch me";
chaseNote.textContent = "Tap the button. If it'll let you.";
renderNotices();
cookieNote.textContent = "One fake cookie notice. Probably.";
markDemoSpot(null);
updateVisit();
changeScreen(false, moveFocus);
}
function showReceipt(allowShortcut = false, moveFocus = true) {
const [caught, waited, dismissed] = completedTasks();
const allCleared = caught && waited && dismissed;
if (visit.served || (!allCleared && !allowShortcut)) return;
if (visit.waiting) resetMeter();
get("receipt-button").textContent = caught ? "Caught" : "Still roaming";
get("receipt-meter").textContent = waited ? "100%, eventually" : "Waived";
get("receipt-cookies").textContent = dismissed ? "Dismissed" : "Filing pending";
get("thanks-copy").textContent = allCleared
? "Somehow, that was our fastest service today."
: "You found the shortcut. The Department will take several days to process this discovery.";
markDemoSpot(null);
changeScreen(true, moveFocus);
}
function markDemoSpot(target) {
[...tasks, checkout].forEach((element) => {
element.classList.toggle("demo-spot", element === target);
});
if (!target) return;
const bounds = target.getBoundingClientRect();
if (bounds.top < 24 || bounds.bottom > window.innerHeight - 44) {
target.scrollIntoView({ block: "center", behavior: reducedMotion.matches ? "auto" : "smooth" });
}
}
function demoStep(delay, action) {
schedule(demoTimers, delay, () => {
if (demoRunning) action();
});
}
function demoCycle() {
resetVisit();
demoStep(1650, () => markDemoSpot(chaseTask));
demoStep(2250, chase);
demoStep(3030, chase);
demoStep(3790, chase);
demoStep(4440, () => markDemoSpot(meterTask));
demoStep(4980, () => startWaiting(true));
demoStep(10000, () => markDemoSpot(cookieTask));
demoStep(10650, closeNotice);
demoStep(11620, closeNotice);
demoStep(12850, closeNotice);
demoStep(13850, () => markDemoSpot(checkout));
demoStep(14850, () => showReceipt(false, false));
demoStep(20000, demoCycle);
}
function startDemo() {
if (demoRunning) return;
demoRunning = true;
demoChip.hidden = false;
document.body.classList.add("demo-running");
demoCycle();
}
function stopDemo() {
if (!demoRunning) return;
demoRunning = false;
cancelTimers(demoTimers);
if (visit.demoWait) resetMeter();
markDemoSpot(null);
demoChip.hidden = true;
document.body.classList.remove("demo-running");
}
function takeOver(event) {
if (event.isTrusted) stopDemo();
}
chaseButton.addEventListener("pointerenter", (event) => {
if (event.pointerType === "mouse" && visit.attempts === 0 && !demoRunning) chase();
});
chaseButton.addEventListener("click", chase);
waitButton.addEventListener("click", () => startWaiting());
cookieField.addEventListener("click", (event) => {
if (event.target.closest(".close-notice")) closeNotice();
});
finishButton.addEventListener("click", () => showReceipt());
get("skip-button").addEventListener("click", () => showReceipt(true));
get("restart-button").addEventListener("click", () => resetVisit(true));
get("demo-launch").addEventListener("click", startDemo);
["pointerdown", "touchstart", "mousedown", "keydown", "wheel", "click"].forEach((type) => {
window.addEventListener(type, takeOver, { capture: true, passive: true });
});
window.addEventListener("hashchange", () => {
if (window.location.hash === "#demo") startDemo();
else stopDemo();
});
renderNotices();
if (window.location.hash === "#demo") startDemo();
})();
</script>
</body>
</html>
