:root {
  --bg: #0a0b0e;
  --card: #13151b;
  --ink: #eceae4;
  --soft: rgba(236, 234, 228, 0.54);
  --line: rgba(236, 234, 228, 0.1);
  --ok: #3ecf8e;
  --fail: #ff6b5a;
  --tone: var(--ink);
}

*, *::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;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(364px, 100%); padding: 16px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1.500px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 50px -30px #000000; }
.wr.is-wait { --tone: var(--fail); }
.wr.is-done { --tone: var(--ok); }
.wr__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px; }
.wr__what { display: grid; gap: 2px; min-width: 0; }
.wr__what strong { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 14px; line-height: 19px; font-weight: 640; white-space: nowrap; }
.wr__what span { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 11px; line-height: 15px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--soft); }
.wr__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }
.wr__pill { flex: none; height: 26px; padding: 5px 11px; border-radius: 13px; background: color-mix(in srgb, var(--tone) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 26%, transparent); transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.wr__pill .wr__clip { font-weight: 680; color: var(--tone); transition: color 0.4s ease; }

/* the timeline: every wait is twice as long as the one before, so the ticks drift apart */
.wr__line { position: relative; border-radius: 16px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px rgba(236, 234, 228, 0.05); }
.wr__svg { display: block; width: 100%; height: auto; aspect-ratio: 320 / 64; }
.wr__track { fill: none; stroke: rgba(236, 234, 228, 0.16); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 5; }
.wr__run { fill: none; stroke: var(--tone); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke 0.4s ease; }
.wr__head2 { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.wr__tick { fill: none; stroke-width: 2.400; stroke-linecap: round; stroke: rgba(236, 234, 228, 0.3); }
.wr__tick.is-fail { stroke: var(--fail); }
.wr__tick.is-ok { stroke: var(--ok); }
.wr__code { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 10px; font-weight: 640; text-anchor: middle; fill: rgba(236, 234, 228, 0.3); }
.wr__code.is-fail { fill: var(--fail); }
.wr__code.is-ok { fill: var(--ok); }
.wr__hits { position: absolute; inset: 0; }
.wr__hit { position: absolute; top: 0; bottom: 0; width: 30px; margin-left: -15px; border-radius: 8px; cursor: pointer; }
.wr__hit:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.wr__hit.is-on { background: rgba(236, 234, 228, 0.07); }

.wr__now { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-left: 4px; }
.wr__info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; min-width: 0; flex: 1; }
.wr__clip--tall { height: 20px; line-height: 20px; font-size: 13.500px; font-weight: 720; color: var(--ink); }
.wr__btn { flex: none; display: grid; place-items: center; width: 100px; height: 40px; border-radius: 20px; background: var(--ink); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 12px 18px -12px rgba(0, 0, 0, 0.9); transition: opacity 0.3s ease; }
.wr__btn[disabled] { opacity: 0.35; cursor: default; }
.wr__clip--btn { height: 18px; line-height: 18px; font-size: 13.500px; font-weight: 720; color: #14161c; }
.wr__btn:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f2ede4; stroke: #0a0b0e; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }

@media (max-width: 350px) { .wr { padding: 14px 12px; } .wr__btn { width: 94px; } .wr__clip--btn { font-size: 13px; } }
@media (max-height: 400px) { .wr { gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .wr__pill, .wr__pill .wr__clip, .wr__run, .wr__btn { transition: none; } }
