/* Match the video backdrop so the full figure and side annotations share one stage. */
.persona-slot { --persona-stage: #cacdea; max-width: none; background: var(--persona-stage); color: var(--deep); }
/* Title, intro and the drag hint sit straight on the lilac, in the services type scale and
   inline padding: no paper plates (flow.css), no repeated title cards (full pass, 23.11.2026). */
#persona :is(.persona-heading, .persona-instructions) { background: none; padding: 0; }
.persona-heading { max-width: 850px; margin-bottom: 12px; }
.persona-heading h2 { margin: 0; }
.persona-heading p { max-width: 52ch; margin: 16px 0 0; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.6; }
.persona-orbit { position: relative; width: 100%; margin-inline: auto; background: var(--persona-stage); }
.persona-stage { position: relative; z-index: 2; aspect-ratio: 16 / 9; background: var(--persona-stage); cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.persona-slot[data-orbit-mode="drag"] .persona-stage { cursor: grabbing; }
.persona-stage:focus-visible { outline: 3px solid var(--deep); outline-offset: 4px; box-shadow: none; }
/* A press focuses the slider (so the arrow keys work) but is not keyboard focus: no ring while
   the figure is dragged. The first key press brings it back (js/indigo/pointer-focus.mjs). */
.persona-stage[data-focus-source="pointer"]:focus-visible { outline: none; }
.persona-stage picture { display: block; width: 100%; height: 100%; position: relative; z-index: 2; }
.persona-stage img, .persona-stage video { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.persona-stage video { position: absolute; inset: 0; z-index: 2; }
.persona-instructions {
  max-width: 850px; margin: 0 0 clamp(8px, 2vw, 24px);
  font-size: 15px; line-height: 1.5; color: rgb(30 33 80 / 82%);
}
.persona-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; max-width: 1440px; margin: 24px auto 0; }
.persona-controls p { flex: 1 1 32ch; margin: 0; font-size: 16px; }
/* A quiet secondary control: small ink label, 44px hit area from ::before. */
.persona-controls button {
  position: relative; min-height: 0; padding: 5px 10px; border: 1px solid rgb(30 33 80 / 45%); border-radius: 0;
  color: var(--deep); background: transparent; font: inherit; font-size: 14px; line-height: 1.2; white-space: nowrap;
}
.persona-controls button::before { content: ""; position: absolute; inset: 50% auto auto 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
.persona-controls button:hover { border-color: var(--deep); }
.persona-controls button[aria-pressed="true"] { border-color: var(--deep); background: rgb(30 33 80 / 8%); }
.persona-controls button:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; }
.persona-status { max-width: 1440px; margin: 16px auto 0; font-size: 16px; }
@media (max-width: 720px) {
  .persona-orbit { width: 100%; }
  .persona-stage { aspect-ratio: 1 / 1; }
  .persona-controls { align-items: start; }
}

/* #about follows, so the control always scrolls clear of the consent banner (see
   scroll-margin below); no extra reserved band under the small centred toggle. */
.persona-slot { padding-bottom: clamp(48px, 6vw, 96px); }
.persona-controls { position: relative; isolation: isolate; scroll-margin-block-end: calc(var(--consent-h, 0px) + 96px); }
/* The small toggle sits on the lilac stage itself, without the text plate. */
#persona .persona-controls { background: transparent; padding: 0; margin-top: 16px; }
/* Phones keep the 16px text policy; the 44px target comes from ::before, not the box. */
#persona .persona-controls button { min-height: 0; min-width: 0; }
@media (min-width: 901px) { #persona .persona-controls { margin-inline: auto; } }
/* Keep the sole control in the same central corridor as the glass captions,
   even when it scrolls level with the fixed corner tools. */
@media (max-width: 900px) {
  .persona-controls { max-width: calc(100vw - 160px); justify-content: center; }
  .persona-controls button { max-width: 100%; }
}

.persona-controls:has([data-orbit-toggle][hidden]) { display: none; }

/* This square alone owns the visibility gate; the cubes orbit around its centre. */
.persona-media { position: absolute; inset: 0 auto auto 50%; width: var(--media-size, 100%); height: var(--media-size, 100%); transform: translateX(-50%); }
.persona-slot:not([data-orbit-mode]) .persona-media,
:is(.motion-off .persona-slot, .persona-slot:has([data-cubes-static="true"])) .persona-media { inset: 0; width: 100%; height: 100%; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .persona-media { inset: 0; width: 100%; height: 100%; transform: none; }
}

/* The phone square is the entire drag target; captions stay below it. */
#persona[data-persona-renderer="frames"] .persona-orbit { perspective: none; }
/* Capped by height so a landscape phone still sees the whole figure at once. */
#persona[data-persona-renderer="frames"] .persona-stage {
  width: min(100%, 78vh, 78svh); height: auto; aspect-ratio: 1 / 1; margin-inline: auto;
}
#persona[data-persona-renderer="frames"] .persona-media {
  position: absolute; inset: 0; width: 100%; height: 100%; transform: none;
}
#persona[data-persona-renderer="frames"] .persona-stage :is(picture, canvas) {
  position: absolute; inset: 0; width: 100%; height: 100%; transform: none;
  object-fit: contain; pointer-events: none;
}
#persona[data-persona-renderer="frames"] .persona-frames { z-index: 3; }
#persona[data-persona-renderer="frames"] .persona-phone-labels {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; gap: 8px; color: var(--deep);
  font-size: 16px; line-height: 1.5;
}
#persona[data-persona-renderer="frames"] .persona-phone-semantic {
  position: absolute; inset: auto; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%);
}
#persona[data-persona-renderer="frames"] .persona-phone-semantic li {
  position: static; width: auto; height: auto; min-height: 0; transform: none;
}

/* Desktop video and poster: the encoded backdrop is #cbcce8, a few levels off the lilac, which
   drew a faint box around the figure. The stage takes the encoded colour (difference <= 1 level),
   so the box disappears without a perimeter mask (full pass, 23.11.2026). */
#persona:not([data-persona-renderer="frames"]) { --persona-stage: #cbcce8; }
/* Static and no-JS desktop poster: show only the square around the figure. The 16:9 poster's
   pillarbox is bluer than the stage and read as two side panels. */
@media (min-width: 721px) {
  #persona .persona-orbit { --persona-ratio: 1 / 1; }
  #persona:not([data-orbit-mode]) .persona-stage,
  .motion-off #persona .persona-stage,
  #persona .persona-orbit[data-cubes-static="true"] .persona-stage { width: min(100%, 620px); margin-inline: auto; aspect-ratio: 1 / 1; }
  #persona:not([data-orbit-mode]) .persona-stage img,
  .motion-off #persona .persona-stage img,
  #persona .persona-orbit[data-cubes-static="true"] .persona-stage img { object-fit: cover; }
}
@media (min-width: 721px) and (prefers-reduced-motion: reduce) {
  #persona .persona-stage { width: min(100%, 620px); margin-inline: auto; aspect-ratio: 1 / 1; }
  #persona .persona-stage img { object-fit: cover; }
}

/* Desktop orbit: the figure is the centre of the block, so the cases need the full width to
   rest beside it. The orbit may use the section's side padding (never past 96vw or 1440px). */
@media (min-width: 901px) and (min-height: 541px) {
  #persona[data-orbit-mode]:not([data-persona-renderer="frames"]) .persona-orbit:not([data-cubes-static="true"]) {
    width: min(1440px, 96vw); max-width: none;
    margin-inline: calc((100% - min(1440px, 96vw)) / 2);
  }
}
/* The clip's flat backdrop rings for a few pixels at its left, right and top edges
   (compression), which drew a faint frame once the figure grew. Those edges feather into the
   stage, which has the same colour. The bottom stays whole: the feet stand on it. */
#persona:not([data-persona-renderer="frames"]) .persona-stage video {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 2.5%);
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 2.5%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
