/* /reactor's own: the hero's pill, the demo that replays Reactor's interface, and the sections under
   it. What it shares with /reactor/mission is /reactor.css. */

/* A button that jumps down the page glides there, unless the reader asked for less motion. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; color: var(--g-action-text); background: var(--g-action-dim); border: 1px solid var(--g-action-line);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--g-action); animation: rx-pulse 1.6s ease-in-out infinite; }
@keyframes rx-pulse { 50% { opacity: 0.35; } }
.rhero .fine { margin-top: 14px; }

/* The demo is .wrap wide, the text column's width. Its eleven tabs share one row; the slides draw
   into the stage at 1062 by 600 and are scaled down, never laid out again, where it is narrower. */
.wide { margin-top: 48px; scroll-margin-top: 48px; }
.demo { border: 1px solid var(--g-line-2); border-radius: 18px; background: var(--g-panel); overflow: hidden; box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.8); }
.demo-tabs { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); overflow: hidden; border-bottom: 1px solid var(--g-line); scrollbar-width: none; }
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tabs button {
  position: relative; min-width: 0; text-align: left; padding: 12px 12px 14px; border: 0; border-right: 1px solid var(--g-line);
  background: none; cursor: pointer; color: var(--g-dim); font: 500 13px/1.35 var(--g-sans);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo-tabs button:last-child { border-right: 0; }
.demo-tabs button b { display: block; font-family: var(--g-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--g-dim); margin-bottom: 5px; font-weight: 500; }
.demo-tabs button[aria-selected="true"] { color: var(--g-text); background: var(--g-wash); }
.demo-tabs button[aria-selected="true"] b { color: var(--g-action-text); }
.demo-tabs button .bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--g-action); transform: scaleX(0); transform-origin: 0 50%; }
.demo-stage { position: relative; aspect-ratio: 1062 / 600; overflow: hidden; background: var(--g-sunken); }
.demo-stage > .ui { position: absolute; top: 0; left: 0; width: 1062px; height: 600px; transform-origin: 0 0; }
.demo-ctrl { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--g-line); font-size: 12px; color: var(--g-dim); }
.demo-ctrl button { width: 30px; height: 28px; display: grid; place-items: center; border: 1px solid var(--g-line-2); border-radius: 8px; background: var(--g-wash); color: var(--g-text-2); cursor: pointer; }
.demo-ctrl svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.demo-ctrl .grow { flex: 1; }
.demo-caption { color: var(--g-text-2); font-size: 13px; }
/* Under 960px eleven equal columns would cut "Supervisor" short. The tabs keep their one row at their
   own widths, and the row scrolls sideways to the slide that is playing. */
@media (max-width: 959px) {
  .demo-tabs { display: flex; overflow-x: auto; }
  .demo-tabs button { flex: none; }
}

/* How it works */
.flow { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.flow > div { position: relative; padding: 22px 20px 24px; border-radius: 14px; background: var(--g-panel); border: 1px solid var(--g-line); }
.flow > div::after { content: ""; position: absolute; top: 34px; right: -14px; width: 14px; height: 1px; background: var(--g-line-2); }
.flow > div:last-child::after { display: none; }
.flow .n { font: 500 11px var(--g-mono); color: var(--g-action-text); letter-spacing: 0.1em; }
.flow h3 { margin: 12px 0 0; font-size: 17px; color: var(--g-text); letter-spacing: -0.01em; }
.flow p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--g-muted); }

/* MCP native */
.mcp { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mcp > div { padding: 22px; border-radius: 14px; border: 1px solid var(--g-line); background: var(--g-panel); }
.mcp .dir { font: 500 11px var(--g-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-action-text); }
.mcp h3 { margin: 10px 0 0; color: var(--g-text); font-size: 17px; letter-spacing: -0.01em; }
.mcp p { margin: 8px 0 0; color: var(--g-muted); font-size: 14px; line-height: 1.6; }
.mcp pre { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--g-sunken); border: 1px solid var(--g-line); font: 11.5px/1.6 var(--g-mono); color: var(--g-text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.mcp pre b { color: var(--g-action-text); font-weight: 500; }

/* Where runs happen */
.places { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.places > div { padding: 22px; border-radius: 14px; border: 1px solid var(--g-line); background: var(--g-panel); }
.places h4 { margin: 0; color: var(--g-text); font-size: 16px; }
.places .tag { display: inline-block; margin-top: 8px; font: 500 10.5px var(--g-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-action-text); }
.places p { margin: 10px 0 0; color: var(--g-muted); font-size: 14px; line-height: 1.6; }
.store { margin-top: 18px; padding: 14px 18px; border-radius: 12px; border: 1px dashed var(--g-line-2); color: var(--g-muted); font-size: 14px; line-height: 1.6; }

@media (max-width: 900px) {
  .flow, .places { grid-template-columns: 1fr 1fr; }
  .mcp { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .flow, .places { grid-template-columns: 1fr; }
  .flow > div::after { display: none; }
}

/* Reactor's own interface, as the slides draw it: copied from Reactor's CSS modules so a slide looks
   like the product, under .ui so none of it reaches the page. Its keyframes are ui-*, for the same reason. */
.ui {
  --canvas-unit: 14px;
  --canvas-column: 300px;
  --canvas-wire: 14px;
  --g-warn: #ffc857;
  --g-warn-text: #ffd98a;
  --g-warn-dim: rgba(255, 200, 87, 0.12);
  --g-danger: #f0617a;
  --g-radius-pill: 999px;
  --g-radius-tile: 6px;
  overflow: hidden;
  background: #12161c;
  font-family: var(--g-sans);
  color: var(--g-text-2);
  line-height: 1.4;
}
.ui-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(79, 201, 240, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 201, 240, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(240, 243, 247, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 243, 247, 0.035) 1px, transparent 1px);
  background-size: calc(112px * var(--z, 1)) calc(112px * var(--z, 1)), calc(112px * var(--z, 1)) calc(112px * var(--z, 1)), calc(14px * var(--z, 1)) calc(14px * var(--z, 1)), calc(14px * var(--z, 1)) calc(14px * var(--z, 1));
}
.ui-grid::after { content: ""; position: absolute; inset: 0; background: radial-gradient(118% 88% at 50% 42%, transparent 38%, rgba(10, 13, 18, 0.72) 100%); }
.ui-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
@keyframes ui-blink { 50% { opacity: 0.35; } }
@keyframes ui-rise { from { opacity: 0; transform: translateY(-6px); } }
@keyframes ui-drop { from { opacity: 0; transform: translateY(-14px) scale(0.96); } }
@keyframes ui-glow {
  0%, 100% { border-color: rgba(61, 220, 151, 0.3); box-shadow: 0 0 0 0 rgba(61, 220, 151, 0), 0 14px 32px rgba(0, 0, 0, 0.45); }
  50% { border-color: rgba(61, 220, 151, 0.7); box-shadow: 0 0 0 5px rgba(61, 220, 151, 0.12), 0 0 30px -4px rgba(61, 220, 151, 0.45), 0 14px 32px rgba(0, 0, 0, 0.45); }
}

/* HUD */
.hud {
  position: absolute; top: 14px; left: 16px; z-index: 5; display: flex; align-items: center; gap: 14px;
  padding: 9px 14px; border-radius: 12px; border: 1px solid var(--g-line-2); background: var(--g-head);
  backdrop-filter: blur(14px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); font-size: 13px;
}
.hud b { color: var(--g-text); font-weight: 650; display: inline-flex; align-items: center; gap: 6px; }
.hud b svg { width: 12px; height: 12px; stroke: var(--g-dim); fill: none; stroke-width: 1.8; }
.hud .going { display: inline-flex; align-items: center; gap: 7px; font: 500 12px var(--g-mono); color: var(--g-dim); }
.hud .going i { width: 7px; height: 7px; border-radius: 50%; background: var(--g-dim); }
.hud .going[data-on] { color: var(--g-live-text); }
.hud .going[data-on] i { background: var(--g-live); box-shadow: 0 0 8px var(--g-live); animation: ui-blink 1.2s ease-in-out infinite; }
.hud .spend { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--g-line-2); font: 500 12px var(--g-mono); color: var(--g-text-2); font-variant-numeric: tabular-nums; }
.hud .spend em { font-style: normal; color: var(--g-dim); }
.hud .spark { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.hud .spark i { width: 3px; border-radius: 1px; background: var(--g-action); }

/* Zoom corner */
.zoomc { position: absolute; right: 14px; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; border: 1px solid var(--g-line-2); background: var(--g-head); font: 11px var(--g-mono); color: var(--g-muted); }
.zoomc span { width: 26px; height: 24px; display: grid; place-items: center; color: var(--g-text-2); }
.zoomc output { min-width: 40px; text-align: center; }

/* A pair: trigger, wire, agent. The trigger and its agent are one height, so a pair reads as one row. */
.pair { display: flex; align-items: center; }
.ui .pair { transition: opacity 0.25s ease; }
.wire2 { width: 28px; height: 1px; background: linear-gradient(to right, var(--g-action-line), rgba(61, 220, 151, 0.45)); }
.pairs { display: grid; grid-template-columns: repeat(2, 628px); column-gap: 84px; row-gap: 42px; }

.trg {
  position: relative; box-sizing: border-box; display: flex; flex-direction: column; width: 300px; height: 160px;
  border-radius: 12px; border: 1px solid var(--g-action-line);
  background: linear-gradient(168deg, rgba(139, 108, 255, 0.1) 0%, rgba(40, 47, 58, 0.62) 44%, rgba(31, 37, 46, 0.68) 100%);
  box-shadow: 0 0 0 1px rgba(139, 108, 255, 0.1), 0 0 26px -8px rgba(139, 108, 255, 0.45), 0 12px 28px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease;
}
.trg.agent { border-color: rgba(79, 201, 240, 0.42); background: linear-gradient(168deg, rgba(79, 201, 240, 0.1) 0%, rgba(40, 47, 58, 0.62) 44%, rgba(31, 37, 46, 0.68) 100%); box-shadow: 0 0 0 1px rgba(79, 201, 240, 0.1), 0 0 26px -8px rgba(79, 201, 240, 0.45), 0 12px 28px rgba(0, 0, 0, 0.42); }
.trg.events { border-color: rgba(252, 109, 38, 0.42); background: linear-gradient(168deg, rgba(252, 109, 38, 0.1) 0%, rgba(40, 47, 58, 0.62) 44%, rgba(31, 37, 46, 0.68) 100%); box-shadow: 0 0 0 1px rgba(252, 109, 38, 0.1), 0 0 26px -8px rgba(252, 109, 38, 0.45), 0 12px 28px rgba(0, 0, 0, 0.42); }
.trg[data-fire] { box-shadow: 0 0 0 4px rgba(139, 108, 255, 0.22), 0 0 40px -6px rgba(139, 108, 255, 0.8), 0 12px 28px rgba(0, 0, 0, 0.42); }
.trg.events[data-fire] { box-shadow: 0 0 0 4px rgba(252, 109, 38, 0.2), 0 0 40px -6px rgba(252, 109, 38, 0.8), 0 12px 28px rgba(0, 0, 0, 0.42); }
.trg.agent[data-fire] { box-shadow: 0 0 0 4px rgba(79, 201, 240, 0.2), 0 0 40px -6px rgba(79, 201, 240, 0.8), 0 12px 28px rgba(0, 0, 0, 0.42); }
.trg .th { box-sizing: border-box; display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 12px 14px 8px; color: var(--g-action-text); font: 500 10px/1 var(--g-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.trg.agent .th { color: #a6e4fa; }
.trg.events .th { color: #fdb08a; }
.trg .th svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.trg .tp { flex: 1; margin: 0; padding: 0 14px; font-size: 12px; color: var(--g-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.trg .ta { display: flex; justify-content: flex-end; gap: 2px; padding: 6px 10px 6px 14px; }
.trg .ta span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; border: 1px solid transparent; color: var(--g-dim); transition: all 0.2s ease; }
.trg .ta span[data-press] { color: var(--g-live-text); border-color: var(--g-live); background: var(--g-live-dim); transform: scale(0.92); }
.trg .ta svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trg .tf { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-top: 1px solid var(--g-line); border-radius: 0 0 12px 12px; background: rgba(12, 16, 20, 0.34); font: 400 10px/1 var(--g-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-dim); white-space: nowrap; }
.trg .tf i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--g-dim); flex: none; }
.trg .tf i.ok { background: var(--g-live); border-color: var(--g-live); }

.agt {
  --tint: var(--g-dim);
  position: relative; box-sizing: border-box; display: grid; grid-template-rows: auto 1fr auto; width: 300px; height: 160px; border-radius: 12px;
  border: 1px solid var(--g-line-2); background: linear-gradient(180deg, #232a35, #1c2129);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.agt::before { content: ""; position: absolute; left: -5px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; background: var(--g-live); border: 2px solid #12161c; z-index: 3; }
.agt.ok { --tint: var(--g-live); }
.agt.live { --tint: var(--g-live); animation: ui-glow 2.4s ease-in-out infinite; }
.agt .ah { display: flex; align-items: center; gap: 10px; padding: 11px 46px 11px 12px; border-bottom: 1px solid var(--g-line); border-radius: 12px 12px 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 14%, transparent), transparent 72%); transition: background 0.4s ease; }
.agt .ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--g-action-dim); color: var(--g-action-text); }
.agt .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.agt .nm { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; color: var(--g-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agt .sp { display: flex; align-items: center; gap: 8px; margin-top: 5px; font: 11px var(--g-mono); color: var(--g-dim); white-space: nowrap; }
.agt .sp b { font: 500 11px var(--g-sans); color: var(--g-text-2); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--g-line-2); }
.agt .rb { position: absolute; top: 14px; right: 12px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--g-line-2); background: rgba(18, 22, 28, 0.6); color: var(--g-muted); }
.agt .rb svg { width: 10px; height: 10px; fill: currentColor; }
.agt .sm { padding: 10px 12px 0; min-height: calc(2 * 1.4em + 10px); font-size: 12px; color: var(--g-text-2); overflow: hidden; }
.agt .sm.quiet { color: var(--g-dim); }
.agt .af { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 41px; padding: 10px 12px 11px; font: 11px var(--g-mono); color: var(--g-dim); }
.agt .st { display: inline-flex; align-items: center; gap: 6px; --state: var(--g-muted); }
.agt .st i { width: 7px; height: 7px; border-radius: 50%; background: var(--state); }
.agt .st span { color: var(--state); }
.agt .st.going, .agt .st.good { --state: var(--g-live); }
.agt .st.going i { animation: ui-blink 1s ease-in-out infinite; }
.agt[data-new] { animation: ui-drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }

/* Group box */
.gbox { --group: #4fc9f0; box-sizing: border-box; padding: 12px 14px 14px; border: 1px solid var(--group); border-radius: 16px; background: color-mix(in srgb, var(--group) 8%, rgba(18, 22, 28, 0.5)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--group) 7%, transparent); transition: box-shadow 0.14s ease, opacity 0.25s ease; }
.gbox.amber { --group: #ffc857; }
.gbox.violet { --group: #8b6cff; }
.gbox[data-over] { box-shadow: 0 0 0 5px color-mix(in srgb, var(--group) 20%, transparent); }
.gbox .gh { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; margin-bottom: 14px; }
.gbox .gh i { width: 8px; height: 8px; border-radius: 50%; background: var(--group); }
.gbox .gh b { color: var(--g-text); font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.gbox .gh span.more { color: var(--g-dim); font-size: 14px; letter-spacing: 1px; }
.gbox .gh p { grid-column: 2 / 4; margin: 2px 0 0; color: var(--g-muted); font-size: 13px; }
.gstack { display: grid; gap: 28px; }

/* Run dialog */
.rd { position: absolute; z-index: 6; width: 680px; border-radius: 14px; border: 1px solid var(--g-line-2); background: #1d232c; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.85); overflow: hidden; }
.rd .rh { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--g-line-2); }
.rd .rh b { color: var(--g-text); font-size: 15px; font-weight: 650; }
.rd .rh .meta { margin-left: auto; font-size: 12px; color: var(--g-dim); font-variant-numeric: tabular-nums; }
.rd .badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--g-live-dim); color: var(--g-live-text); font: 500 11px var(--g-mono); letter-spacing: 0.06em; }
.rd .badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--g-live); animation: ui-blink 1s ease-in-out infinite; }
.rd .badge.done { background: var(--g-wash); color: var(--g-muted); }
.rd .badge.done i { background: var(--g-live); animation: none; }
.rd .x { color: var(--g-dim); font-size: 16px; }
.rd .sec { padding: 12px 20px; border-bottom: 1px solid var(--g-line-2); margin: 0; }
.rd .lbl { font-size: 12px; color: var(--g-dim); }
.rd .asked { margin-top: 4px; font-size: 13.5px; color: var(--g-text); }
.rd .work { list-style: none; margin: 6px 0 0; padding: 0; position: relative; height: 236px; overflow: hidden; }
.rd.short .work { height: 150px; }
.rd .work li { position: relative; display: grid; grid-template-columns: 18px 1fr auto 12px; gap: 8px; align-items: center; padding: 6px 0; font: 12px var(--g-mono); color: var(--g-text-2); animation: ui-rise 0.3s ease both; }
.rd .work li::before { content: ""; position: absolute; left: 3px; top: 22px; bottom: -8px; width: 1px; background: var(--g-line-2); }
.rd .work li:last-child::before { display: none; }
.rd .work li > i { width: 7px; height: 7px; border-radius: 50%; background: var(--g-muted); }
.rd .work li.now > i { background: var(--g-live); }
.rd .work li.think > i { background: none; border: 1px solid var(--g-dim); }
.rd .work li.say { font: 12.5px var(--g-sans); color: var(--g-text-2); }
.rd .work li.say > i { visibility: hidden; }
.rd .work li.msg { font: 12.5px var(--g-sans); color: var(--g-text); background: var(--g-action-dim); border: 1px solid var(--g-action-line); border-radius: 8px; padding: 7px 8px; }
.rd .work li.msg > i { background: var(--g-action); }
.rd .work li.msg b { color: var(--g-action-text); font: 500 11px var(--g-mono); margin-right: 8px; }
.rd .work b { color: var(--g-text); font-weight: 500; margin-right: 8px; }
.rd .work span.arg { color: var(--g-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd .work em { font-style: normal; color: var(--g-dim); font-variant-numeric: tabular-nums; }
.rd .work li.now em { color: var(--g-live-text); }
.rd .work .chev { color: var(--g-dim); font-size: 11px; }
.rd .rf { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 12px 20px; font-size: 12.5px; color: var(--g-muted); }
.rd .rf span.btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--g-line-2); color: var(--g-text-2); }

/* Terminal (Claude Code) */
.term2 { position: absolute; z-index: 6; width: 470px; border-radius: 12px; border: 1px solid var(--g-line-2); background: #0d1014; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.85); font: 12px/1.55 var(--g-mono); color: var(--g-text-2); overflow: hidden; }
.term2 .tb { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--g-line); color: var(--g-dim); font-size: 11px; }
.term2 .tb i { width: 10px; height: 10px; border-radius: 50%; background: #3a4150; }
.term2 .tb span { margin-left: 8px; }
.term2 .tbody { padding: 14px 16px 18px; min-height: 300px; }
.term2 .you { color: var(--g-text); }
.term2 .you::before { content: "> "; color: var(--g-action-text); }
.term2 .caret { display: inline-block; width: 7px; height: 14px; margin-left: 1px; vertical-align: -2px; background: var(--g-text-2); animation: ui-blink 1s steps(1) infinite; }
.term2 .tool { margin-top: 10px; animation: ui-rise 0.25s ease both; }
.term2 .tool b { color: var(--g-live-text); font-weight: 500; }
.term2 .tool b::before { content: "● "; color: var(--g-live); }
.term2 .tool .out { color: var(--g-dim); padding-left: 14px; }
.term2 .say { margin-top: 6px; color: var(--g-text-2); font-family: var(--g-sans); font-size: 13px; animation: ui-rise 0.25s ease both; }
.term2.mini { width: 360px; transition: opacity 0.3s ease; }
.term2.mini .tbody { min-height: 0; padding: 10px 14px 14px; }

/* Version history (supervisor) */
.hist { position: absolute; z-index: 6; width: 470px; border-radius: 14px; border: 1px solid var(--g-line-2); background: #1d232c; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.85); overflow: hidden; }
.hist .hh { padding: 14px 18px; border-bottom: 1px solid var(--g-line-2); display: flex; align-items: center; gap: 10px; color: var(--g-text); font-weight: 650; font-size: 14px; }
.hist .hh small { margin-left: auto; font: 11px var(--g-mono); color: var(--g-dim); font-weight: 400; }
.hist ol { list-style: none; margin: 0; padding: 8px 10px 10px; display: grid; gap: 4px; }
.hist li { padding: 10px 10px; border-radius: 10px; font-size: 12.5px; animation: ui-rise 0.3s ease both; }
.hist li.new { background: var(--g-action-dim); border: 1px solid var(--g-action-line); }
.hist li .who { display: flex; gap: 8px; align-items: center; color: var(--g-text); font-weight: 600; }
.hist li .who em { font-style: normal; font: 500 10px var(--g-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: var(--g-live-dim); color: var(--g-live-text); }
.hist li .who small { margin-left: auto; font: 11px var(--g-mono); color: var(--g-dim); font-weight: 400; }
.hist li p { margin: 5px 0 0; color: var(--g-muted); line-height: 1.5; }
.hist li code { font: 11.5px var(--g-mono); color: var(--g-text-2); }
.hist li del { color: var(--g-dim); }
.hist li ins { text-decoration: none; color: var(--g-live-text); }

/* An event arriving by webhook */
.evt { position: absolute; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #2a1d16; border: 1px solid rgba(252, 109, 38, 0.5); color: #fdb08a; font: 11.5px var(--g-mono); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.8); transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.4s ease; }
.evt b { color: var(--g-text); font-weight: 500; }
.evt.match { border-color: var(--g-live); color: var(--g-live-text); background: #142a20; }

/* Pointer, ghost, drop */
.cur { position: absolute; z-index: 9; width: 22px; height: 22px; margin: -3px 0 0 -4px; fill: #fff; stroke: #12161c; stroke-width: 1.4; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6)); transition: left 1s cubic-bezier(0.3, 0.7, 0.2, 1), top 1s cubic-bezier(0.3, 0.7, 0.2, 1), transform 0.12s ease; }
.cur[data-down] { transform: scale(0.82); }
.ghost { box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--g-action) !important; }
.toast { position: absolute; z-index: 9; left: 50%; bottom: 64px; transform: translateX(-50%); padding: 9px 14px; border-radius: 10px; background: var(--g-raise); border: 1px solid var(--g-line-2); color: var(--g-text); font-size: 13px; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.8); animation: ui-rise 0.3s ease both; }

/* A deck of triggers that fans out, and everything it is not in steps back */
.deck { position: relative; width: 300px; height: 160px; flex: none; }
.deck .card-in { position: absolute; inset: 0; transition: transform 0.35s cubic-bezier(0.3, 0.8, 0.2, 1), filter 0.35s ease; }
.deck .card-in[data-i="0"] { z-index: 3; }
.deck .card-in[data-i="1"] { z-index: 2; transform: translate(0, 8px) scale(0.965); filter: brightness(0.7); }
.deck .card-in[data-i="2"] { z-index: 1; transform: translate(0, 16px) scale(0.93); filter: brightness(0.5); }
.deck[data-fanned] .card-in { filter: none; }
.deck[data-fanned] .card-in[data-i="1"] { transform: translate(0, 174px); }
.deck[data-fanned] .card-in[data-i="2"] { transform: translate(0, 348px); }
.deck[data-fanned] .trg { background-color: #1f252e; }
.deckcount { position: absolute; z-index: 4; top: 10px; right: 12px; padding: 2px 7px; border-radius: 999px; background: rgba(139, 108, 255, 0.18); color: var(--g-action-text); font: 500 10px/1.4 var(--g-mono); }
.fanned-pair { position: relative; z-index: 2; }
.ui[data-fanning] .fadeable { opacity: 0.28; }
.ui[data-fanning] .deckhost .pair:not(.fanned-pair) { opacity: 0.28; }

/* Slack thread */
.slackwin { position: absolute; z-index: 6; width: 430px; border-radius: 12px; background: #1a1d21; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.85); font: 13.5px/1.45 var(--g-sans); color: #d1d2d3; overflow: hidden; }
.slackwin .sh { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-weight: 700; color: #fff; }
.slackwin .sh small { margin-left: 8px; font-weight: 400; color: #8e9297; }
.slackwin .sb { padding: 8px 16px; display: grid; gap: 12px; min-height: 250px; align-content: start; }
.sm2 { display: grid; grid-template-columns: 34px 1fr; gap: 10px; animation: ui-rise 0.3s ease both; }
.sm2 > i { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; background: #2c2650; color: var(--g-action-text); }
.sm2 > i.me { background: #1f4d3a; color: var(--g-live-text); }
.sm2 b { color: #fff; font-weight: 700; }
.sm2 b em { font-style: normal; font-size: 9.5px; padding: 1px 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); color: #b9bbbe; margin-left: 4px; font-weight: 600; }
.sm2 b small { font-weight: 400; color: #8e9297; margin-left: 6px; font-size: 11.5px; }
.sm2 p { margin: 2px 0 0; }
.sm2 code { font: 12px var(--g-mono); color: #e8912d; background: rgba(255, 255, 255, 0.06); padding: 0 4px; border-radius: 3px; }
.slackwin .sin { margin: 4px 12px 12px; padding: 10px 12px; min-height: 40px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; }
.slackwin .caret { display: inline-block; width: 1.5px; height: 15px; vertical-align: -3px; background: #fff; animation: ui-blink 1s steps(1) infinite; }

/* Memory panel */
.memwin { position: absolute; z-index: 6; width: 500px; border-radius: 14px; border: 1px solid var(--g-line-2); background: #1d232c; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.85); overflow: hidden; }
.memwin .hh { padding: 14px 18px; border-bottom: 1px solid var(--g-line-2); display: flex; align-items: center; color: var(--g-text); font-weight: 650; font-size: 14px; }
.memwin .hh small { margin-left: auto; font: 11px var(--g-mono); color: var(--g-dim); font-weight: 400; }
.memwin .mb { display: grid; grid-template-columns: 140px 1fr; min-height: 190px; }
.memwin ul { list-style: none; margin: 0; padding: 10px 8px; border-right: 1px solid var(--g-line); font: 11.5px var(--g-mono); color: var(--g-muted); display: grid; gap: 2px; align-content: start; }
.memwin li { padding: 6px 8px; border-radius: 6px; }
.memwin li[data-on] { background: var(--g-action-dim); color: var(--g-action-text); }
.memwin pre { margin: 0; padding: 12px 14px; font: 11.5px/1.65 var(--g-mono); color: var(--g-text-2); white-space: pre-wrap; }
.memwin pre ins { display: block; text-decoration: none; color: var(--g-live-text); background: var(--g-live-dim); border-radius: 4px; padding: 0 4px; margin: 0 -4px; animation: ui-rise 0.3s ease both; }

/* A paused slide holds still, its glows and blinks included. Asked for less motion, the demo starts
   paused (src/js/reactor-slides.js), and nothing in it blinks, glows or slides; each change simply lands. */
.demo-stage[data-held] * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .pill i, .demo-stage * { animation: none !important; transition: none !important; }
}
