/* Salesman vs robot (race.js): two mock desktops working against one clock.
   Used on the homepage Hutchinson card and the Hutchinson page hero. */
.qrace { --qr-red: #ed1c24; --qr-navy: #1e2563; --qr-mute: #5b6380; --qr-line: rgba(30, 37, 99, 0.12);
  position: relative; z-index: 1; width: min(470px, 100%); border-radius: 24px; padding: 18px; color: var(--qr-navy);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.84));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid #fff; box-shadow: 0 30px 70px rgba(60, 0, 0, 0.3); }
.qr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.qr-head small { display: block; font-family: "JetBrains Mono", monospace; font-size: 9.5px; letter-spacing: 0.14em; color: var(--qr-mute); }
.qr-clock { display: block; font-family: "JetBrains Mono", monospace; font-size: 34px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.qr-head em { font-style: normal; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: var(--qr-red); padding: 4px 9px; border-radius: 999px; background: rgba(237, 28, 36, 0.08); }

.qr-win { border-radius: 14px; overflow: hidden; border: 1px solid var(--qr-line); background: #fff; box-shadow: 0 10px 24px rgba(30, 37, 99, 0.08); }
.qr-win + .qr-win { margin-top: 10px; }
.qr-bar { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: #f3f4f8; border-bottom: 1px solid var(--qr-line); font-size: 11.5px; }
.qr-bar > i { width: 8px; height: 8px; border-radius: 50%; background: #d5d8e2; }
.qr-bar .ttl { margin-left: 6px; font-weight: 600; }
.qr-bar .app { margin-left: auto; font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--qr-mute); }
.qr-win.bot .qr-bar .ttl::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: var(--qr-red); box-shadow: 0 0 8px var(--qr-red); vertical-align: 1px; animation: qrblink 0.8s ease-in-out infinite; }
.qr-win.bot.idle .qr-bar .ttl::after { animation: none; background: #14936b; box-shadow: none; }
@keyframes qrblink { 50% { opacity: 0.25; } }

.qr-screen { position: relative; height: 128px; padding: 10px 12px; overflow: hidden; font-size: 11px; background: #fbfbfd; }
.qr-win.bot .qr-screen::after { content: ""; position: absolute; left: 0; right: 0; height: 30px; top: -30px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(237, 28, 36, 0.12), transparent); animation: qrscan 0.7s linear infinite; }
.qr-win.bot.idle .qr-screen::after { display: none; }
@keyframes qrscan { to { top: 128px; } }
.qr-sc { display: none; }
.qr-sc.on { display: block; }

/* scene pieces */
.qr-tbl { display: grid; gap: 4px; }
.qr-tbl > div { display: grid; grid-template-columns: 1.3fr 1fr 0.6fr; gap: 6px; padding: 4px 6px; border-radius: 6px; min-height: 20px; align-items: center; }
.qr-tbl .h { font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--qr-mute); }
.qr-tbl .ph span { height: 6px; border-radius: 3px; background: #e5e7ee; }
.qr-tbl .act { background: rgba(30, 37, 99, 0.06); outline: 1.5px solid rgba(30, 37, 99, 0.25); }
.qr-tbl .r.hl { background: rgba(237, 28, 36, 0.09); }
.qr-search { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--qr-line); background: #fff; min-height: 30px; }
.qr-search .ic { color: var(--qr-mute); }
.qr-list { margin-top: 8px; display: grid; gap: 4px; }
.qr-list div { padding: 5px 8px; border-radius: 6px; opacity: 0; transition: opacity 0.2s ease; }
.qr-list div.on { opacity: 1; }
.qr-list div.hl { background: rgba(20, 147, 107, 0.12); color: #0d6b4e; font-weight: 600; }
.qr-idx .ln { display: grid; grid-template-columns: 92px 1fr 44px; gap: 8px; align-items: center; margin-bottom: 9px; }
.qr-idx .bar { height: 8px; border-radius: 4px; background: #e9ebf1; overflow: hidden; }
.qr-idx .bar u { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--qr-navy), #4a55a8); }
.qr-idx em { font-style: normal; font-family: "JetBrains Mono", monospace; color: var(--qr-red); opacity: 0; }
.qr-idx em.on, .qr-idx .price.on { opacity: 1; }
.qr-idx .price { margin-top: 6px; font-size: 14px; opacity: 0; } .qr-idx .price b { color: var(--qr-red); }
.qr-pdf .page { position: relative; width: 60%; margin: 0 auto; height: 108px; padding: 9px 10px; border-radius: 6px; background: #fff; box-shadow: 0 4px 14px rgba(30, 37, 99, 0.14); }
.qr-pdf .top { display: flex; justify-content: space-between; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 7px; }
.qr-pdf .top i { width: 18px; height: 6px; border-radius: 2px; background: var(--qr-red); }
.qr-pdf .l { height: 5px; border-radius: 3px; background: #e2e5ee; margin-bottom: 6px; width: 0; transition: width 0.25s ease; }
.qr-pdf .l.on { width: var(--w, 80%); }
.qr-pdf .stamp { position: absolute; right: 8px; bottom: 8px; font-family: "JetBrains Mono", monospace; font-size: 9px; color: #fff; background: var(--qr-red); padding: 2px 6px; border-radius: 4px; opacity: 0; }
.qr-pdf .stamp.on { opacity: 1; }
.qr-mail .f { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--qr-line); }
.qr-mail .f span { color: var(--qr-mute); }
.qr-mail .att, .qr-mail .draft { display: inline-block; margin-top: 9px; margin-right: 6px; padding: 4px 8px; border-radius: 6px; opacity: 0; }
.qr-mail .att { background: rgba(30, 37, 99, 0.07); }
.qr-mail .draft { background: rgba(20, 147, 107, 0.12); color: #0d6b4e; font-weight: 600; }
.qr-mail .on { opacity: 1; }
[data-t]::after { content: ""; }
.qr-win.human [data-t].typing::after { content: "|"; color: var(--qr-red); animation: qrblink 0.6s steps(1) infinite; }

/* the salesman's cursor */
.qr-cur { position: absolute; width: 14px; height: 18px; left: 0; top: 0; pointer-events: none; z-index: 2; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.qr-win.bot .qr-cur { display: none; }

/* glass step card that pops up as each step starts */
.qr-pop { position: absolute; z-index: 3; right: 8px; bottom: 8px; max-width: 64%; padding: 7px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: 0 8px 22px rgba(30, 37, 99, 0.18); }
.qr-pop small { display: block; font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--qr-mute); }
.qr-pop b { font-size: 12.5px; font-weight: 600; }
.qr-win.bot .qr-pop { border-color: rgba(237, 28, 36, 0.35); }
.qr-pop.pop { animation: qrpop 0.42s cubic-bezier(0.22, 1.4, 0.36, 1); }
@keyframes qrpop { from { transform: translateY(10px) scale(0.9); opacity: 0; } }

.qr-tray { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid var(--qr-line); font-size: 11.5px; color: var(--qr-mute); }
.qr-tray .docs { display: flex; gap: 4px; flex: 1; }
.qr-tray .doc { width: 14px; height: 18px; border-radius: 3px; background: #fff; border: 1px solid var(--qr-line); box-shadow: 0 2px 4px rgba(30, 37, 99, 0.1); position: relative; animation: qrdrop 0.45s cubic-bezier(0.22, 1.4, 0.36, 1); }
.qr-tray .doc::before { content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 3px; border-radius: 1px; background: var(--qr-red); }
@keyframes qrdrop { from { transform: translateY(-14px); opacity: 0; } }
.qr-tray b { font-size: 18px; color: var(--qr-navy); font-variant-numeric: tabular-nums; }

.qr-end { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(237, 28, 36, 0.07); font-size: 14px; line-height: 1.4;
  opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.qr-end.on { opacity: 1; transform: none; }
.qr-end b { color: var(--qr-red); font-size: 17px; }
.qr-end span { display: block; margin-top: 3px; font-weight: 600; }
.qr-note { margin-top: 9px; font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(30, 37, 99, 0.45); }
@media (max-width: 560px) {
  .qrace { padding: 14px; }
  .qr-clock { font-size: 28px; }
  .qr-screen { height: 120px; }
  @keyframes qrscan { to { top: 120px; } }
}
@media (prefers-reduced-motion: reduce) {
  .qrace *, .qrace *::before, .qrace *::after { animation: none !important; transition: none !important; }
}
