:root {
  --bg: #000000;
  --ink: #f2f4f3;
  --soft: #8d9592;
  --pill-hi: #24272b;
  --pill-lo: #111315;
  --wait: #ffb547;
  --armed: #5ff2c0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.arm {
  position: relative;
  width: min(318px, calc(100vw - 32px));
  height: 60px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 0 8px;
  border: 0;
  border-radius: 99px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 40px -18px rgba(255, 255, 255, 0.07);
  transition: box-shadow 0.7s ease;
}
.arm.is-wait {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 16px 40px -20px color-mix(in srgb, var(--wait) 45%, transparent);
}
.arm.is-armed {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--armed) 10%, transparent),
    0 14px 36px -16px color-mix(in srgb, var(--armed) 55%, transparent),
    0 34px 70px -34px color-mix(in srgb, var(--armed) 70%, transparent);
}
.arm:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

.arm__body { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: linear-gradient(180deg, var(--pill-hi), var(--pill-lo)); z-index: -2; }
.arm__tint { position: absolute; inset: 0; background: radial-gradient(160px 80px at 30px 50%, color-mix(in srgb, var(--armed) 22%, transparent), transparent 75%); opacity: 0; transition: opacity 0.8s ease; }
.arm.is-armed .arm__tint { opacity: 1; }
.arm__light { position: absolute; inset: 0; background: radial-gradient(130px 70px at var(--px, 50%) var(--py, 0%), rgba(255, 255, 255, 0.12), transparent 70%); opacity: 0; transition: opacity 0.3s ease; }
.arm.is-hot .arm__light { opacity: 1; }
.arm__edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.09));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

/* the light that runs around the pill: one path, rebuilt in pixels at every resize */
.circuit { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.circuit path { fill: none; stroke-linecap: round; }
.circuit__run { stroke: var(--wait); stroke-width: 1.6; }
.circuit__glow { stroke: var(--wait); stroke-width: 5; opacity: 0.32; filter: blur(4px); }
.circuit__tip { stroke: #fff6e2; stroke-width: 2.2; }
.arm.is-armed .circuit__run, .arm.is-armed .circuit__glow { stroke: var(--armed); }
.arm.is-armed .circuit__tip { stroke: #e6fff6; }

.seat { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1); display: grid; place-items: center; transition: background-color 0.6s ease, box-shadow 0.6s ease; }
.arm.is-armed .seat { background: color-mix(in srgb, var(--armed) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--armed) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
/* while it checks, a thin arc turns around the seat */
.seat__scan { position: absolute; inset: -1px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--ink) 70%, transparent) 96%, transparent 100%); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px)); mask: radial-gradient(closest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px)); opacity: 0; }
.seat svg { width: 27px; height: 27px; overflow: visible; }
.seat path, .seat rect { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.seat .seat__fill { fill: var(--armed); stroke: none; opacity: 0; }
.seat .seat__lock { fill: var(--pill-lo); transition: fill 0.5s ease, stroke 0.5s ease; }
.seat .seat__hole { stroke-width: 1.4; }
.arm.is-armed .seat .seat__shield { stroke: var(--armed); }
.arm.is-armed .seat .seat__lock { fill: #0b1712; stroke: #0b1712; }
.arm.is-armed .seat .seat__shackle { stroke: #0b1712; stroke-width: 1.7; }
.arm.is-armed .seat .seat__hole { stroke: var(--armed); }

.label { flex: 1; min-width: 0; display: grid; gap: 1px; }
.label__main { height: 20px; overflow: hidden; font-size: 15.5px; line-height: 20px; font-weight: 640; font-stretch: 104%; letter-spacing: -0.006em; }
.label__sub { height: 15px; overflow: hidden; font-size: 11.5px; line-height: 15px; font-weight: 500; color: var(--soft); }
.label span span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tag { position: relative; flex: none; width: 82px; height: 42px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.06); transition: background-color 0.5s ease, box-shadow 0.5s ease; }
.arm.is-armed .tag { background: var(--armed); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 14px -6px color-mix(in srgb, var(--armed) 80%, transparent); }
.tag > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.tag__sensors { gap: 4px; }
.sensor { position: relative; width: 20px; height: 20px; }
.sensor svg { width: 20px; height: 20px; overflow: visible; }
.sensor path, .sensor rect { fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sensor__icon { stroke: var(--soft); transition: stroke 0.3s ease; }
.sensor.is-ok .sensor__icon { stroke: var(--ink); }
.sensor__tick { stroke: var(--armed); stroke-width: 1.8; opacity: 0; }
.tag__count { font-size: 15px; font-weight: 680; font-stretch: 106%; color: var(--wait); opacity: 0; overflow: hidden; }
.tag__count span { display: block; }
.tag__done { gap: 5px; color: #0b1712; font-size: 13.5px; font-weight: 700; font-stretch: 108%; opacity: 0; }
.tag__done svg { width: 17px; height: 17px; fill: none; stroke: #0b1712; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #f4f6f1;
  stroke: #111315;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (max-width: 360px) {
  .arm { gap: 9px; }
  .tag { width: 74px; }
  .tag__sensors { gap: 2px; }
  .sensor, .sensor svg { width: 18px; height: 18px; }
}
