/* Demo-only additions on top of the real Refresh stylesheet. Tokens only. */

/* Stage bar segments grow from their last width when counts change. */
.stage-bar__seg { transition: flex-grow var(--pt-dur-deliberate) var(--pt-ease-paper), opacity var(--pt-dur-instant); min-width: 0; }
.stage-bar--empty { background: var(--surface-muted); }

/* A field the agent just wrote: it arrives on a flame wash, holds, then settles back to the surface. */
.inspector-row.is-fresh .v,
.hero-meta__item.is-fresh .hero-meta__v {
    border-radius: var(--pt-radius-xs);
    animation: fresh-in var(--pt-dur-slow) var(--pt-ease-paper), fresh-out var(--pt-dur-deliberate) var(--pt-ease-settle) backwards;
    animation-delay: 0s, 1600ms;
}
@keyframes fresh-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fresh-out {
    from { background: var(--pt-rocket-flame-20); }
    to { background: transparent; }
}

/* New table rows slide in under the row-flash wash the real table already has. */
tr.row-enter > td { animation: row-flash var(--pt-dur-deliberate) var(--pt-ease-paper), row-enter var(--pt-dur-slow) var(--pt-ease-paper) both; animation-delay: 0s, calc(var(--i, 0) * 80ms); }
@keyframes row-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Agent activity: the MCP calls landing on this role, newest first. */
.agent-log { display: flex; flex-direction: column; }
.agent-log__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--pt-space-1) var(--pt-space-3); padding: var(--pt-space-3) 0; border-bottom: 1px solid var(--pt-border); }
.agent-log__row:first-child { padding-top: 0; }
.agent-log__row:last-child { padding-bottom: 0; border-bottom: 0; }
.agent-log__row.is-fresh { animation: row-enter var(--pt-dur-slow) var(--pt-ease-paper) both; }
.agent-log__what { font-size: var(--pt-text-sm); line-height: var(--pt-leading-sm); font-weight: var(--pt-weight-value); }
.agent-log__when { font-size: var(--pt-text-xs); line-height: var(--pt-leading-sm); color: var(--pt-fg-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.agent-log__tool { grid-column: 1 / -1; font-family: var(--pt-font-mono); font-size: var(--pt-text-xs); line-height: var(--pt-leading-xs); color: var(--pt-fg-muted); }
.agent-log__empty { font-size: var(--pt-text-sm); line-height: var(--pt-leading-sm); color: var(--pt-fg-muted); }
.side-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--pt-space-2); margin-bottom: var(--pt-space-2); }
.side-card__head .inspector-label { margin-bottom: 0; }

/* The list's source tag for a role an agent opened. */
.tag--agent { background: var(--pt-rocket-flame-20); color: var(--pt-ink-on-flame-20); display: inline-flex; align-items: center; gap: var(--pt-space-1); }

.inspector-row .v .tag-row { justify-content: flex-end; }
.empty-state .btn-secondary { margin-top: var(--pt-space-2); }

/* Demo dock: the presenter's clock. Not part of Mission Control; ?clean=1 hides it and the shortcuts still work. */
.demo-dock {
    position: fixed; right: var(--pt-space-4); bottom: var(--pt-space-4); z-index: 40;
    display: flex; align-items: center; gap: var(--pt-space-2);
    padding: var(--pt-space-2); padding-left: var(--pt-space-4);
    background: var(--pt-surface); border: 1px solid var(--pt-fg); border-radius: var(--pt-radius-pill);
    font-size: var(--pt-text-sm); line-height: var(--pt-leading-sm);
}
.demo-dock[hidden] { display: none; }
/* Collapsed to the day counter until the presenter reaches for it. */
.demo-dock > button { display: none; }
.demo-dock:hover > button, .demo-dock:focus-within > button { display: inline-flex; }
.demo-dock:not(:hover):not(:focus-within) { padding: var(--pt-space-2) var(--pt-space-4); }
.demo-dock:not(:hover):not(:focus-within) .demo-dock__state { margin-right: 0; }
.demo-dock__state { display: inline-flex; align-items: center; gap: var(--pt-space-2); font-weight: var(--pt-weight-strong); font-variant-numeric: tabular-nums; margin-right: var(--pt-space-2); }
.demo-dock__dot { width: 8px; height: 8px; border-radius: var(--pt-radius-pill); background: var(--pt-fg-muted); }
.demo-dock__dot.is-live { background: var(--pt-galactic-seafoam); }

@media (prefers-reduced-motion: reduce) {
    .stage-bar__seg { transition: none; }
    .inspector-row.is-fresh .v, .hero-meta__item.is-fresh .hero-meta__v, tr.row-enter > td, .agent-log__row.is-fresh { animation: none; }
}

.data-table .col-updated { white-space: nowrap; }
