/* /what-jinn-can-do/video (lib/site/pages/video-motion.ts; round two U16, spec docs/site-relaunch/round-two/specs/video.md).
   The few things the feature kit (feature.css) has no shape for: the film panel above the cast row, the multi-line
   piece cards in the run (the close's band without a scene is the kit's `close({ scene: false })`). Every rule sits under a `vm-` class only this page
   prints, so the four Video sub-pages, which load the same stylesheet list and body attributes, are not touched. */

/* 2. the work: the demo film leads the gallery, full width up to a reading size, on its poster until it plays */
.vm-film { margin: 0; max-width: 1040px; }
.vm-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius, 8px); background: var(--navy); }
.vm-film figcaption { margin: 10px 0 0; color: var(--ink-2); }
/* the cast sheets stack at the film's width: three frames in a third of the row left each face about 100px tall.
   Keyed on the film panel, which only this page prints, so no sub-page's wall can match it. */
.fp-wall__lead:has(.vm-film) ~ .fp-wall__grid[data-cols] { grid-template-columns: minmax(0, 1fr); max-width: 1040px; }

/* 3. the run's piece cards: the brief over its three hooks; the spoken line over its source */
.vm-piece__head { margin: 0 0 8px; font-family: var(--ui); font-size: .82rem; font-weight: 800; letter-spacing: .02em; color: var(--amber-ink); }
.vm-piece__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vm-piece__lines li { padding-left: 12px; border-left: 3px solid var(--amber); font-family: var(--head); font-size: 1rem; line-height: 1.35; }
.vm-piece__spoken { margin: 0 0 10px; font-family: var(--head); font-weight: 700; font-size: 1.12rem; line-height: 1.3; }
.vm-piece__src { margin: 0; font-family: var(--ui); font-size: .82rem; color: var(--ink-2); }

/* Build five U5b (Sarah, #motion): Frame stands beside the band's head, name and title underneath in the site's one
   Uwee title treatment (.fp-role, relaunch.css 18). The head and Frame share a row while both fit (about 680px of
   wrap and up, so at 768 and 1440) and Frame drops under the head on a phone. Keyed on `vm-motion`, which only this
   page prints. */
.vm-motion__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.vm-motion__top > .fp-head { flex: 1 1 26rem; }
.vm-motion__host { flex: 0 0 auto; margin: 0; display: grid; justify-items: center; gap: 8px; }
.vm-motion__uwee { display: block; width: min(200px, 48vw); }
.vm-motion__host .fp-role { text-align: center; }

/* Build six (plan 2026-11-14-1409 G1-U7, Sarah BFfFpzAFEExc), /what-jinn-can-do/video/how only: the pipeline band's
   rows (#pipeline, cream) drawn as one line under them. The five stages that run today are ink nodes on a solid ink
   line; the three the note says come after are dashed outlines on a dashed line, under one "In build" bracket (the
   figure's one accent, amber). Keyed on `vh-pipe`, which only that sub-page prints; aria-hidden, the rows are the text.
   Phones turn it upright: a node per row, the line down the left. */
.vh-pipe { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); max-width: 1040px; margin: clamp(28px, 3.4vw, 44px) 0 0; }
.vh-pipe__stage { --vh-line: solid; grid-row: 2; position: relative; display: grid; justify-items: center; align-content: start; gap: 12px; padding: 0 4px; text-align: center; }
.vh-pipe__stage + .vh-pipe__stage::before, .vh-pipe__tag + .vh-pipe__stage::before { content: ""; position: absolute; top: 9px; right: 50%; width: 100%; border-top: 2px var(--vh-line) var(--ink); }
.vh-pipe__node { position: relative; z-index: 1; box-sizing: border-box; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; background: var(--ink); }
.vh-pipe__stage--build { --vh-line: dashed; }
.vh-pipe__stage--build .vh-pipe__node { border-style: dashed; background: var(--bg); }
.vh-pipe__name { font-family: var(--ui); font-size: .9rem; font-weight: 700; line-height: 1.3; text-wrap: balance; color: var(--fg); }
.vh-pipe__stage--build .vh-pipe__name { font-weight: 600; color: var(--muted); }
.vh-pipe__tag { grid-row: 1; grid-column: 6 / -1; margin: 0 4px 14px; padding: 0 0 6px; border-bottom: 2px solid var(--amber); font-family: var(--ui); font-size: .8rem; font-weight: 800; letter-spacing: .02em; line-height: 1.3; text-align: center; color: var(--amber-ink); }
@media (max-width: 640px) {
  .vh-pipe { grid-template-columns: minmax(0, 1fr); }
  .vh-pipe__stage { grid-row: auto; grid-template-columns: 20px minmax(0, 1fr); justify-items: start; align-items: center; gap: 14px; padding: 7px 0; text-align: left; }
  .vh-pipe__stage::before, .vh-pipe__stage + .vh-pipe__stage::before, .vh-pipe__tag + .vh-pipe__stage::before { content: ""; position: absolute; top: 0; bottom: 0; left: 9px; right: auto; width: 0; border-top: 0; border-left: 2px var(--vh-line) var(--ink); }
  .vh-pipe__stage:first-child::before { top: 50%; }
  .vh-pipe__stage:last-child::before { bottom: 50%; }
  .vh-pipe__tag { position: relative; grid-row: auto; grid-column: auto; margin: 0 0 0 34px; padding: 8px 0 4px; border-bottom: 0; text-align: left; }
  .vh-pipe__tag::before { content: ""; position: absolute; top: 0; bottom: 0; left: -25px; border-left: 2px dashed var(--ink); }
}

/* Build six part two PV (Sarah iW7lPhlpzWOF, oQA5LVuk_6Kz, adYEeWUozfnD): Frame joins one section on each of the three
   sub-pages. Every rule keys on the vs-frame figure only those three sections print, as the subject or as the :has()
   key on the block that holds it. On a phone Frame stands in the flow; from 1024 up he stands beside the section's head. */
/* The portrait file carries air above the figure, so the top margin stays small. */
.vs-frame { margin: 8px 0 clamp(20px, 3vw, 28px); display: grid; justify-items: center; gap: 8px; width: max-content; max-width: 100%; }
.vs-frame__uwee { display: block; }
.vs-frame .fp-role { text-align: center; }
@media (min-width: 1024px) {
  /* /compare #tools: the head runs in the left column, Frame in the right, the table under both. */
  div:has(> .vs-frame + table) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(24px, 3vw, 48px); }
  div:has(> .vs-frame + table) > * { grid-column: 1 / -1; }
  div:has(> .vs-frame + table) > :nth-child(-n + 3) { grid-column: 1; }
  div > .vs-frame:has(+ table) { grid-column: 2; grid-row: 1 / span 3; align-self: end; margin: 0 0 4px; }
  /* /features #handover: the same, the four rows under both. */
  .sp-depth--rows > .wrap:has(> .vs-frame) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(24px, 3vw, 48px); }
  .sp-depth--rows > .wrap:has(> .vs-frame) > .sp-head { grid-column: 1; grid-row: 1; align-self: end; }
  .sp-depth--rows > .wrap:has(> .vs-frame) > .sp-rows { grid-column: 1 / -1; grid-row: 2; }
  .sp-depth--rows > .wrap > .vs-frame { grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 clamp(24px, 3vw, 40px); }
  /* /why #shift: the paragraph starts level with the title, not the label above it ("lower this copy a bit"), and
     Frame stands under it. */
  .sp-depth--prose .sp-prose:has(> .vs-frame) { padding-top: 28px; }
  .sp-prose > .vs-frame { margin: 0; }
}

/* FIX-10 (page walk), /what-jinn-can-do/video/features "Frames from the film": the shared film figure crops its three
   16:9 frames into tall slices, which cut the printed words ("njoy", "flavo"). In this band the frames keep their true
   shape, whole, with a gutter: the first across the top, the other two side by side under it. Keyed on Frame's figure
   (vs-frame, printed by the three Video sub-pages only), the sign band and this deliverable, which of those pages only
   /features prints. */
body:has(.vs-frame) .sp-sign [data-dlv-one="olipop-silver-film-frame-08"] .dlv-art--film { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 10px; aspect-ratio: auto; height: auto; }
body:has(.vs-frame) .sp-sign [data-dlv-one="olipop-silver-film-frame-08"] .dlv-art--film img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm, 6px); }
body:has(.vs-frame) .sp-sign [data-dlv-one="olipop-silver-film-frame-08"] .dlv-art--film .f0 { grid-column: 1 / -1; grid-row: auto; }

/* FIX-10 (page walk), /what-jinn-can-do/video/compare's hero (vs-hero--compare, printed by that page only). From 861 up
   the lede ended flush against the lit viewer in the picture: it runs 60px narrower than the hero column's own measure
   (sections.css, the open hero's column rule), the heading keeping its width. On phones the heading's balanced break split
   "production / house"; pretty wrapping keeps the pair on one line and leaves no lone word. */
@media (min-width: 861px) {
  .vs-hero--compare .lede { max-width: calc(min(var(--sx-col), var(--sx-col-max) * 1cqw - (100cqw - min(var(--wrap), 100cqw - 2 * var(--gutter))) / 2) - 60px); }
}
@media (max-width: 860px) {
  .vs-hero--compare div > h1 { text-wrap: pretty; }
}
/* FIX-10 (page walk), /features at 860 and under: the sign band stacks, so the label over the frames ("Demo cut, example
   brand.") landed straight under the lede that opens with the same sentence, and the line printed twice in a row. Where
   the band stacks the label rests; the lede above still carries it, and from 861 up both show, a column apart. */
@media (max-width: 860px) {
  body:has(.vs-frame) .sp-sign__grid > div:has(> [data-dlv-one="olipop-silver-film-frame-08"]) > .label { display: none; }
}

/* FIX-10 (page walk), the navy table bands on /features (#scripts) and /compare (#tools, #axis, #house): each band's
   copy stopped at 920px, so its table left about 280px of the page grid empty at 1440. The copy takes the page grid;
   the label, lede and note keep their own measures, so only the table (and Frame's column on #tools) widen. Keyed on
   Frame's figure, which of the pages with these bands only those two print. FIX-13b (second look): /how's one navy
   table (#layers) still stopped at 920px; that page prints no Frame figure, so the key also takes its pipeline figure
   (vh-pipe, printed by /how only) and the table runs the page grid like its sisters. */
body:has(.vs-frame, .vh-pipe) [data-part="navy-table"] > .wrap > div { max-width: none; }
/* /compare's two table bands in a row (#axis, #house) read as one navy ground with about 250px of blank between the
   first table's note and the second label; the pair closes up to about one band gap. */
body:has(.vs-frame) [data-part="navy-table"]:has(+ [data-part="navy-table"]) { padding-bottom: clamp(36px, 4vw, 56px); }
body:has(.vs-frame) [data-part="navy-table"] + [data-part="navy-table"] { padding-top: clamp(36px, 4vw, 56px); }

/* FIX-10 (page walk), the main Video page (keyed on its film panel, vm-film, which only this page prints). */
@media (min-width: 861px) {
  /* Video as a service: the includes list sat centred against Biscuit's column, leaving about 120px of blank above it
     and again below it. The band's words run as one column (the plans heading, the list, the three decide lines,
     the founding link) beside Biscuit, who stands at the top of his column. */
  body:has(.vm-film) .fp-plans > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); column-gap: clamp(28px, 4vw, 56px); align-content: start; }
  body:has(.vm-film) .fp-plans > .wrap > * { grid-column: 1; }
  body:has(.vm-film) .fp-plans > .wrap > h2 { grid-column: 1 / -1; }
  body:has(.vm-film) .fp-plans > .wrap > div:has(> figure) { display: contents; }
  body:has(.vm-film) .fp-plans > .wrap > div:has(> figure) > figure { grid-column: 2; grid-row: 2 / span 8; align-self: start; }
}
/* Watch it work: the brief card was narrower than its picture (a short box at the top of the column beside the
   picture at 1440, about 620px under a 940px picture at 1024), and on the script step it shrank to its words. It takes
   its column's full width at every width; from 1100 up, where the panel sets the picture beside its words
   (feature.css), it also stands level with the picture's middle. */
.vm-piece:is(.fp-stage__panel > *) { justify-self: stretch; max-width: none; }
@media (min-width: 1100px) {
  .vm-piece:is(.fp-stage__panel > *) { grid-row: 1 / span 4; align-self: center; }
}

/* FIX-10 (page walk), /what-jinn-can-do/video/why. The shift band (#shift, the only prose band with Frame's figure on
   this page): the head stood 257px tall on the left and the right column held one paragraph with Frame under it, so
   the left ran blank under the head while Frame hung below the paragraph. Frame now stands beside the paragraph, at
   its right, and both columns end near the head's foot. From 1024 up, where the band sets head and words side by side
   (sub-page.css). */
@media (min-width: 1024px) {
  #shift .sp-prose:has(> .vs-frame) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(24px, 3vw, 40px); align-items: start; }
  #shift .sp-prose:has(> .vs-frame) > * { grid-column: 1; }
  #shift .sp-prose > .vs-frame { grid-column: 2; grid-row: 1 / span 9; margin: 0; }
}
/* The loop strip's first picture (Galley's poster and its clip, 16:9 in a 3:2 frame) cut the cloud at its left edge
   when centred; the focus point moves to the left edge, so the cloud shows whole and the crop falls on the monitors,
   which run off the right edge anyway. Keyed on the file, so no other strip moves. */
body:has(.vs-frame) .sp-strip__pic:has(> img[src$="/station-1-loop.webp"]) > * { object-position: 0% 50%; }

/* Build eight P5 (the editor's _-uHzzkRKXCO, vlsM0xgZjDmZ, SCnIwZJZPEKm): a page's own host by a band's heading, its
   portrait over the roster's name and title, as Frame stands by #handover. `vs-host`, never `vs-frame` (the rules
   above key on that). /how #pipeline: Pilot right of the head, the rows and the pipeline drawing under both.
   /features #sign: Drift under the lede in the band's left column (the empty space under it). The overview
   (`vm-overview__host`, video-motion.ts): Frame right of "What Video covers.", the groups under both. Phones: the host
   small on its own row under the head, the name beside it. */
.vs-host, .vm-overview__host { margin: 0; display: grid; justify-items: center; gap: 8px; width: max-content; max-width: 100%; }
.vs-host .fp-role, .vm-overview__host .fp-role { text-align: center; }
.vs-host__uwee, .vm-overview__uwee { display: block; }
#pipeline > .wrap:has(> .vs-host) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(24px, 3vw, 48px); }
#pipeline > .wrap:has(> .vs-host) > * { grid-column: 1 / -1; min-width: 0; }
#pipeline > .wrap:has(> .vs-host) > .sp-head { grid-column: 1; grid-row: 1; align-self: end; }
#pipeline > .wrap > .vs-host { grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 clamp(24px, 3vw, 40px); }
#sign .vs-host--sign { margin: clamp(20px, 2.6vw, 32px) 0 0; }
#overview > .wrap:has(> .vm-overview__host) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(24px, 3vw, 48px); }
#overview > .wrap:has(> .vm-overview__host) > * { grid-column: 1 / -1; min-width: 0; }
#overview > .wrap:has(> .vm-overview__host) > .fp-head { grid-column: 1; grid-row: 1; align-self: end; }
#overview > .wrap > .vm-overview__host { grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 clamp(16px, 2vw, 24px); }
@media (max-width: 700px) {
  #pipeline > .wrap:has(> .vs-host), #overview > .wrap:has(> .vm-overview__host) { grid-template-columns: minmax(0, 1fr); }
  #pipeline .vs-host, #sign .vs-host, #overview .vm-overview__host { display: flex; align-items: center; gap: 12px; width: auto; }
  #pipeline .vs-host__uwee, #sign .vs-host__uwee, #overview .vm-overview__host .vm-overview__uwee { flex: 0 0 auto; width: 84px !important; }
  #pipeline .vs-host .fp-role, #sign .vs-host .fp-role, #overview .vm-overview__host .fp-role { flex: 0 1 auto; min-width: 0; text-align: left; }
  #pipeline > .wrap > .vs-host { grid-column: 1; grid-row: 2; margin-bottom: 20px; }
  #overview > .wrap > .vm-overview__host { grid-column: 1; grid-row: 2; margin-bottom: 16px; }
}

/* Build eight P5 (the editor's Tcj1aAEDYvrF, qsviRIPxweo8, 4RxiSCfB1W0d), the overview's #motion: Frame's quote bubble
   over the portrait, smaller and wider than the site's default bubble so it sits beside the head; the status sentence
   as a larger call-out with the Let's Talk button beside it. */
.vm-motion .vm-motion__host .vm-motion__says { max-width: 17ch; margin: 0 0 14px; font-size: clamp(1.15rem, 1.5vw, 1.4rem); }
.vm-motion__end { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: clamp(24px, 3vw, 36px) 0 0; }
.vm-motion__callout { margin: 0; font-family: var(--display); font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 400; line-height: 1.2; color: var(--fg); }
.vm-motion__end .doors { margin: 0; }
@media (max-width: 860px) { .vm-motion .vm-motion__host .vm-motion__says { max-width: 18ch; font-size: 1.15rem; } }

/* Build eight P5 (the editor's eubKvNZTzscI, 6vLB7LULmwBS), /why #shift from 1024 up: the paragraph centered on the
   head's height (it started level with the title), and Frame with the name and title a little higher. */
@media (min-width: 1024px) {
  #shift .sp-prose:has(> .vs-frame) { padding-top: 0; align-self: center; align-items: center; }
  #shift .sp-prose:has(> .vs-frame) > p { margin-bottom: 0; }
  #shift .sp-prose > .vs-frame { grid-row: 1; position: relative; top: -16px; }
}

