/* The outline uses the same theme-specific ink and halo as the page's film. */
html:root[data-theme] body.km-designed[data-page] #main-content
  .km-selected-live > video[data-km-live] {
  box-shadow: 0 0 0 2px var(--topic-ink),
              0 0 14px 1px color-mix(in srgb, var(--topic-ink) 32%, transparent),
              0 8px 30px -4px color-mix(in srgb, var(--topic-ink) 19%, transparent) !important;
}

/* Service copy leads the example. The last visible item in the figure is the scene. */
html:root[data-theme] body.km-designed[data-page] #main-content
  :is(.kband, .ksplit, .kduo) figure.km-selected-live > figcaption:first-child {
  grid-row: 1;
  margin: 0 0 14px !important;
}
html:root[data-theme] body.km-designed[data-page] #main-content
  .km-selected-live > figcaption:first-child ~ video[data-km-live] {
  grid-row: 2;
}

/* Centre a single scene when it has no adjacent service copy or action. */
html:root[data-theme] body.km-designed[data-page] #main-content
  .km-lower-live .adw:has(> .km-selected-live:only-child) {
  display: grid !important;
  grid-template-columns: minmax(0, 373px) !important;
  justify-content: center !important;
}
html:root[data-theme] body.km-designed[data-page] #main-content
  .km-lower-live .adw:has(> :is([data-km-cinema-live="checklist-01"], [data-km-cinema-live="private-ai-01"]):only-child) {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* Only full-width editorial frames take the panoramic crop. */
html:root[data-theme] body.km-designed[data-page] #main-content
  :is(.kband .km-selected-live, .kduo.kone .km-selected-live, .km-lower-live > figure.km-selected-live,
      [data-km-cinema-live="checklist-01"], [data-km-cinema-live="private-ai-01"]) > video[data-km-live] {
  aspect-ratio: var(--km-panorama-ratio, 8 / 3) !important;
  object-fit: cover !important;
  object-position: 50% var(--km-live-focus, 40%) !important;
}

/* Frame the action in each scene: hands and tools low, faces higher. */
[data-km-cinema-live="checklist-01"],
[data-km-cinema-live="lab-04"],
[data-km-cinema-live="lab-content-02"] { --km-live-focus: 80%; }
[data-km-cinema-live="business-01"] { --km-live-focus: 52%; }
[data-km-cinema-live="industry-clinics-02"],
[data-km-cinema-live="lab-earn-02"],
[data-km-cinema-live="industry-horeca-02"] { --km-live-focus: 52%; }
[data-km-cinema-live="courses-02"],
[data-km-cinema-live="lab-agent-02"],
[data-km-cinema-live="razbor-02"],
[data-km-cinema-live="partners-02"] { --km-live-focus: 25%; }

@media (max-width: 700px) {
  body[data-page] { --km-panorama-ratio: 2.05; }
}

@media (forced-colors: active) {
  body[data-page] #main-content .km-selected-live > video[data-km-live] {
    outline: 1px solid CanvasText;
  }
}
