/*
 * The carousel of product scenes in the landing page's intro. Each scene redraws the real task pane
 * (layout, labels and colours from src/theme/theme.ts), simplified. Colours come from the :root
 * block in landing.css; nothing here writes a hex value.
 *
 * Scene rules are scoped to .scene-wrap. The default state is the scene's FINAL frame, which is what
 * shows without JavaScript and with prefers-reduced-motion. scenes.js adds .is-playing to run a
 * scene; elements opt in with data-on / data-off / data-active / data-done / data-press (see
 * scenes.js). Without JavaScript the carousel is a row of slides to swipe.
 */

/* ======================= Infrastructure ======================= */

/*
 * As on voltasoftware.com: the product UI never sits on bare white. Each scene is framed by a soft
 * lavender panel (radius 16, like the website's illustration panels), and the pane on it carries
 * the website's window shadow — small, mostly below, no border.
 */
.scene-wrap {
  position: relative;
  width: 100%;
  max-width: calc(22rem + 2 * var(--scene-frame-pad));
  margin: 0 auto;
  padding: var(--scene-frame-pad);
  background: var(--page-tint);
  border-radius: var(--radius-card);
  /* The cursor's name pill may poke past the pane; never let it widen the page. */
  overflow-x: clip;
  --scene-frame-pad: clamp(12px, 4vw, 24px);
}

.scene-wrap .scene {
  position: relative;
}

/* Elements that replace each other share one grid cell, so nothing jumps while the scene plays. */
.scene-wrap .swap {
  display: inline-grid;
  justify-items: start;
}

.scene-wrap .swap > * {
  grid-area: 1 / 1;
}

.scene-wrap .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--violet-tint-strong);
  border-top-color: var(--violet);
  animation: scene-spin 0.8s linear infinite;
}

@keyframes scene-spin {
  to {
    transform: rotate(360deg);
  }
}

.scene-wrap .press {
  transform: scale(0.94);
}

/* Teammate cursor: the arrow tip is the click point. */
.scene-wrap .cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 22px;
  pointer-events: none;
  z-index: 30;
  transition:
    transform 0.85s cubic-bezier(0.45, 0.05, 0.25, 1),
    opacity 0.3s;
}

.scene-wrap .cursor__arrow {
  display: block;
}

.scene-wrap .cursor__arrow path {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* max-content: the pill hangs from a 20px-wide cursor, so on its left side (right: 4px) the
   browser would shrink it to fit and the name would run past its dark background. */
.scene-wrap .cursor__pill {
  position: absolute;
  left: 14px;
  top: 18px;
  width: max-content;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 2px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.scene-wrap .cursor--left .cursor__pill {
  left: auto;
  right: 4px;
}

/* Over a button at the bottom of the pane, the pill goes above the arrow so it stays on the pane. */
.scene-wrap .cursor--up .cursor__pill {
  top: auto;
  bottom: 18px;
}

.scene-wrap .avatar {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1.5px var(--surface);
}

/* Final frame (default): drop what only exists mid-animation. */
.scene-wrap .scene:not(.is-playing) [data-off] {
  display: none;
}

/* Playing. */
.scene-wrap .is-playing [data-on] {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.scene-wrap .is-playing [data-on].on {
  opacity: 1;
  transform: none;
}

.scene-wrap .is-playing [data-off].off {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0s 0.3s;
}

/* Out of the layout while not shown, so what follows moves into its place. */
.scene-wrap .is-playing .collapse.off,
.scene-wrap .is-playing .collapse[data-on]:not(.on) {
  display: none;
}

/* Typed text: revealed left to right in steps, so it reads as typing in any language. */
.scene-wrap .is-playing .typed[data-on] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s steps(30, end);
}

.scene-wrap .is-playing .typed[data-on].on {
  clip-path: inset(0 0 0 0);
}

/* ======================= The task pane ======================= */

.scene-wrap .pane {
  position: relative;
  height: 33rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--p-ground);
  border-radius: var(--radius-card);
  /* The website's product-window shadow (illustration style tokens). */
  box-shadow: var(--shadow-window);
  font-size: 13px;
  line-height: 1.4;
  color: var(--p-fg1);
  text-align: left;
}

.scene-wrap .p-screens {
  display: grid;
  /* minmax(0, …): a long label must not widen the screen past the pane. */
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.scene-wrap .p-screens > .p-screen {
  grid-area: 1 / 1;
}

.scene-wrap .p-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--p-ground);
}

.scene-wrap .p-screen--plain {
  background: var(--surface);
}

/* Icons */
.scene-wrap .i {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scene-wrap .i--fill {
  fill: currentColor;
  stroke: none;
}

.scene-wrap .i--xs {
  width: 12px;
  height: 12px;
}

.scene-wrap .i--sm {
  width: 14px;
  height: 14px;
}

.scene-wrap .i--ok circle {
  fill: var(--p-success);
  stroke: none;
}

.scene-wrap .i--ok path {
  stroke: var(--surface);
  stroke-width: 2;
}

.scene-wrap .i--pending {
  width: 18px;
  height: 18px;
  color: var(--p-stroke-strong);
}

.scene-wrap .dot {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.scene-wrap .dot--order {
  background: var(--p-dot-order);
}

.scene-wrap .dot--rfq {
  background: var(--p-dot-rfq);
}

.scene-wrap .dot--fulfillment {
  background: var(--p-dot-fulfillment);
}

.scene-wrap .dot--new {
  background: var(--p-dot-new);
}

.scene-wrap .dot--open {
  background: var(--p-dot-open);
}

.scene-wrap .p-muted {
  color: var(--p-fg3);
  font-size: 12px;
}

.scene-wrap .p-strong {
  display: block;
  font-weight: 600;
}

.scene-wrap .p-nowrap {
  white-space: nowrap;
}

/* Header: subject row, then chips */
.scene-wrap .p-head {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: 8px 10px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--p-stroke);
}

.scene-wrap .p-head__row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--p-fg3);
}

.scene-wrap .p-subject {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--p-fg1);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scene-wrap .p-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.scene-wrap .p-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 6px 0 8px;
  border: 1px solid var(--p-stroke-strong);
  border-radius: 4px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    transform 0.15s,
    background 0.15s;
}

.scene-wrap .p-chip .i--xs {
  color: var(--p-fg3);
}

.scene-wrap .p-chip.press {
  background: var(--p-hover);
}

.scene-wrap .p-av {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--surface);
  font-size: 9px;
  font-weight: 600;
}

.scene-wrap .p-av--marco {
  background: var(--p-avatar-marco);
}

.scene-wrap .p-av--anne {
  background: var(--p-avatar-anne);
}

.scene-wrap .p-task .p-av {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

/* Body and cards */
.scene-wrap .p-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.scene-wrap .p-card {
  background: var(--surface);
  border: 1px solid var(--p-stroke);
  border-radius: 8px;
}

.scene-wrap .p-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  background: var(--p-strip);
  border-bottom: 1px solid var(--p-stroke);
  border-radius: 8px 8px 0 0;
  color: var(--p-fg3);
}

.scene-wrap .p-card__head b {
  color: var(--p-fg1);
  font-weight: 600;
}

.scene-wrap .p-card__right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  color: var(--p-fg3);
}

.scene-wrap .p-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
}

.scene-wrap .p-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-wrap .p-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  transition: transform 0.15s;
}

.scene-wrap .p-pill--customer {
  background: var(--p-customer-bg);
  color: var(--p-customer-fg);
  border-color: var(--p-customer-border);
  border-radius: 999px;
}

.scene-wrap .p-pill--neutral {
  background: var(--p-neutral-bg);
  color: var(--p-neutral-fg);
  border-color: var(--p-neutral-border);
}

.scene-wrap .p-pill--amber {
  background: var(--p-amber-bg);
  color: var(--p-amber-fg);
  border-color: var(--p-amber-border);
}

.scene-wrap .p-pill--green {
  background: var(--p-green-bg);
  color: var(--p-green-fg);
  border-color: var(--p-green-border);
}

.scene-wrap .p-pill--draft {
  background: var(--p-draft-bg);
  color: var(--p-draft-fg);
  border-color: var(--p-draft-bg);
  border-radius: 999px;
  font-weight: 500;
}

/* Quotes & Orders card */
.scene-wrap .p-tabs {
  display: flex;
  align-items: stretch;
  gap: 14px;
  min-height: 32px;
  padding: 0 10px;
  background: var(--p-strip);
  border-bottom: 1px solid var(--p-stroke);
  border-radius: 8px 8px 0 0;
  font-size: 12px;
  color: var(--p-fg3);
}

.scene-wrap .p-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
}

.scene-wrap .p-tab.is-on {
  color: var(--p-fg1);
  font-weight: 600;
  border-bottom-color: var(--p-brand);
}

.scene-wrap .p-tab i {
  padding: 0 5px;
  border-radius: 999px;
  background: var(--p-count-bg);
  font-size: 11px;
  font-style: normal;
}

.scene-wrap .p-order {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  transition: background 0.6s;
}

.scene-wrap .p-order.active {
  background: var(--p-ground);
}

.scene-wrap .p-order__main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.scene-wrap .p-order__main small,
.scene-wrap .p-order .i--sm {
  color: var(--p-fg3);
  font-size: 12px;
}

/* Pinned action bar and buttons */
.scene-wrap .p-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border-top: 1px solid var(--p-stroke);
}

.scene-wrap .p-screen > .p-bar {
  margin-top: auto;
}

.scene-wrap .p-bar--end {
  justify-content: flex-end;
}

.scene-wrap .p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    transform 0.15s,
    background 0.15s;
}

.scene-wrap .p-btn--primary {
  background: var(--p-brand);
  color: var(--surface);
}

.scene-wrap .p-btn--primary.press {
  background: var(--p-brand-press);
}

.scene-wrap .p-btn--secondary {
  background: var(--surface);
  color: var(--p-brand-fg);
  border: 1px solid var(--p-stroke-strong);
}

.scene-wrap .p-btn--sm {
  height: 26px;
  padding: 0 10px;
}

.scene-wrap .p-btn.is-disabled {
  background: var(--p-disabled-bg);
  color: var(--p-disabled-fg);
}

.scene-wrap .p-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: var(--p-fg3);
  transition:
    transform 0.15s,
    background 0.15s;
}

.scene-wrap .p-icon-btn--sm {
  width: 24px;
  height: 24px;
}

.scene-wrap .p-icon-btn.press {
  background: var(--p-count-bg);
}

.scene-wrap .p-bar .p-icon-btn {
  margin-left: auto;
}

.scene-wrap .p-bar--end .p-icon-btn {
  margin-left: 0;
}

/* Classification popover */
.scene-wrap .p-pop {
  /* Hangs from the header, under its chips however many rows they wrap to. */
  position: absolute;
  top: calc(100% + 4px);
  left: 10px;
  right: 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--p-shadow-pop);
}

.scene-wrap .p-pop__h {
  font-size: 12px;
  font-weight: 600;
  color: var(--p-fg3);
}

.scene-wrap .p-quote {
  padding-left: 8px;
  border-left: 3px solid var(--p-stroke-strong);
  font-style: italic;
}

.scene-wrap .p-quote::before {
  content: "\201C";
}

.scene-wrap .p-quote::after {
  content: "\201D";
}

.scene-wrap .p-pop hr {
  width: 100%;
  margin: 4px 0;
  border: 0;
  border-top: 1px solid var(--p-stroke);
}

.scene-wrap .p-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scene-wrap .p-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--p-stroke-strong);
  border-radius: 999px;
  font-size: 12px;
}

.scene-wrap .p-cat.is-on {
  border-color: var(--p-brand);
  background: var(--p-ground);
  font-weight: 600;
}

/* Tasks */
.scene-wrap .p-task {
  position: relative;
  padding: 8px 0;
  border-bottom: 1px solid var(--p-stroke);
}

.scene-wrap .p-task__l1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-wrap .p-task__title {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s;
}

.scene-wrap .p-task.done .p-task__title,
.scene-wrap .scene:not(.is-playing) .p-task[data-done] .p-task__title {
  color: var(--p-fg3);
  text-decoration: line-through;
}

.scene-wrap .p-task__l2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.scene-wrap .radio {
  display: inline-block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 1px solid var(--p-fg4);
  border-radius: 50%;
}

.scene-wrap .radio.is-on {
  border: 4px solid var(--p-brand);
}

.scene-wrap .p-add {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
}

.scene-wrap .p-input {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--p-stroke-strong);
  border-bottom: 2px solid var(--p-brand);
  border-radius: 4px;
  background: var(--surface);
}

.scene-wrap .p-ph {
  color: var(--p-fg4);
}

.scene-wrap .p-hint {
  font-size: 12px;
  color: var(--p-fg3);
}

/* Smart Reply */
.scene-wrap .p-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--p-stroke);
}

.scene-wrap .p-topbar b {
  font-size: 14px;
  font-weight: 600;
}

.scene-wrap .p-icon {
  display: inline-flex;
  color: var(--p-fg3);
}

.scene-wrap .p-icon.is-on {
  color: var(--p-brand);
}

.scene-wrap .p-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--p-fg2);
}

.scene-wrap .p-badge {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.scene-wrap .p-badge--amber {
  background: var(--p-amber-bg);
  color: var(--p-amber-fg);
}

.scene-wrap .p-progress-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 8px;
}

.scene-wrap .p-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--p-ground);
  color: var(--p-brand);
}

.scene-wrap .p-progress-head__t {
  flex: 1 1 auto;
  min-width: 0;
}

.scene-wrap .p-progress-head__t b {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.scene-wrap .p-progress-head__t small {
  display: block;
  font-size: 12px;
  color: var(--p-fg3);
}

.scene-wrap .p-meter {
  position: relative;
  height: 3px;
  margin: 0 12px 10px;
  border-radius: 2px;
  background: var(--p-track);
  overflow: hidden;
}

.scene-wrap .p-meter__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 2px;
  background: var(--p-brand);
}

.scene-wrap .p-meter__fill--1 {
  width: 20%;
}

.scene-wrap .p-meter__fill--2 {
  width: 40%;
}

.scene-wrap .p-meter__fill--3 {
  width: 60%;
}

.scene-wrap .p-meter__fill--4 {
  width: 80%;
}

.scene-wrap .p-meter__fill--5 {
  width: 100%;
}

.scene-wrap .p-steps {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px 12px;
}

.scene-wrap .p-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--p-stroke);
  border-radius: 6px;
}

.scene-wrap .p-step__glyph {
  width: 18px;
  height: 18px;
  place-items: center;
}

.scene-wrap .p-step__text {
  flex: 1 1 auto;
  min-width: 0;
}

.scene-wrap .p-step__text b {
  display: block;
  font-weight: 400;
  color: var(--p-fg3);
}

.scene-wrap .p-step.active .p-step__text b,
.scene-wrap .p-step.done .p-step__text b {
  font-weight: 600;
  color: var(--p-fg1);
}

.scene-wrap .p-step__text small,
.scene-wrap .p-step__time {
  display: block;
  font-size: 12px;
  color: var(--p-fg3);
}

.scene-wrap .p-step__time {
  white-space: nowrap;
}

.scene-wrap .p-meta {
  padding: 8px 12px;
  border-bottom: 1px solid var(--p-stroke);
  font-size: 12px;
  line-height: 1.6;
}

.scene-wrap .p-editor {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
}

.scene-wrap .p-quote-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--p-stroke);
  border-radius: 4px;
  background: var(--p-strip);
}

.scene-wrap .p-quote-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--p-fg3);
}

.scene-wrap .p-quote-card__head b {
  flex: 1 1 auto;
  color: var(--p-fg1);
  font-weight: 600;
}

.scene-wrap .p-quote-card__tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scene-wrap .p-right {
  margin-left: auto;
}

.scene-wrap .p-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 12px;
}

.scene-wrap .p-table th {
  padding: 4px;
  border-bottom: 1px solid var(--p-stroke);
  color: var(--p-fg3);
  font-weight: 600;
  text-align: left;
}

.scene-wrap .p-table td {
  padding: 4px;
  border-bottom: 1px solid var(--p-stroke);
}

.scene-wrap .p-table th:not(:first-child),
.scene-wrap .p-table td:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.scene-wrap .p-quote-card__total {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.scene-wrap .p-sig {
  padding: 4px 12px;
  font-size: 12px;
  color: var(--p-fg3);
}

/* Side conversations */
.scene-wrap .p-sc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scene-wrap .p-sc__l1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-wrap .p-sc__l1 b {
  flex: 1 1 auto;
  font-weight: 600;
}

.scene-wrap .p-sc__sub,
.scene-wrap .p-sc__meta {
  font-size: 12px;
  color: var(--p-fg3);
}

.scene-wrap .p-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px;
  padding: 10px;
}

.scene-wrap .p-label {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--p-fg2);
}

.scene-wrap .p-input--tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.scene-wrap .p-input--area {
  min-height: 64px;
}

.scene-wrap .p-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--p-hover);
  font-size: 12px;
}

.scene-wrap .p-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
}

.scene-wrap .p-radios > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.scene-wrap .p-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 8px 0;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.scene-wrap .p-banner--ok {
  background: var(--p-success-bg);
  border: 1px solid var(--p-success-border);
  color: var(--p-success-fg);
}

/* ======================= Carousel ======================= */

/* Slides in a row, one in view. Without scenes.js the row is swiped, or scrolled with the arrow keys
   once focused, so its scrollbar shows; scenes.js adds the controls and hides it. */
.carousel {
  min-width: 0;
}

.carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  border-radius: var(--radius-card);
}

.carousel.is-enhanced .carousel__track {
  scrollbar-width: none;
}

.carousel.is-enhanced .carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

.carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  scroll-snap-align: center;
}

.carousel__caption {
  max-width: 26rem;
  padding: 0 0.5rem;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.carousel__caption b {
  color: var(--ink);
  font-weight: 600;
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel__controls[hidden],
.carousel__pause[hidden] {
  display: none;
}

.carousel__arrow,
.carousel__pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.carousel__arrow:hover,
.carousel__pause:hover {
  border-color: var(--violet-tint-strong);
  color: var(--violet-text);
}

.carousel__arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel__pause {
  margin-left: 0.5rem;
}

.carousel__pause svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.carousel__pause .icon-play,
.carousel__pause[aria-pressed="true"] .icon-pause {
  display: none;
}

.carousel__pause[aria-pressed="true"] .icon-play {
  display: block;
}

.carousel__dots {
  display: flex;
}

/* A 28px target around a small mark; the current slide's mark stretches. */
.carousel__dot {
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.carousel__dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--violet-tint-strong);
  transform: translate(-50%, -50%);
  transition:
    width 0.3s ease,
    background 0.3s ease;
}

.carousel__dot:hover::before {
  background: var(--muted);
}

.carousel__dot[aria-current="true"]::before {
  width: 20px;
  background: var(--violet);
}

@media (prefers-reduced-motion: reduce) {
  .scene-wrap .spinner {
    animation: none;
  }
}
