/* DM Development: the tiny software shop, printed like a 1960s paperback.
 *
 * The print rules:
 * - Three inks on yellowed paper: black, vermilion and blueprint blue. Nothing else.
 * - Shade with halftone dots or stripes, never with gradients.
 * - A colour block sits a little right and down of its black outline (--off).
 * - One line weight. Square corners.
 * - Two typefaces: League Gothic for headlines, Courier Prime for the rest.
 */

@font-face {
  font-family: 'League Gothic';
  src: url('../fonts/league-gothic-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Courier Prime';
  src: url('../fonts/courier-prime-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Courier Prime';
  src: url('../fonts/courier-prime-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f1e4c3;
  --paper-dark: #e4d3a8;
  --paper-light: #f7edd3;
  --ink: #1c1814;
  --ink-soft: #564c40;
  --red: #e0492a;
  --blue: #1f4f9e;
  --line: 3px solid var(--ink);
  --off: 4px 3px;
  --dots: radial-gradient(color-mix(in srgb, var(--ink) 30%, transparent) 1px, transparent 1.4px) 0 0 / 6px 6px;
  --display: 'League Gothic', 'Arial Narrow', Impact, sans-serif;
  --type: 'Courier Prime', 'Courier New', Courier, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background-color: var(--paper);
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.33  0 0 0 0 0.18  0 0 0 0.3 -0.07'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--type);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
pre,
textarea.is-code,
.hood {
  font-variant-ligatures: none;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
main,
.topbar,
.footer {
  width: min(1140px, 100% - 32px);
  margin-inline: auto;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
}
.brand img {
  border: var(--line);
  background: var(--paper-light);
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 26px);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.topbar nav a {
  text-decoration: none;
}
.topbar nav a:hover {
  text-decoration: underline;
}
.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 6px 14px 4px;
  box-shadow: var(--off) 0 var(--red);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(24px, 5vw, 52px) 0 clamp(28px, 4vw, 44px);
  max-width: 980px;
}
.eyebrow {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px 4px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(3.2rem, 10vw, 7.4rem);
  line-height: 0.9;
  text-shadow: var(--off) 0 var(--red);
}
.hl {
  color: var(--paper);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: var(--off) 0 var(--blue);
}
.lede {
  margin-top: 22px;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 64ch;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--paper);
  background: var(--ink);
  border: var(--line);
  border-radius: 0;
  padding: 10px 18px 6px;
  box-shadow: var(--off) 0 var(--red);
  cursor: pointer;
  text-decoration: none;
  transition: translate 0.08s, box-shadow 0.08s;
}
.btn:hover:not(:disabled) {
  translate: 2px 1px;
  box-shadow: 2px 2px 0 var(--red);
}
.btn:active:not(:disabled) {
  translate: 4px 3px;
  box-shadow: 0 0 0 var(--red);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-sun {
  background: var(--blue);
  box-shadow: var(--off) 0 var(--ink);
}
.btn-sun:hover:not(:disabled) {
  box-shadow: 2px 2px 0 var(--ink);
}
.btn-ghost {
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: var(--off) 0 var(--blue);
}
.btn-ghost:hover:not(:disabled) {
  box-shadow: 2px 2px 0 var(--blue);
}
.btn-small {
  font-size: 1.15rem;
  padding: 8px 13px 4px;
}
.btn-big {
  font-size: clamp(1.5rem, 4.4vw, 2.4rem);
  padding: 14px 26px 9px;
}

/* ---------- the shop ---------- */

.shop {
  position: relative;
  border: var(--line);
  box-shadow: 7px 6px 0 var(--ink);
  background: var(--paper);
  scroll-margin-top: 20px;
}
.sign {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--blue);
  border-bottom: var(--line);
  padding: 10px 18px 3px;
}
.sign-board {
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 0.9;
  color: var(--paper);
  text-shadow: 3px 2px 0 var(--ink);
}

.room {
  position: relative;
  overflow: hidden;
  background: var(--dots), var(--paper-dark);
  padding: 205px clamp(8px, 2vw, 28px) 0;
}
.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  border-top: var(--line);
  background: repeating-linear-gradient(-45deg, transparent 0 7px, color-mix(in srgb, var(--ink) 50%, transparent) 7px 8.5px), var(--paper);
}

/* on the wall */
.poster {
  position: absolute;
  top: 18px;
  left: clamp(12px, 4vw, 48px);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 0.85;
  text-align: center;
  color: var(--paper);
  background: var(--red);
  border: var(--line);
  padding: 9px 12px 4px;
  rotate: -3deg;
  box-shadow: var(--off) 0 var(--ink);
}
.pinboard {
  position: absolute;
  top: 16px;
  right: clamp(12px, 4vw, 48px);
  width: 118px;
  height: 78px;
  background: var(--paper);
  border: var(--line);
  box-shadow: var(--off) 0 var(--blue);
}
.pinboard i {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--ink);
  background: var(--paper-light);
}
.pinboard i:nth-child(1) {
  left: 10px;
  top: 10px;
  rotate: -6deg;
  background: var(--red);
}
.pinboard i:nth-child(2) {
  left: 46px;
  top: 22px;
  rotate: 5deg;
  background: var(--blue);
}
.pinboard i:nth-child(3) {
  right: 9px;
  top: 38px;
  rotate: -3deg;
}

/* The sandbox: a sealed black box on the wall. Small when idle; it opens while
   a test run is shown. */
.bench {
  position: absolute;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  z-index: 1; /* idle: behind the speech tapes */
  width: 190px;
  background: var(--ink);
  color: var(--paper-light);
  border: var(--line);
  border-top: 9px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--ink) 0 7px, var(--red) 7px 14px) 9 3 3 3;
  box-shadow: var(--off) 0 var(--blue);
  padding: 6px 10px 8px;
  transition: width 0.25s steps(4);
}
.bench.is-open {
  z-index: 6;
  width: min(600px, 94%);
  box-shadow: var(--off) 0 var(--red);
}
.bench-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.bench-head b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: auto;
}
.bench-idle,
.bench-seal {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bench-idle {
  flex-basis: 100%;
  opacity: 0.75;
}
.bench-seal {
  display: none;
  border: 1.5px solid var(--paper-light);
  padding: 1px 5px 0;
}
.bench.is-open .bench-seal {
  display: inline-block;
}
.bench.is-open .bench-idle,
.bench:not(.is-open) .bench-body,
.bench:not(.is-open) .bench-sum {
  display: none;
}
.bench-body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  margin-top: 8px;
  align-items: start;
}
.bench-code {
  margin: 0;
  max-height: 96px;
  overflow: hidden;
  font: 0.62rem/1.35 var(--type);
  white-space: pre;
  color: var(--paper);
  border-left: 3px solid var(--blue);
  padding-left: 7px;
}
.bench-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}
.bench-rows li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-light);
  color: var(--ink);
  padding: 2px 3px 2px 7px;
  font-size: 0.66rem;
  opacity: 0.45;
}
.bench-rows code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: inherit;
}
.bench-rows b {
  flex: none;
  max-width: 55%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.06em;
  padding: 3px 6px 1px;
  background: var(--ink);
  color: var(--paper-light);
}
.bench-rows .is-running,
.bench-rows .is-pass,
.bench-rows .is-fail,
.bench-rows .is-skip {
  opacity: 1;
}
.bench-rows .is-running b {
  animation: caret 0.3s steps(2) infinite;
}
.bench-rows .is-pass b {
  background: var(--blue);
}
.bench-rows .is-fail b {
  background: var(--red);
}
.bench-rows .is-skip b {
  background: var(--ink-soft);
}
.bench-sum {
  margin-top: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  min-height: 1.2em;
}

/* the robots */
.desks {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 1.6vw, 22px);
  align-items: end;
  padding-bottom: 6px;
}
.desk {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rig {
  width: 100%;
  max-width: 152px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.seat {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seat:focus-visible {
  outline: 3px dashed var(--ink);
  outline-offset: 4px;
}
.robot {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  transform-origin: 50% 100%;
}
.robot .plate {
  mix-blend-mode: multiply;
}
/* jerky, like a cheap machine */
.is-working .robot {
  animation: rattle 0.36s steps(2, jump-none) infinite;
}
@keyframes rattle {
  to {
    transform: translateY(-2.5%) rotate(-1.2deg);
  }
}

/* ---- robot moves ----
   All moves jump between poses (steps), like a cheap wind-up machine.
   Lengths inside a robot are in drawing units: the robot is 220 by 260. */
.robot [class^='p-'] {
  transform-box: view-box;
}
.p-static {
  opacity: 0;
}
.is-idle .p-steam {
  opacity: 0;
}
.p-pen {
  transform-origin: 0 0;
}
.p-arm-l {
  transform-origin: 36px 172px;
}
.p-arm-r {
  transform-origin: 184px 172px;
}
.p-needle {
  transform-origin: 111px 198px;
}
.p-target {
  transform-origin: 141px 50px;
}
.p-cup {
  transform-origin: 110px 176px;
}
[data-agent='tess'] .p-arm {
  transform-origin: 152px 146px;
}
[data-agent='bean'] .p-arm {
  transform-origin: 160px 122px;
}

/* each robot runs a little out of step with the others */
.desk:nth-child(1) { --lag: -0.4s; }
.desk:nth-child(2) { --lag: -2.9s; }
.desk:nth-child(3) { --lag: -1.6s; }
.desk:nth-child(4) { --lag: -4.3s; }
.desk:nth-child(5) { --lag: -3.4s; }

/* idle: a sigh now and then, a blink, a twitch */
.is-idle .robot {
  animation: sigh 6.4s steps(1) var(--lag, 0s) infinite;
}
@keyframes sigh {
  0%, 100% { transform: none; }
  70% { transform: scaleY(1.012); }
  78% { transform: scaleY(0.975); }
  90% { transform: scaleY(0.99); }
}
.p-eyes {
  animation: blink 5.2s steps(1) var(--lag, 0s) infinite;
}
.robot.is-done .p-eyes {
  animation: none;
}
@keyframes blink {
  0%, 100% { transform: none; }
  93% { transform: scaleY(0.12); }
  96% { transform: none; }
}
.p-antenna {
  animation: twitch 7s steps(1) var(--lag, 0s) infinite;
}
@keyframes twitch {
  0%, 100% { transform: none; }
  40% { transform: rotate(9deg); }
  43% { transform: rotate(-5deg); }
  46% { transform: none; }
}
.is-idle .p-needle {
  animation: needle-idle 3.8s steps(1) var(--lag, 0s) infinite;
}
@keyframes needle-idle {
  0%, 100% { transform: none; }
  30% { transform: rotate(5deg); }
  36% { transform: rotate(-3deg); }
  60% { transform: rotate(2deg); }
}
.is-idle .p-face {
  animation: bad-signal 9s steps(1) var(--lag, 0s) infinite;
}
@keyframes bad-signal {
  0%, 100% { opacity: 1; transform: none; }
  50% { opacity: 0.25; transform: translateX(3px); }
  52% { opacity: 1; transform: translateX(-2px); }
  54% { transform: none; }
}

/* at work: every robot uses the part that does its job */
.p-rays {
  animation: flicker 0.5s steps(1) infinite;
}
@keyframes flicker {
  50% { opacity: 0; }
}
.is-working .p-pen {
  animation: plot 1.6s steps(1) infinite;
}
@keyframes plot {
  0%, 100% { transform: none; }
  20% { transform: translateX(-34px); }
  40% { transform: translateX(18px); }
  60% { transform: translateX(-12px); }
  80% { transform: translateX(26px); }
}
.is-working .p-arm-l {
  animation: type 0.3s steps(1) infinite;
}
.is-working .p-arm-r {
  animation: type-r 0.3s steps(1) -0.15s infinite;
}
@keyframes type {
  50% { transform: rotate(11deg); }
}
@keyframes type-r {
  50% { transform: rotate(-11deg); }
}
.is-working .p-needle {
  animation: needle-work 0.7s steps(1) infinite;
}
@keyframes needle-work {
  0%, 100% { transform: none; }
  25% { transform: rotate(-22deg); }
  50% { transform: rotate(8deg); }
  75% { transform: rotate(-40deg); }
}
.is-working .p-target {
  animation: spin 1.2s steps(8) infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.is-working[data-agent='tess'] .p-arm {
  animation: wave 0.5s steps(1) infinite;
}
.p-steam {
  animation: steam 1.2s steps(4) infinite;
}
@keyframes steam {
  from { transform: translateY(5px); }
  to { transform: translateY(-7px); opacity: 0.2; }
}

/* done: one small hop, and Tess waves */
.is-done .robot {
  animation: proud 0.5s steps(1) 1;
}
@keyframes proud {
  0%, 100% { transform: none; }
  30% { transform: translateY(-5%); }
  60% { transform: translateY(0) scaleY(0.97); }
}
.is-done[data-agent='tess'] .p-arm {
  animation: wave 0.7s steps(1) 4;
}
@keyframes wave {
  50% { transform: rotate(-16deg); }
}

/* poked: each robot has its own trick */
.seat.is-poked .robot {
  animation: jolt 0.5s steps(1) 1;
}
@keyframes jolt {
  0%, 100% { transform: none; }
  15% { transform: translateY(-4%) rotate(2deg); }
  40% { transform: rotate(-2deg); }
  65% { transform: translateY(-1.5%); }
}
.seat.is-poked .p-eyes {
  animation: startled 0.9s steps(1) 1;
}
@keyframes startled {
  0%, 100% { transform: none; }
  10% { transform: scale(1.35); }
  70% { transform: scaleY(0.12); }
  80% { transform: none; }
}
.seat.is-poked .p-antenna {
  animation: boing 0.8s steps(1) 1;
}
@keyframes boing {
  0%, 100% { transform: none; }
  15% { transform: rotate(-24deg); }
  35% { transform: rotate(18deg); }
  55% { transform: rotate(-10deg); }
  75% { transform: rotate(5deg); }
}
/* Archie: the pen runs to both ends of the bar */
.seat.is-poked .p-pen {
  animation: sweep 0.9s steps(1) 1;
}
@keyframes sweep {
  0%, 100% { transform: none; }
  15% { transform: translateX(calc(var(--far) / 2)); }
  30% { transform: translateX(var(--far)); }
  50% { transform: translateX(calc(var(--near) / 2)); }
  65% { transform: translateX(var(--near)); }
  85% { transform: translateX(calc(var(--near) / 3)); }
}
/* Dev: a carriage return, and all hands up */
.seat.is-poked .p-carriage {
  animation: carriage 0.9s steps(1) 1;
}
@keyframes carriage {
  0%, 100% { transform: none; }
  12% { transform: translateX(-7px); }
  24% { transform: translateX(-14px); }
  36% { transform: translateX(-20px); }
  70% { transform: translateX(6px); }
  82% { transform: translateX(-2px); }
}
.seat.is-poked .p-arm-l {
  animation: hands-up 0.9s steps(1) 1;
}
.seat.is-poked .p-arm-r {
  animation: hands-up-r 0.9s steps(1) 1;
}
@keyframes hands-up {
  0%, 100% { transform: none; }
  12%, 55% { transform: rotate(22deg); }
  70% { transform: rotate(-6deg); }
}
@keyframes hands-up-r {
  0%, 100% { transform: none; }
  12%, 55% { transform: rotate(-22deg); }
  70% { transform: rotate(6deg); }
}
/* Rex: the picture goes, the needle hits the stop */
.seat.is-poked .p-static {
  animation: static 0.9s steps(1) 1;
}
@keyframes static {
  0%, 100% { opacity: 0; transform: none; }
  8% { opacity: 1; }
  22% { opacity: 1; transform: translate(2px, 3px); }
  36% { opacity: 0; }
  48% { opacity: 1; transform: translate(-2px, 1px); }
  62% { opacity: 1; transform: translate(1px, -2px); }
  76% { opacity: 0; }
}
.seat.is-poked .p-face {
  animation: no-picture 0.9s steps(1) 1;
}
@keyframes no-picture {
  0%, 36%, 76%, 100% { opacity: 1; transform: none; }
  8%, 48% { opacity: 0; }
  40% { transform: translateY(6px); }
}
.seat.is-poked .p-needle {
  animation: slam 0.9s steps(1) 1;
}
@keyframes slam {
  0%, 100% { transform: none; }
  8% { transform: rotate(70deg); }
  30% { transform: rotate(62deg); }
  45% { transform: rotate(70deg); }
  65% { transform: rotate(30deg); }
  80% { transform: rotate(-8deg); }
}
.seat.is-poked .p-ears {
  animation: flicker 0.18s steps(1) 4;
}
/* Tess: takes the hit like a professional */
[data-agent='tess'] .seat.is-poked .robot {
  animation: crash 0.9s steps(1) 1;
}
@keyframes crash {
  0%, 100% { transform: none; }
  10% { transform: rotate(13deg) translateX(4%); }
  35% { transform: rotate(16deg) translateX(5%); }
  55% { transform: rotate(-5deg); }
  75% { transform: rotate(2deg); }
}
.seat.is-poked .p-target {
  animation: spin 0.45s steps(8) 2;
}
[data-agent='tess'] .seat.is-poked .p-arm {
  animation: wave 0.22s steps(1) 4;
}
/* Bean: lets off steam and spills nothing, this time */
[data-agent='bean'] .seat.is-poked .robot {
  animation: hop-bean 0.8s steps(1) 1;
}
@keyframes hop-bean {
  0%, 100% { transform: none; }
  12% { transform: scaleY(0.94); }
  28% { transform: translateY(-8%); }
  46% { transform: translateY(0) scaleY(0.96); }
  62% { transform: translateY(-3%); }
}
.seat.is-poked .p-steam {
  opacity: 1;
  animation: steam 0.3s steps(3) 3;
}
.seat.is-poked .p-cup {
  animation: cup 0.8s steps(1) 1;
}
@keyframes cup {
  0%, 100% { transform: none; }
  20% { transform: rotate(-9deg) translateY(-3px); }
  40% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(3deg); }
}
[data-agent='bean'] .seat.is-poked .p-arm {
  animation: wave 0.25s steps(1) 3;
}

/* the noise, printed in the second ink */
.sfx {
  position: absolute;
  top: -4%;
  right: -6%;
  z-index: 2;
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 34px);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--red);
  text-shadow: 2px 2px 0 var(--ink);
  rotate: 12deg;
  pointer-events: none;
  animation: sfx 1s steps(1) 1 both;
}
.desk:nth-child(even) .sfx {
  right: auto;
  left: -6%;
  rotate: -10deg;
}
@keyframes sfx {
  0% { transform: scale(0.4); }
  8% { transform: scale(1.25); }
  20% { transform: scale(1); }
  80% { transform: scale(1) translateY(-4px); opacity: 1; }
  92%, 100% { transform: scale(1) translateY(-10px); opacity: 0; }
}
/* where the ticket lies while a robot has it: at its feet */
.tabletop {
  width: 100%;
  height: 0;
}
.nameplate {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  min-width: 96px;
  background: var(--ink);
  color: var(--paper);
  padding: 5px 12px 4px;
  margin-bottom: 2px;
}
.nameplate b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}
.nameplate span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.is-working .nameplate {
  background: var(--red);
}
.is-done .nameplate {
  background: var(--blue);
}

/* agent colours: the colour plate behind an agent's slip */
.a-sky,
.a-sun {
  --c: var(--blue);
}
.a-mint,
.a-tomato,
.a-lilac {
  --c: var(--red);
}

/* speech tapes */
.bubble {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  max-height: 178px;
  overflow: auto;
  scrollbar-width: none;
  background: var(--paper-light);
  border: var(--line);
  border-left-width: 11px;
  box-shadow: var(--off) 0 var(--ink);
  padding: 7px 11px 8px;
  z-index: 4;
  animation: pop 0.2s steps(3);
}
.bubble::-webkit-scrollbar {
  display: none;
}
.desk:first-child .bubble {
  left: 0;
  transform: none;
}
.desk:last-child .bubble {
  left: auto;
  right: 0;
  transform: none;
}
@keyframes pop {
  from {
    scale: 0.7;
    opacity: 0;
  }
}
.bubble-doing {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}
.is-working .bubble-doing {
  display: inline-block;
  color: var(--paper);
  background: var(--red);
  padding: 3px 8px 0;
}
.bubble-got {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-soft);
  margin-top: 5px;
  padding-left: 7px;
  border-left: 3px solid var(--blue);
}
.bubble-got:empty {
  display: none;
}
.bubble-text {
  font-size: 0.84rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 5px;
}
.bubble-text:empty {
  display: none;
}
.is-working .bubble-text::after {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--ink);
  animation: caret 0.7s steps(2) infinite;
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
.is-done .bubble {
  border-left-width: 3px;
  box-shadow: none;
  padding: 3px 9px 0;
  background: var(--blue);
  color: var(--paper);
}

/* the travelling ticket */
.flyer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  transform: translate(-80px, 300px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.5, -0.3, 0.3, 1.3), opacity 0.3s;
  pointer-events: none;
}
.flyer.is-out {
  transform: translate(var(--x), var(--y));
  opacity: 1;
}
.flyer.no-slide {
  transition: none;
}
.flyer span,
.fly-ticket {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--ink);
  background: var(--paper-light);
  border: var(--line);
  border-right-style: dashed;
  padding: 6px 9px 2px;
  box-shadow: var(--off) 0 var(--red);
}
.flyer span {
  display: block;
  translate: -50% -100%;
  rotate: -7deg;
}
.flyer.is-back span {
  background: var(--red);
  color: var(--paper);
  box-shadow: var(--off) 0 var(--ink);
}
.flyer.hop span {
  animation: hop 0.8s ease-out;
}
@keyframes hop {
  40% {
    translate: -50% -260%;
    rotate: 12deg;
  }
}

/* cards that fly between the robots and the board */
.fly {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  pointer-events: none;
  will-change: transform;
}
.fly-note {
  min-width: 96px;
  max-width: 180px;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  color: var(--ink);
  background: var(--paper-light);
  border: var(--line);
  border-top-width: 10px;
  padding: 8px 10px 4px;
  box-shadow: var(--off) 0 var(--c);
}
.fly-note.is-feedback {
  color: var(--paper);
  background: var(--red);
  box-shadow: var(--off) 0 var(--ink);
}

/* the bar that stands in for the counter while a ticket runs */
.runbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  border-top: var(--line);
  background: var(--paper);
  padding: 12px clamp(14px, 2.6vw, 28px);
}
.runbar[hidden] {
  display: none;
}
.run-status {
  flex: 1 1 260px;
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}
.runbar .btn.is-call {
  background: var(--red);
  animation: nudge 1.2s steps(2, jump-none) infinite;
}
@keyframes nudge {
  to {
    translate: 0 -3px;
  }
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.switch[hidden] {
  display: none;
}
.switch input {
  width: 1.2em;
  height: 1.2em;
  accent-color: var(--ink);
  margin: 0;
}
.shop.is-busy .counter,
.shop.is-after .counter {
  display: none;
}
.shop.is-busy + .board-wrap,
.shop.is-after + .board-wrap {
  margin-top: 18px;
}
.shop.is-busy + .board-wrap .board-head h2,
.shop.is-after + .board-wrap .board-head h2 {
  font-size: 2rem;
}
.shop.is-busy + .board-wrap .board,
.shop.is-after + .board-wrap .board {
  margin-top: 14px;
}

/* counter */
.counter {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  border-top: var(--line);
  background: var(--paper);
}
.counter h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.ticket-form,
.brains {
  padding: clamp(16px, 2.6vw, 28px);
  min-width: 0;
}
.brains {
  border-left: var(--line);
  background: var(--paper-light);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.chip {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
  background: var(--paper-light);
  border: var(--line);
  border-radius: 0;
  padding: 7px 12px 3px;
  cursor: pointer;
}
.chip:hover {
  background: var(--paper-dark);
}
.chip[aria-checked='true'] {
  color: var(--paper);
  background: var(--ink);
  box-shadow: var(--off) 0 var(--red);
}
.field {
  display: block;
  margin-top: 18px;
}
.field span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper-light);
  border: var(--line);
  border-radius: 0;
  padding: 10px 12px;
  resize: vertical;
}
textarea.is-code {
  font-size: 0.86rem;
  white-space: pre;
}
textarea:read-only {
  background: repeating-linear-gradient(-45deg, var(--paper-light) 0 10px, var(--paper) 10px 20px);
}
.another {
  margin-top: 8px;
}
.hint {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-top: 6px;
}
.hint.is-problem {
  color: var(--red);
  font-weight: 700;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 16px;
}

.brain-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}
.dot {
  flex: none;
  width: 16px;
  height: 16px;
  border: var(--line);
  border-radius: 50%;
  background: var(--paper);
}
[data-kind='hosted'] .dot {
  background: var(--red);
}
.brain-detail {
  margin: 8px 0 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- board ---------- */

.board-wrap {
  margin-top: 56px;
  scroll-margin-top: 20px;
}
.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
}
.board-head h2,
.how h2,
.about h2,
.services h2 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
}
.board-head p {
  flex: 1 1 200px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
}
/* the line that the ticket moves along */
.track {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
}
.track[hidden] {
  display: none;
}
.station {
  position: relative;
  min-width: 104px;
  padding: 4px 12px 6px;
  border: var(--line);
  background: var(--paper-light);
}
.station b {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.station span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.station + .station::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 50%;
  width: 20px;
  border-top: var(--line);
}
.station.is-done {
  background: var(--blue);
  color: var(--paper-light);
}
.station.is-now {
  background: var(--red);
  color: var(--paper-light);
  box-shadow: var(--off) 0 var(--ink);
  translate: -2px -2px;
}
.station.is-done span,
.station.is-now span {
  color: inherit;
}
/* how often the work came back to this station */
.station[data-rework]::after {
  content: 'rework ×' attr(data-rework);
  position: absolute;
  top: -13px;
  right: -10px;
  padding: 1px 6px;
  background: var(--ink);
  color: var(--paper-light);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  rotate: 4deg;
}

.board {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 24px;
  align-items: start;
  min-height: 150px;
}
.board:empty {
  border: 3px dashed color-mix(in srgb, var(--ink) 35%, transparent);
}
/* a typed slip */
.note {
  position: relative;
  background: var(--paper-light);
  border: var(--line);
  box-shadow: var(--off) 0 var(--c);
  padding: 0 12px 8px;
  rotate: -0.8deg;
  animation: drop 0.3s steps(3);
}
.note:nth-child(2n) {
  rotate: 0.7deg;
}
.note:nth-child(3n) {
  rotate: -0.3deg;
}
.note.is-landing {
  visibility: hidden;
  animation: none;
}
.note.is-read {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
@keyframes drop {
  from {
    opacity: 0;
    translate: 0 -18px;
  }
}
.note header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
  margin: 0 -12px 9px;
  padding: 6px 12px 2px;
  background: var(--ink);
  color: var(--paper);
}
.note header b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.note header span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.note-text {
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 2.8em;
}
.note footer {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 2px dashed var(--ink);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  min-height: 1.6em;
}
/* the gate's verdict as a rubber stamp, and a first version that a redo replaced */
.note[data-stamp]::after {
  content: attr(data-stamp);
  position: absolute;
  top: -14px;
  right: -16px;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1;
  background: var(--paper-light);
  border: 3px double currentColor;
  outline: 3px solid currentColor;
  outline-offset: 2px;
  padding: 5px 9px 1px;
  rotate: -9deg;
  animation: stamp 0.25s steps(3);
}
.note.is-approved::after {
  color: var(--blue);
  rotate: 6deg;
}
.note.is-rejected::after {
  color: var(--red);
}
@keyframes stamp {
  from {
    scale: 2;
    opacity: 0;
  }
}
.note.is-superseded {
  opacity: 0.55;
}
.note.is-superseded .note-text {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.delivery {
  margin-top: 30px;
  background: var(--paper-light);
  border: var(--line);
  box-shadow: 7px 6px 0 var(--blue);
  padding: clamp(18px, 3vw, 28px);
  animation: drop 0.3s steps(3);
}
.delivery h3 {
  font-size: clamp(3rem, 8vw, 5rem);
  text-shadow: var(--off) 0 var(--red);
}
.delivery p {
  font-weight: 700;
  max-width: 62ch;
}
.delivery .btn {
  margin-top: 16px;
  margin-right: 12px;
}
.stats {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.stats li {
  background: var(--ink);
  color: var(--paper);
  padding: 7px 14px 5px;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.stats b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1;
}
.stats span {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hood {
  margin-top: 30px;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(16px, 3vw, 26px);
  font-size: 0.8rem;
}
.hood-intro {
  color: var(--red);
  font-weight: 700;
  margin-bottom: 6px;
}
.hood ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hood ol:empty::after {
  content: 'Nothing yet. Hand in a ticket.';
  opacity: 0.6;
}
.hood-entry {
  border-top: 1px dashed color-mix(in srgb, var(--paper) 40%, transparent);
  padding: 14px 0 4px;
  margin-top: 10px;
}
.hood-entry h3 {
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--paper);
}
.hood-meta {
  opacity: 0.7;
  margin: 2px 0 8px;
  overflow-wrap: anywhere;
}
.hood-block {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}
.hood-label {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--paper-dark);
  opacity: 0.75;
}
.hood pre {
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- content sections ---------- */

.how,
.about,
.services {
  margin-top: clamp(64px, 9vw, 110px);
  scroll-margin-top: 20px;
}
.cards {
  display: grid;
  gap: 26px;
  margin-top: 24px;
}
.cards.three {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  background: var(--paper-light);
  border: var(--line);
  border-top-width: 12px;
  box-shadow: var(--off) 0 var(--c);
  padding: 18px 20px 20px;
}
.c-sky,
.c-sun {
  --c: var(--blue);
}
.c-mint,
.c-lilac,
.c-tomato {
  --c: var(--red);
}
.card h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.card p {
  font-size: 0.95rem;
}

.about {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
}
.about-text p {
  margin-top: 16px;
  max-width: 62ch;
}
.about-card {
  background: var(--dots), var(--paper-dark);
  border: var(--line);
  box-shadow: 7px 6px 0 var(--blue);
  padding: 20px;
  rotate: 1.2deg;
}
.about-card h3 {
  display: inline-block;
  background: var(--red);
  color: var(--paper);
  border: var(--line);
  padding: 7px 12px 2px;
  font-size: 1.7rem;
  rotate: -3deg;
}
.about-card ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 14px 16px;
  background: var(--paper-light);
  border: var(--line);
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}
/* a label, then the text; a second line of text stays clear of the label */
.about-card li {
  padding-left: calc(4.2rem + 1ch); /* the label and the space after it */
  text-indent: calc(-4.2rem - 1ch);
}
.about-card b {
  display: inline-block;
  min-width: 4.2rem;
  text-indent: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact {
  margin-top: clamp(64px, 9vw, 110px);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(32px, 7vw, 72px) clamp(20px, 5vw, 60px);
  text-align: center;
  scroll-margin-top: 20px;
}
.contact h2 {
  font-size: clamp(3rem, 9vw, 6rem);
  text-shadow: var(--off) 0 var(--red);
}
.contact p {
  margin: 18px auto 28px;
  max-width: 50ch;
}
.contact .btn {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
  box-shadow: var(--off) 0 var(--blue);
  overflow-wrap: anywhere;
}
.contact .btn:hover:not(:disabled) {
  box-shadow: 2px 2px 0 var(--blue);
}

.footer {
  padding: 30px 0 44px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .topbar nav a:not(.nav-cta) {
    display: none;
  }
  .room {
    padding-top: 200px;
  }
  .bench {
    width: 132px;
    padding: 4px 7px 6px;
  }
  .bench-head b {
    font-size: 1.15rem;
  }
  .bench-idle {
    font-size: 0.5rem;
  }
  .bench.is-open {
    width: 96%;
  }
  .bench-body {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .bench-code {
    max-height: 34px;
  }
  /* The speech tape hangs on the wall above the robots, across the room. */
  .desks,
  .desk {
    position: static;
  }
  .bubble,
  .desk:first-child .bubble,
  .desk:last-child .bubble {
    left: 10px;
    right: 10px;
    top: 14px;
    bottom: auto;
    width: auto;
    max-width: none;
    max-height: 170px;
    transform: none;
  }
  .is-done .bubble {
    display: none;
  }
  .poster,
  .pinboard {
    opacity: 0.5;
    scale: 0.7;
  }
  /* shrink toward the corners, clear of the sandbox in the middle */
  .poster {
    left: 8px;
    transform-origin: top left;
  }
  .pinboard {
    right: 8px;
    transform-origin: top right;
  }
  /* The station track: one row, names only. */
  .track {
    flex-wrap: nowrap;
    gap: 9px;
  }
  .station {
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 2px 3px;
    border-width: 2px;
    text-align: center;
  }
  .station b {
    font-size: 1rem;
    letter-spacing: 0.02em;
  }
  .station span {
    display: none;
  }
  .station + .station::before {
    left: -9px;
    width: 7px;
    border-top-width: 2px;
  }
  .station[data-rework]::after {
    content: '×' attr(data-rework);
    top: -11px;
    right: -5px;
    padding: 0 4px;
  }
  /* large enough to tap */
  .btn-small:not([hidden]),
  .nav-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .nameplate {
    min-width: 0;
    padding: 4px 6px 2px;
  }
  .nameplate b {
    font-size: 1.05rem;
  }
  .nameplate span {
    display: none;
  }
  .flyer span {
    font-size: 0.7rem;
    padding: 4px 5px 1px;
    border-width: 2px;
  }
  .counter {
    grid-template-columns: 1fr;
  }
  .brains {
    border-left: 0;
    border-top: var(--line);
  }
  .about {
    grid-template-columns: 1fr;
  }
  .hood-block {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
