/* CM player for the CM Video block. CM Academy colours: ink #1F354D, green #9CCC3D, blue #185ABC. */
.cmac-video-cm .cmvp{margin:0}
.cmvp{position:relative;width:100%;max-width:100%;aspect-ratio:16/9;margin:24px 0;background:#0E1B28;border-radius:14px;overflow:hidden;color:#fff;font-family:inherit;container-type:inline-size;isolation:isolate;outline:none;-webkit-tap-highlight-color:transparent}
.cmvp:focus-visible{box-shadow:0 0 0 3px #61AAF2}
.cmvp-stage,.cmvp-frame{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.cmvp-hit{position:absolute;inset:0;z-index:2;cursor:pointer}
.cmvp.is-idle,.cmvp.is-idle .cmvp-hit{cursor:none}

/* Theme safety: themes style buttons and ranges globally. */
html body .cmvp button{box-shadow:none;text-transform:none;letter-spacing:normal;min-height:0;line-height:1;margin:0;font-family:inherit}
html body .cmvp [hidden]{display:none!important}

/* Captions */
.cmvp-captions{position:absolute;left:5%;right:5%;bottom:6%;z-index:3;display:flex;flex-direction:column;align-items:center;gap:4px;pointer-events:none;transition:bottom .2s ease}
.cmvp.is-started:not(.is-idle) .cmvp-captions{bottom:68px}
html body .cmvp .cmvp-captions span{max-width:100%;padding:.15em .5em;border-radius:6px;background:rgba(14,27,40,.84);color:#fff!important;-webkit-text-fill-color:#fff;font-size:clamp(14px,2.6cqw,28px);line-height:1.35;text-align:center;white-space:pre-line}

/* Cards */
.cmvp-cards{position:absolute;inset:0;z-index:4;pointer-events:none}
.cmvp-card{position:absolute;display:flex;flex-direction:column;gap:6px;width:min(340px,44cqw);padding:16px 18px;border-radius:12px;background:#fff;color:#12202E;box-shadow:0 10px 30px rgba(0,0,0,.25);pointer-events:auto;animation:cmvp-in .25s ease}
.cmvp-pos-top-right{top:16px;right:16px}.cmvp-pos-top-left{top:16px;left:16px}
.cmvp-pos-bottom-right{bottom:72px;right:16px}.cmvp-pos-bottom-left{bottom:72px;left:16px}
.cmvp-card-title{padding-right:26px;color:#1F354D;font-size:16px;font-weight:700;line-height:1.3}
html body .cmvp-card-text{margin:0;color:#12202E;font-size:14px;line-height:1.45}
html body .cmvp-card-btn{align-self:flex-start;margin-top:4px;padding:9px 14px;border-radius:8px;background:#9CCC3D;color:#fff!important;-webkit-text-fill-color:#fff;font-size:14px;font-weight:700;text-decoration:none!important;transition:background .15s}
html body .cmvp-card-btn:hover{background:#185ABC}
html body .cmvp .cmvp-card-x{position:absolute;top:4px;right:4px;width:36px;height:36px;border:0;border-radius:8px;background:none;color:#677482;font-size:22px;cursor:pointer}
html body .cmvp .cmvp-card-x:hover{background:#F0F4F7;color:#1F354D}

/* Poster */
html body .cmvp .cmvp-poster{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:0;border:0;border-radius:0;background:#0E1B28 center/cover no-repeat;cursor:pointer}
html body .cmvp .cmvp-poster.no-image{background-color:transparent}
.cmvp-bigplay{display:flex;align-items:center;justify-content:center;width:clamp(56px,12cqw,84px);aspect-ratio:1;border-radius:50%;background:#9CCC3D;box-shadow:0 8px 24px rgba(0,0,0,.3);transition:background .15s}
.cmvp-poster:hover .cmvp-bigplay,.cmvp-poster:focus-visible .cmvp-bigplay{background:#185ABC}
.cmvp-poster:focus-visible{outline:3px solid #61AAF2;outline-offset:-3px}
.cmvp-bigplay svg{width:42%;height:42%;margin-left:6%;fill:#fff}

/* Control bar */
.cmvp-bar{position:absolute;left:0;right:0;bottom:0;z-index:6;display:flex;align-items:center;gap:2px;padding:48px 12px 10px;background:linear-gradient(to top,rgba(10,20,32,.92) 0%,rgba(10,20,32,.6) 45%,rgba(10,20,32,0) 100%);transition:opacity .2s ease}
/* The theme sets text and button colours with !important; everything in the bar is forced white. */
html body .cmvp .cmvp-bar .cmvp-btn,html body .cmvp .cmvp-time,html body .cmvp .cmvp-time span{color:#fff!important;-webkit-text-fill-color:#fff}
/* Menus are white boxes inside the bar: dark text, set explicitly so nothing white is inherited. */
html body .cmvp .cmvp-menu button{color:#12202E!important;-webkit-text-fill-color:#12202E}
html body .cmvp .cmvp-bar .cmvp-btn svg{fill:#fff!important}
html body .cmvp .cmvp-bar .cmvp-cc.is-on,html body .cmvp .cmvp-bar .cmvp-cc.is-on svg{color:#9CCC3D!important;-webkit-text-fill-color:#9CCC3D;fill:#9CCC3D!important}
html body .cmvp .cmvp-time .cmvp-dur,html body .cmvp .cmvp-time .cmvp-sep{color:rgba(255,255,255,.7)!important;-webkit-text-fill-color:rgba(255,255,255,.7)}
.cmvp-seekwrap{position:relative;flex:1 1 auto;min-width:60px;display:flex;align-items:center;margin:0 6px}
.cmvp-seekwrap .cmvp-seek{flex:1 1 auto;width:100%}
.cmvp-tip{position:absolute;bottom:30px;transform:translateX(-50%);padding:5px 9px;border-radius:6px;background:#fff;color:#1F354D!important;-webkit-text-fill-color:#1F354D;font-size:12px;font-weight:700;line-height:1.2;white-space:nowrap;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.25)}
.cmvp-seekwrap:hover input[type=range]::-webkit-slider-runnable-track{height:7px}
.cmvp-seekwrap:hover input[type=range]::-webkit-slider-thumb{margin-top:-3.5px;transform:scale(1.15)}
.cmvp:not(.is-started) .cmvp-bar{display:none}
.cmvp.is-idle .cmvp-bar{opacity:0;pointer-events:none}
html body .cmvp .cmvp-btn{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:8px;background:none;color:#fff;font-size:14px;font-weight:700;cursor:pointer}
html body .cmvp .cmvp-btn:hover{background:rgba(255,255,255,.14)}
.cmvp-btn svg{width:24px;height:24px;fill:currentColor}
.cmvp .i-pause,.cmvp .i-muted,.cmvp .i-fsexit{display:none}
.cmvp.is-playing .cmvp-play .i-play,.cmvp.is-muted .i-vol,.cmvp.is-fs .i-fs{display:none}
.cmvp.is-playing .cmvp-play .i-pause,.cmvp.is-muted .i-muted,.cmvp.is-fs .i-fsexit{display:block}
html body .cmvp .cmvp-cc.is-on{color:#9CCC3D}
.cmvp-time{flex:0 0 auto;padding:0 6px;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.cmvp :focus-visible{outline:3px solid #61AAF2;outline-offset:1px}

/* Ranges */
.cmvp input[type=range]{-webkit-appearance:none;appearance:none;height:28px;margin:0;padding:0;border:0;background:transparent;cursor:pointer}
.cmvp-seek{min-width:60px}
.cmvp-vol{flex:0 0 80px;width:80px}
.cmvp input[type=range]::-webkit-slider-runnable-track{height:5px;border-radius:3px;background:linear-gradient(to right,#9CCC3D var(--p,0%),rgba(255,255,255,.3) var(--p,0%))}
.cmvp input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;margin-top:-4.5px;border:0;border-radius:50%;background:#fff}
.cmvp input[type=range]::-moz-range-track{height:5px;border-radius:3px;background:rgba(255,255,255,.3)}
.cmvp input[type=range]::-moz-range-progress{height:5px;border-radius:3px;background:#9CCC3D}
.cmvp input[type=range]::-moz-range-thumb{width:14px;height:14px;border:0;border-radius:50%;background:#fff}

/* Chapter bar: always visible, sits under the control bar. */
.cmvp-chapbar{position:absolute;left:0;right:0;bottom:0;z-index:6;display:flex;align-items:flex-start;gap:6px;height:clamp(40px,8.5cqw,64px);padding:clamp(8px,1.8cqw,16px) 18% 0;background:linear-gradient(to top,rgba(10,20,32,.45),rgba(10,20,32,0))}
html body .cmvp .cmvp-chapter{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:clamp(4px,.7cqw,8px);padding:4px 0 8px;border:0;border-radius:0;background:none;color:#fff;cursor:pointer}
.cmvp-chapter-track{position:relative;display:block;width:100%;height:4px;border-radius:2px;background:rgba(255,255,255,.35);overflow:hidden;transition:height .15s ease}
.cmvp-chapter-fill{position:absolute;inset:0;background:#9CCC3D;transform:scaleX(0);transform-origin:left center}
html body .cmvp .cmvp-chapter-label{max-width:100%;overflow:hidden;color:#fff!important;-webkit-text-fill-color:#fff;font-size:clamp(10px,1.05cqw,13px);font-weight:500;line-height:1.2;white-space:nowrap;text-overflow:ellipsis;opacity:.85;transition:opacity .15s}
.cmvp-chapter:hover .cmvp-chapter-track,.cmvp-chapter:focus-visible .cmvp-chapter-track{height:6px}
.cmvp-chapter:hover .cmvp-chapter-label,.cmvp-chapter.is-current .cmvp-chapter-label{opacity:1}
html body .cmvp .cmvp-chapter.is-current .cmvp-chapter-label{font-weight:700}
.cmvp.chap-on .cmvp-bar{bottom:clamp(40px,8.5cqw,64px);padding-bottom:2px}
.cmvp.chap-on .cmvp-captions{bottom:calc(clamp(40px,8.5cqw,64px) + 8px)}
.cmvp.chap-on:not(.is-idle) .cmvp-captions{bottom:calc(clamp(40px,8.5cqw,64px) + 60px)}
.cmvp.chap-on .cmvp-pos-bottom-right,.cmvp.chap-on .cmvp-pos-bottom-left{bottom:calc(clamp(40px,8.5cqw,64px) + 60px)}
.cmvp.cmvp-native .cmvp-chapbar{display:none!important}

/* Menus */
.cmvp-menu-wrap{position:relative}
.cmvp-menu{position:absolute;right:0;bottom:50px;display:flex;flex-direction:column;min-width:150px;padding:6px;border-radius:10px;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.3)}
html body .cmvp .cmvp-menu button{position:relative;padding:10px 12px 10px 30px;border:0;border-radius:6px;background:none;color:#12202E;font-size:14px;text-align:left;cursor:pointer}
html body .cmvp .cmvp-menu button:hover{background:#F0F6E7}
.cmvp-menu button[aria-checked=true]::before{content:"";position:absolute;left:11px;top:50%;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:#9CCC3D}

/* End screen */
.cmvp-end{position:absolute;inset:0;z-index:7;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(14,27,40,.86)}
.cmvp-end-box{display:flex;flex-direction:column;align-items:center;gap:10px;max-width:520px;text-align:center;white-space:pre-line}
.cmvp-end-box strong{font-size:clamp(18px,3cqw,28px);line-height:1.25}
html body .cmvp-end-box p{margin:0;color:#DDE6EE;font-size:clamp(14px,1.8cqw,17px);line-height:1.5}
.cmvp-end-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:6px}
html body .cmvp-end-btn{padding:12px 18px;border-radius:8px;background:#9CCC3D;color:#fff!important;-webkit-text-fill-color:#fff;font-weight:700;text-decoration:none!important;transition:background .15s}
html body .cmvp-end-btn:hover{background:#185ABC}
html body .cmvp .cmvp-replay{padding:11px 16px;border:1px solid rgba(255,255,255,.6);border-radius:8px;background:transparent;color:#fff;font-weight:700;cursor:pointer}
html body .cmvp .cmvp-replay:hover{background:rgba(255,255,255,.12)}

.cmvp-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Full screen: real, and the window-filling fallback on iPhone. */
.cmvp:fullscreen{width:100%;height:100%;aspect-ratio:auto;margin:0;border-radius:0}
.cmvp:-webkit-full-screen{width:100%;height:100%;aspect-ratio:auto;margin:0;border-radius:0}
.cmvp.cmvp-fake-fs{position:fixed!important;inset:0;z-index:999999;width:100vw;height:100vh;height:100dvh;max-width:none;aspect-ratio:auto;margin:0;border-radius:0}
html.cmvp-lock,html.cmvp-lock body{overflow:hidden}

/* Fallback to Vimeo's own player: only the iframe is left. */
.cmvp.cmvp-native>:not(.cmvp-stage){display:none!important}

@container (max-width:520px){
  .cmvp-vol,.cmvp-time .cmvp-sep,.cmvp-time .cmvp-dur{display:none}
  .cmvp-chapbar{height:24px;padding:10px 4% 0}
  .cmvp-chapter-label{display:none!important}
  .cmvp.chap-on .cmvp-bar{bottom:24px}
  .cmvp-card{top:12px!important;right:12px!important;bottom:auto!important;left:12px!important;width:auto;padding:12px 40px 12px 14px}
  .cmvp-card-text{display:none}
  .cmvp.is-started:not(.is-idle) .cmvp-captions{bottom:60px}
}
@keyframes cmvp-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.cmvp *{animation:none!important;transition:none!important}}

/* Vimeo-style bar (0.10.3): a play button box on the left, one dark rail with the timeline
   and small icons, both floating 10px from the edges. Overrides the rules above. */
.cmvp-bar{left:10px;right:10px;bottom:10px;gap:6px;padding:0;background:none}
.cmvp.chap-on .cmvp-bar{bottom:calc(clamp(40px,8.5cqw,64px) + 4px)}
html body .cmvp .cmvp-bar .cmvp-play{width:60px;height:40px;border-radius:6px;background:rgba(0,0,0,.66)}
html body .cmvp .cmvp-bar .cmvp-play:hover{background:#9CCC3D}
.cmvp-bar .cmvp-play svg{width:22px;height:22px}
.cmvp-rail{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:0;height:40px;padding:0 6px 0 10px;border-radius:6px;background:rgba(0,0,0,.66)}
html body .cmvp .cmvp-rail .cmvp-btn{width:34px;height:34px;border-radius:6px;font-size:12px}
html body .cmvp .cmvp-rail .cmvp-btn:hover{background:none;color:#9CCC3D!important;-webkit-text-fill-color:#9CCC3D}
html body .cmvp .cmvp-rail .cmvp-btn:hover svg{fill:#9CCC3D!important}
.cmvp-rail .cmvp-btn svg{width:19px;height:19px}
.cmvp-rail .cmvp-time{padding:0 8px 0 0;font-size:12px}
.cmvp-rail .cmvp-seekwrap{margin:0 8px 0 0}
.cmvp-rail input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:2px}
.cmvp-rail input[type=range]::-webkit-slider-thumb{width:12px;height:12px;margin-top:-4px;opacity:0;transition:opacity .15s}
.cmvp-rail input[type=range]:hover::-webkit-slider-thumb,.cmvp-rail input[type=range]:focus-visible::-webkit-slider-thumb{opacity:1}
.cmvp-rail input[type=range]::-moz-range-thumb{width:12px;height:12px;opacity:0}
.cmvp-rail input[type=range]:hover::-moz-range-thumb{opacity:1}
.cmvp-seekwrap:hover input[type=range]::-webkit-slider-runnable-track{height:6px}
.cmvp-seekwrap:hover input[type=range]::-webkit-slider-thumb{margin-top:-3px;transform:none}
/* Volume slides out when the sound button or the slider is hovered. */
.cmvp-rail .cmvp-vol{flex:0 0 auto;width:0;opacity:0;transition:width .2s ease,opacity .2s ease}
.cmvp-rail .cmvp-mute:hover+.cmvp-vol,.cmvp-rail .cmvp-vol:hover,.cmvp-rail .cmvp-vol:focus-visible{width:70px;opacity:1;margin-right:6px}
.cmvp-menu{bottom:46px}
@container (max-width:520px){
  .cmvp-bar{left:6px;right:6px;bottom:6px}
  html body .cmvp .cmvp-bar .cmvp-play{width:44px;height:36px}
  .cmvp-rail{height:36px}
  .cmvp.chap-on .cmvp-bar{bottom:28px}
}

/* One-time speed hint: a white bubble pointing at the speed button. The bar stays visible meanwhile. */
.cmvp-hint{position:absolute;right:-6px;bottom:48px;z-index:2;padding:7px 11px;border-radius:8px;background:#fff;font-size:13px;font-weight:700;line-height:1.2;white-space:nowrap;box-shadow:0 6px 18px rgba(0,0,0,.28);pointer-events:none;animation:cmvp-in .25s ease;transition:opacity .4s ease}
.cmvp-hint::after{content:"";position:absolute;right:18px;bottom:-6px;width:12px;height:12px;background:#fff;transform:rotate(45deg)}
.cmvp-hint.is-out{opacity:0}
.cmvp.is-hinting.is-idle .cmvp-bar{opacity:1;pointer-events:auto}

/* Same frame as the normal video block: thin CM green border, 12px corners, soft shadow. */
.cmvp{box-sizing:border-box;border:2px solid #9CCC3D;border-radius:12px;box-shadow:0 10px 28px rgba(0,0,0,.28);background:#123D8A}
.cmvp:fullscreen,.cmvp:-webkit-full-screen,.cmvp.cmvp-fake-fs{border:0;box-shadow:none}
.cmvp:focus-visible{box-shadow:0 0 0 3px #61AAF2,0 10px 28px rgba(0,0,0,.28)}
/* Start button like Vimeo's: a dark rounded box bottom left, not a round button in the middle. */
html body .cmvp .cmvp-poster{align-items:flex-end;justify-content:flex-start;padding:0 0 10px 10px}
.cmvp-bigplay{width:60px;height:40px;aspect-ratio:auto;border-radius:6px;background:rgba(0,0,0,.66);box-shadow:none}
.cmvp-poster:hover .cmvp-bigplay,.cmvp-poster:focus-visible .cmvp-bigplay{background:#9CCC3D}
.cmvp-bigplay svg{width:22px;height:22px;margin-left:2px}
.cmvp.chap-on .cmvp-poster{padding-bottom:calc(clamp(40px,8.5cqw,64px) + 4px)}
@container (max-width:520px){
  html body .cmvp .cmvp-poster{padding:0 0 6px 6px}
  .cmvp-bigplay{width:44px;height:36px}
  .cmvp.chap-on .cmvp-poster{padding-bottom:28px}
}

/* The control bar is shown from the start, like Vimeo; the poster is only a click area
   (a click anywhere starts the video) and shows no button of its own. */
.cmvp:not(.is-started) .cmvp-bar{display:flex;opacity:1;pointer-events:auto}
html body .cmvp .cmvp-poster .cmvp-bigplay{display:none}

/* The chapter bar slides up when the first chapter begins and down again after the last
   (chaptersEnd); the control bar moves with it. */
.cmvp-chapbar{transform:translateY(100%);opacity:0;pointer-events:none;transition:transform .35s ease,opacity .35s ease}
.cmvp.chap-on .cmvp-chapbar{transform:none;opacity:1;pointer-events:auto}
.cmvp-bar{transition:opacity .2s ease,bottom .35s ease}

/* The 2px border makes the inside slightly wider than 16:9, so Vimeo adds thin black bars
   left and right. Stretched a little, as the normal video block does. */
.cmvp-frame{transform:scaleX(1.012);transform-origin:center}
.cmvp-stage{background:#123D8A}

/* Controls and chapter bar take turns, like Vimeo: while the controls are shown the chapter
   bar steps aside and the timeline shows the chapters as small gaps; when the controls hide,
   the chapter bar comes back. */
.cmvp.chap-on .cmvp-bar{bottom:10px}
.cmvp.chap-on:not(.is-idle) .cmvp-chapbar{transform:translateY(100%);opacity:0;pointer-events:none}
.cmvp.chap-on:not(.is-idle) .cmvp-captions{bottom:68px}
.cmvp.chap-on.is-idle .cmvp-captions{bottom:calc(clamp(40px,8.5cqw,64px) + 8px)}
.cmvp-chapbar{padding-left:7%;padding-right:7%}
.cmvp-seekmark{position:absolute;top:50%;width:3px;height:8px;margin:-4px 0 0 -1.5px;background:rgba(0,0,0,.85);pointer-events:none;z-index:1}
@container (max-width:520px){ .cmvp.chap-on .cmvp-bar{bottom:6px} }

/* Softer slide in and out at the start and end of the chapters: 0.8s with a gentle ease,
   the labels following the segments a moment later. Stepping aside for the controls stays quick. */
.cmvp-chapbar{transition:transform .8s cubic-bezier(.22,.61,.36,1),opacity .8s ease}
.cmvp-chapter{transition:transform .8s cubic-bezier(.22,.61,.36,1)}
.cmvp:not(.chap-on) .cmvp-chapter-label{opacity:0;transform:translateY(6px)}
html body .cmvp .cmvp-chapter-label{transition:opacity .5s ease .25s,transform .5s ease .25s}
.cmvp.chap-on:not(.is-idle) .cmvp-chapbar{transition-duration:.25s}
