/* The footage owns the frame; captions belong to the page. Load last. */
:root{--km-media-radius:18px}
html:not([data-theme=light]){
  --km-media-text:var(--km-ink,#eee8f5);--km-media-muted:var(--km-muted,#bdb2ca);--km-media-link:var(--km-accent,#cfb3ff);
  --km-media-control-bg:rgba(25,20,34,.68);--km-media-control-hover:rgba(25,20,34,.88);
  --km-media-control-text:#fff;--km-media-control-border:rgba(255,255,255,.46);--km-media-focus:#efbd65;
}
html[data-theme=light]{
  --km-media-text:var(--km-ink,#292230);--km-media-muted:var(--km-muted,#62566d);--km-media-link:var(--km-accent,#68409b);
  --km-media-control-bg:rgba(255,255,255,.84);--km-media-control-hover:rgba(255,255,255,.97);
  --km-media-control-text:#30203f;--km-media-control-border:rgba(62,36,90,.42);--km-media-focus:#7443a9;
}
/* Theme ownership is explicit: the light compiler must not recolour this
   authored palette or resurrect historical shadows after transparent/none.
   :root adds specificity above its generated light counterparts. */
html:root[data-theme] body.km-designed #main-content .km-selected-live,
html:root[data-theme] body.km-designed #main-content .kmad .fv,
html:root[data-theme] body.km-designed #main-content .km-hero-portrait.km-selected-live,
html:root[data-theme] body.km-designed #main-content :is(.kband,.ksplit,.kduo) figure.km-selected-live,
html:root[data-theme] body.km-designed #main-content #projects .pbento figure.big.km-selected-live,
html:root[data-theme] body.km-designed #main-content .xt .xb>figure.km-selected-live{
  position:relative!important;height:auto!important;min-height:0!important;max-height:none!important;
  aspect-ratio:auto!important;padding:0!important;background:transparent!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible!important;
}
html:root[data-theme] body.km-designed #main-content .km-selected-live{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-content:start!important;align-items:start!important;
}
html:root[data-theme] body.km-designed #main-content .km-selected-live::before,
html:root[data-theme] body.km-designed #main-content .km-selected-live::after,
html:root[data-theme] body.km-designed #main-content .kmad .fv::before,
html:root[data-theme] body.km-designed #main-content .kmad .fv::after{display:none!important}
html:root[data-theme] body.km-designed #main-content .km-selected-live>video[data-km-live],
html:root[data-theme] body.km-designed #main-content .kmad .fv>video[data-km-selected]{
  display:block!important;width:100%!important;max-width:100%!important;height:auto!important;
  min-height:0!important;max-height:none!important;aspect-ratio:var(--km-media-ratio,auto)!important;object-fit:contain!important;
  position:static!important;inset:auto!important;border:0!important;border-radius:var(--km-media-radius)!important;
  box-shadow:none!important;transform:none!important;animation:none!important;
}
html:root[data-theme] body.km-designed #main-content .km-selected-live>video[data-km-live]{grid-column:1;grid-row:1}
html:root[data-theme] body.km-designed #main-content figure.km-inset-live{margin:0!important;min-width:0!important;width:100%!important;align-self:start}
html:root[data-theme] body.km-designed #main-content .km-film-jump:focus-visible,
html:root[data-theme] body.km-designed #main-content .km-film-play:focus-visible,
html:root[data-theme] body.km-designed #main-content .kmad video:focus-visible{outline:3px solid var(--km-media-focus)!important;outline-offset:3px!important}
html:root[data-theme] body.km-designed #main-content .km-selected-live>.kchip,
html:root[data-theme] body.km-designed #main-content :is(.kband,.ksplit,.kduo) figure.km-selected-live>.kchip,
html:root[data-theme] body.km-designed #main-content .km-selected-live>figcaption,
html:root[data-theme] body.km-designed #main-content :is(.kband,.ksplit,.kduo) figure.km-selected-live>figcaption,
html:root[data-theme] body.km-designed #main-content #projects .pbento figure.big.km-selected-live>figcaption{
  position:static!important;inset:auto!important;transform:none!important;grid-column:1;grid-row:auto;
  width:100%!important;max-width:100%!important;margin:14px 0 0!important;padding:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:var(--km-media-text)!important;opacity:1!important;
}
html:root[data-theme] body.km-designed #main-content .km-selected-live>.kchip{
  align-self:start!important;justify-self:start;font-size:.78rem!important;line-height:1.6!important;
  color:var(--km-media-muted)!important;white-space:normal!important;
}
html:root[data-theme] body.km-designed #main-content .km-selected-live>.kchip::before,
html:root[data-theme] body.km-designed #main-content .km-selected-live>.kchip::after{display:none!important}
html:root[data-theme] body.km-designed #main-content .km-selected-live>figcaption{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important}
html:root[data-theme] body.km-designed #main-content .km-selected-live>figcaption>:is(i,b,span){margin:0!important}
html:root[data-theme] body.km-designed #main-content .km-selected-live>figcaption i,
html:root[data-theme] body.km-designed #main-content :is(.kband,.ksplit,.kduo) figure.km-selected-live>figcaption span{color:var(--km-media-muted)!important}
html:root[data-theme] body.km-designed #main-content .km-film-jump{
  display:inline-flex!important;align-items:center;align-self:flex-start;min-height:44px;max-width:100%;width:fit-content;
  margin:4px 0 0!important;padding:7px 0!important;grid-column:1;grid-row:auto;
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
  color:var(--km-media-link)!important;font-size:.86rem!important;line-height:1.5!important;
  text-decoration:underline;text-underline-offset:4px;
}
html:root[data-theme] body.km-designed #main-content .km-film-jump:hover{text-decoration-thickness:2px}
/* site.js retains the existing film action; chrome only changes its placement. */
html:root[data-theme] body.km-designed #main-content section.km-main-film[id]{padding-block:28px!important;background:none!important;scroll-margin-top:24px!important}
html:root[data-theme] body.km-designed #main-content .km-main-film .adw{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  width:min(calc(100% - 80px),1040px,max(320px,calc((100svh - 400px)*16/9)))!important;gap:18px!important;margin-inline:auto!important;
}
html:root[data-theme] body.km-designed #main-content .km-main-film .adw>.col{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important}
html:root[data-theme] body.km-designed #main-content .km-main-film h2{font-size:clamp(1.6rem,3vw,2.2rem)!important;line-height:1.25!important;max-width:34ch}
html:root[data-theme] body.km-designed #main-content .km-main-film .fv{width:100%!important;max-height:none!important}
/* Films use native controls. Legacy overlay is absent in the generated HTML. */
html:root[data-theme] body.km-designed #main-content .kmad .fv>.snd{display:none!important}
html:root[data-theme] body.km-designed #main-content :is(.kband,.ksplit,.kduo) figure.km-media-note{
  justify-content:center!important;box-shadow:none!important;background:none!important;
  border-radius:0!important;border-left:2px solid #b18afa55;overflow:visible!important;
}
html:root[data-theme] body.km-designed #main-content :is(.kband,.ksplit,.kduo) figure.km-media-note>figcaption{padding:24px!important}
@media(max-width:900px){
  html:root[data-theme] body.km-designed #main-content .km-main-film .adw{width:calc(100% - 32px)!important}
  html:root[data-theme] body.km-designed #main-content .km-main-film .fv{order:1!important}
  html:root[data-theme] body.km-designed #main-content .km-main-film .adw>.col{order:0!important}
}
