/* explainer.css: the explainer-video player (partial explainer.html), 26.10.2026. Palette and motion tokens only.
   .xpl block · .xpl__frame 16:9 frame (aspect-ratio reserves the space before anything loads, so nothing shifts)
   · .xpl__play brand play button over the poster (explainer.js un-hides it; without JS the native controls stay)
   · .xpl__tx transcript. Nothing moves on its own; hover and focus transitions only with html.mo, none with reduced motion. */

.xpl { position: relative; min-width: 0; max-width: 960px; margin-inline: auto; }
/* homepage #connection: the split head and the criteria grid both span the full .wrap, so the player does too (v2, 26.10.2026);
   centred heads (philosophy page) and the doc column (chatting page) keep the 960 px box */
.section__head--split + .xpl { max-width: none; }

/* ------------------------------------------------------------ frame + video */
.xpl__frame {
  position: relative; container-type: inline-size; overflow: hidden; aspect-ratio: 16 / 9;
  border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--inset);
  box-shadow: 0 0 0 1px var(--tint), 0 40px 90px -50px rgba(0, 0, 0, .9);
}
.xpl__video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--inset); }
.xpl__fallback { margin: 0; padding: 24px; color: var(--body); }

/* ------------------------------------------------------------ brand play button (covers the poster: a click anywhere plays) */
.xpl__play {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: flex-start;
  width: 100%; margin: 0; padding: clamp(10px, 3.2cqi, 28px); border: 0; border-radius: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(8, 7, 6, 0) 50%, rgba(8, 7, 6, .55) 100%);
  color: var(--ink); font: 600 15px/1.2 var(--f-body); text-align: left; -webkit-tap-highlight-color: transparent;
}
.xpl__play[hidden] { display: none; }
.xpl__pill {
  display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 6px 18px 6px 6px;
  border-radius: var(--r-pill); border: 1px solid var(--tint-line);
  background: rgba(11, 10, 9, .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .9);
}
.xpl__disc {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad); color: var(--on-ember);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, .28), 0 10px 26px -16px rgba(217, 195, 160, .38);
}
.xpl__disc svg { width: 20px; height: 20px; margin-left: 2px; fill: currentColor; }
.xpl__label { min-width: 0; letter-spacing: .005em; }
.xpl__dur { flex: none; padding-left: 12px; border-left: 1px solid var(--line-strong); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); }

.xpl__play:hover .xpl__pill { border-color: color-mix(in srgb, var(--ember) 45%, transparent); background: rgba(11, 10, 9, .84); }
/* the frame clips anything outside it, so the focus ring sits inside the edge */
.xpl__play:focus-visible { outline: 2px solid var(--ember); outline-offset: -6px; border-radius: calc(var(--r-lg) - 1px); }
.xpl__play:focus-visible .xpl__pill { border-color: var(--ember); }

html.mo .xpl__pill { transition: transform var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease), background-color var(--dur-hover) var(--ease); }
html.mo .xpl__disc { transition: transform var(--dur-hover) var(--ease); }
html.mo .xpl__play:hover .xpl__pill { transform: translateY(var(--lift)); }
html.mo .xpl__play:hover .xpl__disc { transform: scale(1.06); }
html.mo .xpl__play:active .xpl__disc { transform: scale(.97); transition-duration: var(--dur-press); }
@media (prefers-reduced-motion: reduce) {
  html.mo .xpl__pill, html.mo .xpl__disc { transition: none; }
  html.mo .xpl__play:hover .xpl__pill, html.mo .xpl__play:hover .xpl__disc, html.mo .xpl__play:active .xpl__disc { transform: none; }
}

/* narrow frames (phones, 320 px and up): disc and duration only; the label stays as the button's accessible name */
@container (max-width: 459px) {
  .xpl__pill { gap: 9px; padding: 4px 13px 4px 4px; }
  .xpl__disc { width: 36px; height: 36px; }
  .xpl__disc svg { width: 16px; height: 16px; }
  .xpl__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .xpl__dur { padding-left: 0; border-left: 0; font-size: 14px; color: var(--ink); }
}

/* ------------------------------------------------------------ transcript */
.xpl__tx { margin-top: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card-bg, rgba(255, 255, 255, .026)); }
.xpl__tx > summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 18px; border-radius: inherit;
  list-style: none; cursor: pointer; font: 600 14.5px/1.3 var(--f-body); color: var(--ink);
}
.xpl__tx > summary::-webkit-details-marker { display: none; }
.xpl__tx > summary::marker { content: ""; }
.xpl__tx > summary > .i { color: var(--ember); }
.xpl__tx > summary:hover .xpl__chev { color: var(--ink); }
.xpl__chev { margin-left: auto; color: var(--muted); }
.xpl__tx[open] .xpl__chev { transform: rotate(180deg); }
html.mo .xpl__chev { transition: transform var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease); }
.xpl__txt { padding: 4px 18px 18px 48px; }
.xpl__txt p { margin: 0; max-width: 720px; font-size: 15px; line-height: 1.7; color: var(--body); }
.xpl__txt p + p { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { html.mo .xpl__chev { transition: none; } }

/* ------------------------------------------------------------ placements */
/* homepage #connection: between the section head and the criteria list */
.section__head + .xpl:not(:last-child) { margin-bottom: 48px; }
@media (max-width: 760px) {
  .xpl__frame { border-radius: var(--r-md); }
  .xpl__play:focus-visible { border-radius: calc(var(--r-md) - 1px); }
  .xpl__txt { padding: 2px 16px 16px; }
  .xpl__tx > summary { padding: 12px 16px; }
  .section__head + .xpl:not(:last-child) { margin-bottom: 28px; }
}
