/* ══════════════════════════════════════════════════════
   INCIDENT PLAYBACK — scripted demo
   swe-worker-012 mass-delete → Shield → HITL → Quarantine → Ledger
   ══════════════════════════════════════════════════════ */

/* launcher button */
.pb-launch {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  background: var(--t1);
  color: var(--bg);
  border: 1.5px solid var(--t1);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--lift);
  border-radius: var(--r-c);
  transition: transform .15s, background .15s;
}
.pb-launch:hover {
  background: var(--t2);
  border-color: var(--t2);
  transform: translateY(-1px);
}
.pb-launch .tri {
  display: inline-block;
  width: 0; height: 0;
  border-left: 9px solid var(--bg);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.pb-launch .ttl { letter-spacing: 0.18em; }
.pb-launch .sub {
  font-size: 9px;
  opacity: 0.7;
  letter-spacing: 0.2em;
  display: block;
  margin-top: 2px;
  font-weight: 500;
}
.pb-launch .lab { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }

body.pb-running .pb-launch { display: none; }

/* HUD — top-center stepper */
.pb-hud {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  min-width: 520px;
  max-width: 640px;
  background: var(--bg);
  border: 1px solid var(--b2);
  border-radius: var(--r);
  overflow: hidden;
  pointer-events: auto;
}
.pb-hud .head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 14px;
  background: var(--s3);
  color: var(--t1);
  border-bottom: 1px solid var(--b2);
}
.pb-hud .tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--fail);
}
.pb-hud .title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2px;
  line-height: 1.1;
}
.pb-hud .close {
  background: transparent;
  border: 1px solid var(--b2);
  color: var(--t2);
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 8px;
  cursor: pointer;
  letter-spacing: 0.15em;
  border-radius: var(--r-c);
}
.pb-hud .close:hover { background: var(--t1); color: var(--bg); border-color: var(--t1); }

.pb-hud .steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--b1);
}
.pb-hud .step {
  padding: 10px 8px 8px;
  text-align: center;
  border-right: 1px solid var(--b1);
  position: relative;
}
.pb-hud .step:last-child { border-right: 0; }
.pb-hud .step .n {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--t3);
}
.pb-hud .step .lbl {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t3);
  margin-top: 3px;
  line-height: 1.15;
}
.pb-hud .step.done .n { color: var(--t2); }
.pb-hud .step.done .lbl { color: var(--t2); }
.pb-hud .step.active {
  background: var(--s3);
}
.pb-hud .step.active .n { color: var(--t1); }
.pb-hud .step.active .lbl { color: var(--t1); font-weight: 600; }
.pb-hud .step.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--t1);
  box-shadow: var(--glow);
}

.pb-hud .caption {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t1);
  line-height: 1.5;
  min-height: 40px;
}
.pb-hud .caption .who {
  color: var(--t1);
  font-weight: 700;
}
.pb-hud .caption .danger {
  color: var(--fail);
  font-weight: 700;
}
.pb-hud .caption .cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--t1);
  margin-left: 2px;
  vertical-align: -1px;
  animation: pb-blink 0.8s step-end infinite;
}
@keyframes pb-blink { 50% { opacity: 0; } }

.pb-hud .bar {
  position: relative;
  height: 3px;
  background: var(--b2);
}
.pb-hud .bar .fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--t1);
  transition: width 0.3s linear;
}

.pb-hud .controls {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--b1);
  background: var(--s2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--t3);
  justify-content: space-between;
  align-items: center;
}
.pb-hud .controls .hint kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--b2);
  background: var(--bg);
  color: var(--t1);
  font-family: var(--mono);
  font-size: 9px;
  margin: 0 2px;
  border-radius: var(--r-chip);
}
.pb-hud .controls .btns { display: flex; gap: 6px; }
.pb-hud .controls button {
  background: transparent;
  border: 1px solid var(--b2);
  color: var(--t1);
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 10px;
  letter-spacing: 0.15em;
  cursor: pointer;
  text-transform: uppercase;
  border-radius: var(--r-c);
}
.pb-hud .controls button:hover { background: var(--t1); color: var(--bg); border-color: var(--t1); }
.pb-hud .controls button.pause { min-width: 68px; }

/* actor-focus outline — used on various DOM elements the script highlights */
.pb-focus {
  position: relative;
  outline: 2px solid var(--t1) !important;
  outline-offset: 2px;
  transition: outline-color .2s;
  z-index: 5;
}
.pb-focus::before {
  content: attr(data-pb-label);
  position: absolute;
  top: -22px;
  left: -2px;
  background: var(--t1);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 3px 7px;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 6;
  border-radius: var(--r-chip);
}

/* dim everything else when playing, with a focus cutout */
body.pb-running .screen {
  transition: filter .2s;
}

/* toast appearing for tom-approve etc. */
.pb-toast {
  position: fixed;
  right: 18px;
  bottom: 70px;
  z-index: 88;
  background: var(--bg);
  border: 1px solid var(--b3);
  border-radius: var(--r-c);
  padding: 12px 16px;
  max-width: 320px;
  animation: pb-slide 0.25s ease-out;
}
.pb-toast .ttag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--t2);
  font-weight: 700;
  text-transform: uppercase;
}
.pb-toast .tmsg {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-top: 4px;
  color: var(--t1);
  line-height: 1.2;
}
.pb-toast .tsub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--t3);
  margin-top: 3px;
  letter-spacing: 0.08em;
}
@keyframes pb-slide {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
