/* EZRA guided tours (templates/ezpzai/ezra_public/tours.html and tour_detail.html; public/tour.js,
 * tour-overlay.js). Prefix ezt-. Tokens from ezra-tokens.css only; breakpoints 720 / 1100 / 1600; motion is
 * transform and opacity on --dur tokens, and off with reduced motion. The gallery follows the examples
 * gallery (css/ezra-examples.css): header, sticky segmented filter bar, a large "Start here" card, a 3 / 2 / 1
 * grid. The player sits in an EZRA app window with one control bar at its foot and a chapter rail (a bottom
 * sheet below 1100px). From 1100px the rail carries the story (the current chapter opens to its step text and a
 * thin bar that fills over the step's time, paused with the tour) and the step card is a small callout. At the end and
 * while paused the stage is explorable and a slim end strip (.ezt-end) sits above the control bar. Chapters
 * are the conversation's questions; an intro card covers the stage until the tour plays. base.html loads the shared stylesheets; the tour pages add only this file (and the
 * player css/ezra-workspace.css), so nothing here is overridden by a second copy of ezra.css. */

.ezt-page [hidden], .ezt-gallery [hidden] { display: none !important; }
.ezt-page, .ezt-gallery {
  --ezt-head-h: var(--ezp-sticky-top);   /* the sticky site header + EZRA sub-nav above (css/ezra-brand.css) */
  --ezt-rail-w: 380px;                    /* the chapter rail from 1100px; the stage fills the rest of the column */
}
.ezt-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ezt-gap { flex: 1; }
.ezt-h1 { margin: 0; font-size: var(--fs-28); font-weight: 700; line-height: var(--lh-tight); letter-spacing: -.02em; color: var(--bright); text-wrap: balance; }
.ezt-h1.is-display { font-size: clamp(calc(var(--fs-28) * 1.2), 4.4vw, calc(var(--fs-28) * 1.85)); letter-spacing: -.03em; }
.ezt-h1.is-title { font-size: clamp(var(--fs-28), 3.6vw, calc(var(--fs-28) * 1.5)); letter-spacing: -.03em; }
.ezt-h2 { margin: 0 0 var(--sp-4); font-size: var(--fs-17); font-weight: 600; line-height: var(--lh-snug); color: var(--bright); }
.ezt-lede { margin: 0; color: var(--muted); font-size: var(--fs-17); line-height: var(--lh-normal); max-width: calc(var(--sp-8) * 20); }

/* ── gallery ── */
html:has(.ezt-fbar) { scroll-padding-top: calc(var(--ezp-sticky-top) + 61px + 16px); }   /* + the filter bar (28 + 8 + 24 + 1) */
.ezt-gallery { display: flex; flex-direction: column; }
.ezt-ghead { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: calc(var(--sp-8) * 2); }
.ezt-eyebrow { color: var(--p-text); --ez-h: var(--p-text); }
.ezt-preview-note { align-self: flex-start; margin: 0; }

.ezt-fbar {
  position: sticky; top: var(--ezt-head-h); z-index: var(--z-local-3); margin-top: var(--sp-8);
  background: var(--overlay); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.ezt-fbar-in { display: flex; align-items: center; gap: var(--sp-4); padding-block: var(--sp-3); }
.ezt-filter {
  display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  margin: 0; padding: 3px; list-style: none; border-radius: var(--r-sm); background: var(--bg3); border: 1px solid var(--border);
}
.ezt-filter::-webkit-scrollbar { display: none; }
.ezt-filter li { display: flex; flex: none; }
.ezt-filter-link {
  display: inline-flex; align-items: center; height: var(--ctl-h-sm); padding: 0 var(--sp-3); border-radius: var(--r-xs);
  font-size: var(--fs-13); font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--muted);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.ezt-filter-link:hover { background: var(--bg4); color: var(--text); text-decoration: none; }
.ezt-filter-link[aria-current="page"] { background: var(--card); color: var(--bright); box-shadow: var(--shadow-2), 0 0 0 1px var(--border2); }
.ezt-filter-link:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.ezt-count { flex: none; margin: 0 0 0 auto; font-size: var(--fs-13); color: var(--faint); }

.ezt-body { display: flex; flex-direction: column; gap: calc(var(--sp-8) * 1.5); padding-block: var(--sp-8) calc(var(--sp-8) * 2); }
.ezt-section { min-width: 0; }
.ezt-pages { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.ezt-cardmeta { display: flex; flex-direction: column; gap: var(--sp-2); }

/* "Start here": one card, poster left (both rows), the card text then the tour facts and actions on the right.
 * The card is a subgrid of .ezt-feat, so the facts sit inside its frame; they paint above its full-card link. */
.ezt-feat {
  position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr;
  overflow: hidden; border: 1px solid var(--border2); border-radius: var(--r-lg); background: var(--card);
}
.ezt-feat > .ezp-card {
  grid-column: 1 / -1; grid-row: 1 / -1; display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid;
  height: auto; border: 0; border-radius: 0; background: none; box-shadow: none;
}
.ezt-feat .ezp-poster { grid-column: 1; grid-row: 1 / -1; aspect-ratio: auto; min-height: calc(var(--sp-8) * 9); border-bottom: 0; border-right: 1px solid var(--border); }
.ezt-feat .ezp-card-body { grid-column: 2; grid-row: 1; gap: var(--sp-3); padding: var(--sp-8) var(--sp-6) var(--sp-3); }
.ezt-feat .ezp-card-title { font-size: clamp(var(--fs-20), 2.2vw, calc(var(--fs-28) * .86)); letter-spacing: -.02em; }
.ezt-feat .ezp-card-takeaway { font-size: var(--fs-15); -webkit-line-clamp: 4; }
.ezt-feat > .ezt-cardmeta { grid-column: 2; grid-row: 2; position: relative; z-index: var(--z-local-1); align-self: start; padding: 0 var(--sp-6) var(--sp-8); gap: var(--sp-3); }
.ezt-feat:hover { border-color: var(--p3); }

/* the grid: the examples gallery's card language (partials/_card.html with `card`): the question as the title,
   the mode chip and date, "N steps · about M min · N questions", and the actions above the card-wide link */
.ezt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); margin: 0; padding: 0; list-style: none; }
.ezt-cell { display: flex; min-width: 0; }
.ezt-cell > * { flex: 1; min-width: 0; }
.ezt-gallery .ezp-card.is-conv .ezp-card-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.ezt-gallery .ezp-card-tk { font-weight: 600; color: var(--text); }
.ezt-gallery .ezp-card:hover { box-shadow: var(--shadow-pop); }

/* the tile that ends the grid */
.ezt-cta-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: calc(var(--sp-8) * 8); padding: var(--sp-8) var(--sp-6); text-align: center; text-decoration: none;
  border: 1px dashed var(--p3); border-radius: var(--r-lg); color: var(--text);
  background: radial-gradient(80% 80% at 50% 0%, var(--p1), transparent), var(--card);
  transition: border-color var(--dur-fast) var(--ease);
}
.ezt-cta-tile:hover { border-color: var(--ring); text-decoration: none; }
.ezt-cta-tile:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ezt-cta-mark { width: calc(var(--sp-8) + var(--sp-2)); height: calc(var(--sp-8) + var(--sp-2)); margin-bottom: var(--sp-2); }
.ezt-cta-title { font-size: var(--fs-17); font-weight: 600; line-height: var(--lh-snug); color: var(--bright); }
.ezt-cta-sub { max-width: 32ch; font-size: var(--fs-13); line-height: var(--lh-normal); color: var(--muted); }

.ezt-video { width: min(960px, calc(100vw - var(--sp-8))); padding: var(--sp-4); border: 1px solid var(--border2); border-radius: var(--r-lg); background: var(--card); color: var(--text); box-shadow: var(--shadow-pop); }
.ezt-video::backdrop { background: var(--overlay); }
.ezt-video-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.ezt-video-head .ezt-h2 { margin: 0; }
.ezt-video-el { display: block; width: 100%; border-radius: var(--r); background: var(--bg); }
.ezt-video-foot { margin: var(--sp-3) 0 0; }

@media (min-width: 1600px) {
  .ezt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ezt-feat .ezp-poster { min-height: calc(var(--sp-8) * 12); }
}
@media (max-width: 1099.98px) {
  .ezt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .ezt-ghead { padding-top: var(--sp-8); }
  .ezt-lede { font-size: var(--fs-15); }
  .ezt-fbar { margin-top: var(--sp-6); }
  .ezt-body { gap: var(--sp-8); padding-block: var(--sp-6) var(--sp-8); }
  .ezt-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
  .ezt-feat { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .ezt-feat .ezp-poster { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .ezt-feat .ezp-card-body { grid-column: 1; grid-row: 2; padding: var(--sp-5) var(--sp-4) var(--sp-3); }
  .ezt-feat > .ezt-cardmeta { grid-column: 1; grid-row: 3; padding: 0 var(--sp-4) var(--sp-5); }
}

/* ── player page (scroll-padding-top: the default from css/ezra-brand.css) ── */
.ezt-page { padding-block: var(--sp-8) calc(var(--sp-8) * 2); display: flex; flex-direction: column; gap: var(--sp-6); }
.ezt-head { display: flex; flex-direction: column; gap: var(--sp-3); }
.ezt-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); padding: 0; list-style: none; font-size: var(--fs-13); color: var(--faint); }
.ezt-crumbs li { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.ezt-crumbs li + li::before { content: "/"; color: var(--faint); }
.ezt-crumbs a { color: var(--muted); text-decoration: none; }
.ezt-crumbs a:hover { color: var(--bright); text-decoration: underline; }
.ezt-crumbs [aria-current] { color: var(--text); }
.ezt-page .ezt-lede { max-width: calc(var(--sp-8) * 22); }
.ezt-trust { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-1); }
.ezt-player { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
.ezt-main { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }

/* chapter rail: a panel on the left from 1100px; a bottom sheet ("Chapters" in the control bar) below that */
.ezt-rail { display: none; }
.ezt-rail[data-open] {
  display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-drawer); max-height: 60vh; overflow-y: auto;
  padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border2); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--card); box-shadow: var(--shadow-pop);
}
.ezt-rail-head { margin: 0 0 var(--sp-3); }
.ezt-chapters { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ezt-chapter {
  display: flex; align-items: flex-start; gap: var(--sp-3); min-height: var(--ctl-h); padding: var(--sp-2); border-radius: var(--r-sm);
  color: var(--muted); font-size: var(--fs-13); line-height: var(--lh-snug); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.ezt-chapter:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.ezt-chapter:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.ezt-chapter-t { padding-top: 3px; overflow-wrap: anywhere; }
.ezt-chapter-n {
  flex: none; display: inline-grid; place-items: center; width: var(--sp-6); height: var(--sp-6); border-radius: var(--r-full);
  border: 1px solid var(--border2); font-size: var(--fs-11); color: var(--muted);
}
.ezt-chapter[data-state="done"] .ezt-chapter-n { background: var(--p2); border-color: var(--p3); color: var(--p-text); }
.ezt-chapter[aria-current="step"] { background: var(--p1); color: var(--bright); box-shadow: inset 2px 0 0 var(--p); }
.ezt-chapter[aria-current="step"] .ezt-chapter-n { background: var(--p); border-color: var(--p); color: var(--on-p); }
.ezt-rail-btn { flex: none; }
/* the current chapter's narrative and progress: from 1100px only (the sheet below lists the questions). A chapter
   is one question of the conversation; its open part shows "Part N of M", the step's title and text. */
.ezt-chapter-now, .ezt-chapter-bar { display: none; }
.ezt-chapter-part { margin: 0; color: var(--muted); font-size: var(--fs-11); }
.ezt-chapter-part:empty { display: none; }
.ezt-chapter-st { margin: 0; color: var(--bright); font-size: var(--fs-13); font-weight: 600; line-height: var(--lh-snug); }
.ezt-chapter-b { margin: 0; color: var(--text); font-size: var(--fs-13); line-height: var(--lh-normal); }
.ezt-chapter-fill { display: block; width: 100%; height: 100%; background: var(--p); transform: scaleX(0); transform-origin: left center; }
.ezt-chapter-fill[data-run] { animation: ezt-fill var(--ezt-step-ms) linear forwards; }
.ezt-page[data-playing="0"] .ezt-chapter-fill { animation-play-state: paused; }
@keyframes ezt-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ezt-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
@media (min-width: 1100px) {
  .ezt-chapter-item:has(> .ezt-chapter[aria-current="step"]) { border-radius: var(--r-sm); background: var(--p1); box-shadow: inset 2px 0 0 var(--p); }
  .ezt-chapter-item > .ezt-chapter[aria-current="step"] { background: none; box-shadow: none; }
  .ezt-chapter[aria-current="step"] ~ .ezt-chapter-now {
    display: flex; flex-direction: column; gap: var(--sp-1); padding: 0 var(--sp-2) var(--sp-2) calc(var(--sp-2) + var(--sp-6) + var(--sp-3));
    animation: ezt-in var(--dur) var(--ease-out);
  }
  .ezt-chapter[aria-current="step"] ~ .ezt-chapter-bar {
    display: block; height: 2px; overflow: hidden; margin: 0 var(--sp-3) var(--sp-3) calc(var(--sp-2) + var(--sp-6) + var(--sp-3));
    border-radius: var(--r-full); background: var(--border2);
  }
}
@media (min-width: 1100px) {
  .ezt-player { grid-template-columns: var(--ezt-rail-w) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
  .ezt-rail-btn { display: none; }
  .ezt-rail, .ezt-rail[data-open] {
    display: block; position: sticky; top: calc(var(--ezt-head-h) + var(--sp-6)); z-index: auto;
    max-height: calc(100vh - var(--ezt-head-h) - 2 * var(--sp-6)); overflow-y: auto; scrollbar-width: thin;
    padding: var(--sp-4) var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); box-shadow: none;
  }
  .ezt-rail-head { padding: 0 var(--sp-2); }
}

/* the EZRA app window: the stage (the real app shell, public/app-replay.js; css/ezra-public.css .ezp-app-replay)
   and the control bar at its foot */
.ezt-window {
  position: relative; overflow: hidden; background: var(--bg);
  border: 1px solid var(--border2); border-radius: var(--r-lg); box-shadow: var(--shadow-pop), 0 0 0 1px var(--p1);
}
.ezt-stage { position: relative; isolation: isolate; height: clamp(480px, 72vh, 820px); overflow: hidden; }
.ezt-pane { display: flex; flex-direction: column; }
.ezt-pane-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
.ezt-pane-body { flex: 1; min-height: 0; overflow-y: auto; }
.ezt-error { margin: var(--sp-6); color: var(--bear-text); }

/* the Resume panel: hidden while the tour plays (it starts by itself), shown after Esc */
.ezt-start {
  position: absolute; inset: 0; z-index: var(--z-local-3); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); padding: var(--sp-6); text-align: center; background: var(--overlay);
}
.ezt-start-q { margin: 0; max-width: 40ch; color: var(--bright); font-size: var(--fs-20); line-height: var(--lh-snug); }
.ezt-start-hint { margin: 0; color: var(--muted); font-size: var(--fs-12); }

/* the intro card before the tour plays: the question, what you'll see, steps and minutes, Play */
.ezt-intro {
  position: absolute; inset: 0; z-index: var(--z-local-3); display: flex; align-items: center; justify-content: center;
  padding: var(--sp-6); overflow-y: auto; background: var(--overlay);
}
.ezt-intro-card {
  display: flex; flex-direction: column; gap: var(--sp-2); width: min(520px, 100%); padding: var(--sp-6);
  border: 1px solid var(--border2); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-pop);
}
.ezt-intro-q { margin: 0 0 var(--sp-2); font-size: var(--fs-20); font-weight: 600; line-height: var(--lh-snug); color: var(--bright); text-wrap: balance; }
.ezt-intro-h { margin: var(--sp-2) 0 0; font-size: var(--fs-12); font-weight: 600; color: var(--muted); }
.ezt-intro-b { margin: 0; font-size: var(--fs-14); line-height: var(--lh-normal); color: var(--text); }
.ezt-intro-list { display: flex; flex-direction: column; gap: var(--sp-1); margin: 0; padding-left: var(--sp-5); font-size: var(--fs-14); line-height: var(--lh-snug); color: var(--text); }
.ezt-intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); }
.ezt-intro-hint { color: var(--faint); font-size: var(--fs-12); }

/* spotlight: two cross-fading SVG scrims with their own cut-out, and a mark that moves by transform. tour.js confines
   the scrim to the conversation's scroll box (inline left / top / width / height), so the chat header, the composer
   and the control bar are never dimmed or boxed. A light dim; cards get a soft 1px ring, text a thin accent bar. */
.ezt-scrim { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: var(--z-local-2); pointer-events: none; opacity: 0; transition: opacity var(--dur) var(--ease); }
.ezt-scrim.is-on { opacity: 1; }
.ezt-scrim-fill { fill: color-mix(in srgb, var(--overlay) 55%, transparent); }
.ezt-ring {
  position: absolute; top: 0; left: 0; z-index: var(--z-local-2); pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--ring) 75%, transparent); border-radius: var(--r-lg);
  box-shadow: 0 0 0 var(--sp-1) var(--p1), 0 0 var(--sp-6) var(--p2);
  opacity: 0; transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease);
}
.ezt-ring.is-on { opacity: 1; }
/* text steps (the question, tool steps, prose): no box, a thin accent bar on the target's left edge */
.ezt-ring.is-bar { border-color: transparent; border-radius: var(--r-sm); box-shadow: none; }
.ezt-ring.is-bar::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--sp-1) / 2);
  border-radius: var(--r-full); background: var(--p); box-shadow: 0 0 var(--sp-3) var(--p3);
}
/* a target taller than the box: the cut edge stays open and fades out, never a hard line through text */
.ezt-ring.is-cut-bottom {
  border-bottom-color: transparent; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  -webkit-mask-image: linear-gradient(to bottom, var(--p) calc(100% - var(--sp-8)), transparent);
  mask-image: linear-gradient(to bottom, var(--p) calc(100% - var(--sp-8)), transparent);
}
.ezt-ring.is-cut-top {
  border-top-color: transparent; border-top-left-radius: 0; border-top-right-radius: 0;
  -webkit-mask-image: linear-gradient(to top, var(--p) calc(100% - var(--sp-8)), transparent);
  mask-image: linear-gradient(to top, var(--p) calc(100% - var(--sp-8)), transparent);
}
.ezt-ring.is-cut-top.is-cut-bottom {
  -webkit-mask-image: linear-gradient(to bottom, transparent, var(--p) var(--sp-8), var(--p) calc(100% - var(--sp-8)), transparent);
  mask-image: linear-gradient(to bottom, transparent, var(--p) var(--sp-8), var(--p) calc(100% - var(--sp-8)), transparent);
}

/* the end strip: docked between the stage and the control bar, so it never covers the answer; the stage is
   explorable behind it (scroll, hover, the cards' own tabs). Watch again, the CTAs and the next tour. */
.ezt-end {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--border); background: linear-gradient(var(--p1), var(--p1)), var(--bg2);
  animation: ezt-in var(--dur) var(--ease-out);
}
.ezt-end-t { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--text); font-size: var(--fs-13); line-height: var(--lh-snug); }
.ezt-end-t strong { color: var(--bright); font-weight: 600; }
.ezt-end-sub { color: var(--muted); }
.ezt-end-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
/* the workspace toggle in the topbar (disabled while the tour plays) and the close in the pane head */
.ezt-ws-toggle { flex: none; }
.ezt-ws-close { flex: none; }

/* the step card */
.ezt-card {
  position: absolute; top: 0; left: 0; z-index: var(--z-local-3); width: min(340px, calc(100% - var(--sp-8)));
  display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); border: 1px solid var(--border2); border-radius: var(--r);
  background: var(--card); box-shadow: var(--shadow-pop); transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease);
}
.ezt-card:focus { outline: 0; }
.ezt-card:focus-visible { box-shadow: var(--shadow-pop), var(--focus-halo); }
.ezt-card.is-docked { position: static; width: auto; transform: none; transition: none; }
.ezt-card-top { display: flex; align-items: center; gap: var(--sp-1); }
.ezt-card-count { flex: 1; color: var(--muted); font-size: var(--fs-12); }
.ezt-card-title { margin: 0; font-size: var(--fs-16); line-height: var(--lh-snug); color: var(--bright); }
.ezt-card-body { margin: 0; color: var(--text); font-size: var(--fs-14); line-height: var(--lh-normal); }
.ezt-card-nav { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-1); }
.ezt-card[aria-busy="true"] .ezt-card-body { opacity: .7; }
/* from 1100px: a small callout next to its target (title, one short line, Back / Next / Pause); the rail has the text */
@media (min-width: 1100px) {
  /* From 1100px the chapter rail tells the story and the control bar holds Back / Next / Pause, so the per-step
     card is not drawn over the answer (it covered and clipped the text). The spotlight still marks the step's
     target; the end strip (#ezt-end) carries the CTAs. */
  .ezt-card.is-callout { display: none !important; }
  .ezt-card.is-callout { width: min(300px, calc(100% - var(--sp-8))); gap: var(--sp-1); padding: var(--sp-3); }
  .ezt-card.is-callout .ezt-card-title { font-size: var(--fs-14); }
  .ezt-card.is-callout .ezt-card-body { color: var(--muted); font-size: var(--fs-13); }
  .ezt-card.is-callout [data-ezt="skip"] { display: none; }
}

/* one control bar at the foot of the window: play, back, next, the segmented progress, the step label, extras */
.ezt-bar { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--border); background: var(--bg2); }
.ezt-progress { flex: 1; min-width: calc(var(--sp-8) * 3); display: flex; gap: var(--sp-1); margin: 0 var(--sp-2); padding: 0; list-style: none; }
.ezt-progress li { flex: 1; display: flex; }
.ezt-seg.ez-btn { flex: 1; min-width: 0; height: var(--sp-6); padding: 0; border: 0; background: none; border-radius: var(--r-xs); }
.ezt-seg.ez-btn::before { content: ''; display: block; width: 100%; height: var(--sp-1); border-radius: var(--r-full); background: var(--border2); transition: background-color var(--dur-fast) var(--ease); }
.ezt-seg[data-state="done"]::before { background: var(--p3); }
.ezt-seg[data-state="current"]::before { background: var(--p); }
.ezt-seg.ez-btn:hover:not(:disabled)::before { background: var(--p-h); }
.ezt-step-label { flex: none; color: var(--muted); font-size: var(--fs-12); white-space: nowrap; }
.ezt-play { min-width: calc(var(--sp-8) * 2.5); }
.ezt-play [data-ezt-play-icon] { display: inline-grid; }
/* reduced motion: one line under the controls says why the tour waits for Play */
.ezt-bar:has(> .ezt-rm-note:not([hidden])) { flex-wrap: wrap; }
.ezt-rm-note { order: 99; flex-basis: 100%; margin: 0; color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-snug); }
.ezt-notes { display: flex; flex-direction: column; gap: var(--sp-2); color: var(--muted); font-size: var(--fs-13); }
.ezt-videobox summary { list-style: none; cursor: pointer; }
.ezt-videobox summary::-webkit-details-marker { display: none; }
.ezt-videobox[open] .ezt-video-el { margin-top: var(--sp-3); }
.ezt-noscript { display: flex; flex-direction: column; gap: var(--sp-2); padding-left: var(--sp-5); }

@media (max-width: 1099.98px) {
  .ezt-bar { flex-wrap: wrap; }
  .ezt-progress { order: -1; flex-basis: 100%; margin: 0; }
  .ezt-step-label { margin-left: auto; }
}

/* phone: the card sits under the window, the rail is a sheet, Restart and Skip stay on the card */
@media (max-width: 720px) {
  .ezt-page { padding-block: var(--sp-6) var(--sp-8); gap: var(--sp-5); }   /* padding-block: the page gutter (.ezp-col) stays */
  .ezt-stage { height: clamp(420px, 64vh, 640px); }
  .ezt-intro { align-items: flex-start; padding: var(--sp-4); }
  .ezt-intro-card { padding: var(--sp-5) var(--sp-4); }
  .ezt-intro-q { font-size: var(--fs-17); }
  .ezt-bar-extra { display: none; }
  /* the end strip stays compact at the foot of the window: the buttons only, the next tour on its own line */
  .ezt-end { padding: var(--sp-2); }
  .ezt-end-sub { display: none; }
  .ezt-end-ctas { width: 100%; }
  .ezt-end-ctas > .ez-btn:not(.ezt-next-tour) { flex: 1; }
  .ezt-end-ctas > .ezt-next-tour { flex-basis: 100%; }
}

/* record mode (staff): the window fills a fixed 1920x1080 / 1080x1920 frame set by tour.js; no controls */
.ezt-page.is-recording .ezt-window { position: fixed; top: 0; left: 0; z-index: var(--z-modal); border: 0; border-radius: 0; transform-origin: 0 0; box-shadow: none; }
.ezt-page.is-recording .ezt-stage { height: 100%; }
.ezt-page.is-recording .ezt-card, .ezt-page.is-recording .ezt-bar, .ezt-page.is-recording .ezt-rail, .ezt-page.is-recording .ezt-end { display: none; }
.ezt-caption {
  position: absolute; left: var(--sp-8); right: var(--sp-8); bottom: var(--sp-8); z-index: var(--z-local-3); padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border2); box-shadow: var(--shadow-pop);
}
.ezt-caption-t { margin: 0 0 var(--sp-2); font-size: var(--fs-28); font-weight: 700; line-height: var(--lh-tight); color: var(--bright); }
.ezt-caption-b { margin: 0; font-size: var(--fs-20); line-height: var(--lh-normal); color: var(--text); }
.ezt-reccard {
  position: absolute; inset: 0; z-index: var(--z-local-3); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-4); padding: var(--sp-8); text-align: center; background: var(--bg);
}
.ezt-reccard-t { margin: 0; font-size: var(--fs-hero); font-weight: 700; color: var(--bright); }
.ezt-reccard-s { margin: 0; font-size: var(--fs-20); color: var(--muted); max-width: 40ch; }

@media (prefers-reduced-motion: reduce) {
  .ezt-scrim, .ezt-ring, .ezt-card, .ezt-chapter, .ezt-seg.ez-btn::before, .ezt-filter-link, .ezt-cta-tile, .ezp-card { transition: none; }
  .ezt-end { animation: none; }
  .ezt-chapter-fill, .ezt-chapter-fill[data-run], .ezt-chapter-now, .ezt-chapter[aria-current="step"] ~ .ezt-chapter-now { animation: none; }
  .ezt-chapter-bar, .ezt-chapter[aria-current="step"] ~ .ezt-chapter-bar { display: none; }
  .ezt-gallery .ezp-card:hover { transform: none; }
}
