/* One centered column, light, nothing decorative. In a file because the CSP
   forbids inline styles. */
:root {
  --ink: #18181b; --dim: #71717a; --line: #e4e4e7; --bg: #ffffff; --well: #fafafa;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }

/* Keyboard focus must be plainly visible on every interactive element.
   :focus-visible keeps the ring for keyboard users without flashing it on click. */
:focus-visible {
  outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 4px;
}
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#mode-switch {
  position: fixed; top: 20px; right: 24px;
  padding: 7px 14px; font-size: 13px; font-weight: 550; cursor: pointer;
  background: transparent; color: var(--dim); border: 1px solid var(--line); border-radius: 999px;
}
#mode-switch:hover { color: var(--ink); border-color: var(--dim); }

main {
  max-width: 640px; margin: 0 auto; padding: 26vh 24px 64px;
  text-align: center;
}
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 28px; }

.keyrow { display: flex; align-items: stretch; gap: 8px; }
.keyrow code {
  flex: 1; min-width: 0; display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--well);
  padding: 12px 16px; font-family: var(--mono); font-size: 13.5px;
  overflow-x: auto; white-space: nowrap;
}
/* The key shares .keyrow but is a single unbreakable token, so it scrolls
   sideways. The connect line is a sentence: nowrap hid all but the first few
   words of it, and the words are the instruction. Let this one wrap. */
#connect-line {
  display: block; white-space: normal; overflow-x: visible;
  text-align: left; line-height: 1.6; word-break: break-word;
}

button.icon {
  flex: 0 0 auto; width: 44px; cursor: pointer; border-radius: 9px;
  background: transparent; color: var(--dim); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
button.icon:hover { color: var(--ink); border-color: var(--dim); }
button.icon.done { color: #15803d; border-color: #15803d; }
button.icon svg { width: 17px; height: 17px; }
button.icon:disabled { opacity: 0.4; cursor: default; }

.hint { font-size: 13px; color: var(--dim); margin: 14px 0 0; }
.hint code, .lead code {
  font-family: var(--mono); font-size: 12px; background: var(--well);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}

.lead { font-size: 15px; margin: 0 0 14px; }
#worker {
  margin: 0; padding: 16px 18px; text-align: left;
  background: var(--well); border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
#btn-copy-worker {
  margin-top: 12px; padding: 8px 18px; font-size: 13.5px; font-weight: 550; cursor: pointer;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 7px;
}
#btn-copy-worker:hover { opacity: 0.85; }

/* Fallback manual steps, tucked behind a disclosure so the one-liner stays the
   star of the supporter view. */
.manual { margin-top: 22px; text-align: left; }
.manual > summary {
  cursor: pointer; font-size: 13px; color: var(--dim); text-align: center; list-style-position: inside;
}
.manual > summary:hover { color: var(--ink); }
.manual[open] > summary { margin-bottom: 4px; }

.status {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font-size: 13.5px; color: var(--dim);
}
.dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--line);
  border: 1px solid #d4d4d8; flex: 0 0 auto;
}
.status.live { color: #15803d; }
.status.live .dot { background: #22c55e; border-color: #16a34a; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .status.live .dot { animation: none; } }

/* The bee. Wanders the viewport, hovers now and then, flutters constantly.
   Decorative only: aria-hidden, pointer-events none, and it never sits under a
   control long enough to matter. Held in CSS because the CSP forbids inline
   styles and forbids the JS that would otherwise animate it. */
.bee {
  position: fixed; top: 0; left: 0; width: 21px; height: 21px;
  color: var(--dim); opacity: 0.5; pointer-events: none; z-index: 1;
  animation: roam 52s ease-in-out infinite;
}
.bee svg { width: 100%; height: 100%; display: block; animation: bob 2.1s ease-in-out infinite; }
.bee .body { fill: currentColor; }
.bee .wings ellipse { fill: none; stroke: currentColor; stroke-width: 1.5; }
.bee .antennae { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.bee .stripes { stroke: var(--bg); stroke-width: 1.8; stroke-linecap: round; }
/* Wings beat far faster than the body moves, which is what sells it as a bee
   rather than a drifting dot. */
.bee .wings { transform-origin: 12px 9px; animation: flutter 0.16s ease-in-out infinite; }

@keyframes roam {
  0%   { transform: translate(5vw, 80vh) rotate(0deg); }
  8%   { transform: translate(21vw, 63vh) rotate(-13deg); }
  13%  { transform: translate(23vw, 59vh) rotate(7deg); }
  21%  { transform: translate(45vw, 71vh) rotate(11deg); }
  31%  { transform: translate(69vw, 41vh) rotate(-12deg); }
  37%  { transform: translate(71vw, 37vh) rotate(5deg); }
  45%  { transform: translate(86vw, 61vh) rotate(15deg); }
  55%  { transform: translate(58vw, 83vh) rotate(-7deg); }
  63%  { transform: translate(29vw, 86vh) rotate(9deg); }
  71%  { transform: translate(11vw, 58vh) rotate(-11deg); }
  79%  { transform: translate(33vw, 29vh) rotate(6deg); }
  85%  { transform: translate(35vw, 25vh) rotate(-5deg); }
  93%  { transform: translate(65vw, 17vh) rotate(13deg); }
  100% { transform: translate(5vw, 80vh) rotate(0deg); }
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-2.5px) rotate(3deg); } }
@keyframes flutter { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.55); } }

/* A bee circling the page is exactly what motion sensitivity means. Park it. */
@media (prefers-reduced-motion: reduce) {
  .bee { display: none; }
}

footer {
  margin-top: 64px; display: flex; gap: 18px; justify-content: center; font-size: 13px;
}
footer a { color: var(--dim); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }
