:root {
  color-scheme: dark;
  --accent: #1ff1c8;
  --control-yellow: #f9c80e;
  --control-live: #d5260b;
  --danger: #ff9da3;
  --muted: #a9afb8;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  margin: 0;
  padding: 24px;
  background: #111;
  color: #f7f7f7;
  font-family: Arial, Helvetica, sans-serif;
}

.page {
  width: min(100%, 960px);
  margin: 0 auto;
}

.page-header {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.15;
}

.lede {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .34);
}

.bitmovin-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

/* Keep Bitmovin's playback and subtitle layers, replacing its stock controls. */
.bitmovin-player .bmpui-ui-controlbar,
.bitmovin-player .bmpui-ui-titlebar,
.bitmovin-player .bmpui-ui-settings-panel,
.bitmovin-player .bmpui-ui-dismiss-click-overlay {
  display: none !important;
}

.bitmovin-player .bmpui-ui-subtitle-overlay {
  color: var(--caption-color, #fff) !important;
  transform: translateY(var(--caption-position-shift, 0%)) !important;
  transition: transform .18s ease;
}

.bitmovin-player .bmpui-ui-subtitle-overlay .bmpui-ui-subtitle-label {
  font-size: calc(63.2% * var(--caption-scale, 1)) !important;
  font-family: var(--caption-font-family, Arial, Helvetica, sans-serif) !important;
}

.bitmovin-player .bmpui-ui-subtitle-overlay .bmpui-ui-subtitle-label .bmpui-ui-label-text {
  font-size: inherit !important;
}

.bitmovin-player .bmpui-ui-subtitle-overlay .bmpui-ui-subtitle-label {
  padding: .08em .25em;
  background: var(--caption-background, rgba(0, 0, 0, .8)) !important;
  color: var(--caption-color, #fff) !important;
  text-shadow: 0 1px 2px #000 !important;
}

/* CEA-608 labels can be individual character runs; padding each run creates gaps. */
.bitmovin-player .bmpui-ui-subtitle-overlay.bmpui-cea608 .bmpui-ui-subtitle-label {
  padding: 0 !important;
}

.player-frame[data-caption-edge="none"] .bmpui-ui-subtitle-overlay .bmpui-ui-subtitle-label {
  text-shadow: none !important;
}

.player-frame[data-caption-edge="drop-shadow"] .bmpui-ui-subtitle-overlay .bmpui-ui-subtitle-label {
  text-shadow: .08em .1em .12em rgba(0, 0, 0, .9) !important;
}

.player-frame[data-caption-edge="raised"] .bmpui-ui-subtitle-overlay .bmpui-ui-subtitle-label {
  text-shadow: -.06em -.06em 0 rgba(255, 255, 255, .75), .07em .07em 0 rgba(0, 0, 0, .9) !important;
}

.player-frame[data-caption-edge="depressed"] .bmpui-ui-subtitle-overlay .bmpui-ui-subtitle-label {
  text-shadow: .06em .06em 0 rgba(255, 255, 255, .75), -.07em -.07em 0 rgba(0, 0, 0, .9) !important;
}

.safari-caption-overlay {
  position: absolute;
  z-index: 25;
  right: 10%;
  bottom: 12%;
  left: 10%;
  pointer-events: none;
  text-align: center;
}

.safari-caption-overlay__text {
  display: inline-block;
  max-width: 100%;
  padding: .08em .25em;
  background: var(--caption-background, rgba(0, 0, 0, .8));
  color: var(--caption-color, #fff);
  font-family: var(--caption-font-family, Arial, Helvetica, sans-serif);
  font-size: calc(63.2% * var(--caption-scale, 1));
  line-height: 1.2;
  text-align: center;
  text-shadow: .08em .1em .12em rgba(0, 0, 0, .9);
  white-space: pre-line;
}

/* Hide browser-native cue rendering while the custom overlay is active. */
.player-frame:has(.safari-caption-overlay) video::cue {
  background-color: transparent !important;
  color: transparent !important;
  text-shadow: none !important;
}

/* Bitmovin's standard HTML subtitle layer would otherwise duplicate the cue. */
.player-frame:has(.safari-caption-overlay) .bmpui-ui-subtitle-overlay {
  display: none !important;
}

.player-frame[data-caption-edge="none"] .safari-caption-overlay__text {
  text-shadow: none;
}

.player-frame[data-caption-edge="raised"] .safari-caption-overlay__text {
  text-shadow: -.06em -.06em 0 rgba(255, 255, 255, .75), .07em .07em 0 rgba(0, 0, 0, .9);
}

.player-frame[data-caption-edge="depressed"] .safari-caption-overlay__text {
  text-shadow: .06em .06em 0 rgba(255, 255, 255, .75), -.07em -.07em 0 rgba(0, 0, 0, .9);
}

.apex-bitmovin-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  display: grid;
  min-height: 84px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 18px 40px;
  gap: 5px 12px;
  align-items: center;
  padding: 18px 16px 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .82) 24px, #000 32px, #000 100%);
  transition: opacity .18s ease, visibility 0s linear 0s;
}

.player-frame.controls-hidden {
  cursor: none;
}

.player-frame.controls-hidden .apex-bitmovin-controls {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, visibility 0s linear .18s;
}

.apex-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apex-control-left {
  grid-column: 1;
  grid-row: 2;
  height: 40px;
  min-width: 0;
}

.apex-control-right {
  grid-column: 2;
  grid-row: 2;
  height: 40px;
  justify-content: flex-end;
}

.apex-live-seek-row {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 1;
}

/* Live controls exported from Figma node 212:30115. */
.figma-live-controls {
  min-height: 86px;
  grid-template-rows: 14px 40px;
  gap: 12px 20px;
  padding: 8px 16px 12px;
}

.figma-live-controls .apex-control-group {
  gap: 20px;
}

.figma-live-controls .apex-live-seek-row {
  position: relative;
  height: 14px;
  align-items: center;
}

.figma-live-controls .apex-live-seek-row::before {
  position: absolute;
  right: 0;
  left: 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  content: '';
  pointer-events: none;
}

.figma-live-controls .apex-live-progress-visual {
  position: absolute;
  top: 4px;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--control-live);
  clip-path: inset(-4px 0 -4px 0);
  pointer-events: none;
}

.figma-live-controls .apex-live-progress-visual img {
  position: absolute;
  top: -4px;
  right: 0;
  display: block;
  width: 185px;
  height: 14px;
  max-width: none;
}

.figma-live-controls .apex-live-seek-control {
  position: relative;
  z-index: 2;
  height: 14px;
}

.figma-live-controls .apex-live-seek-control::-webkit-slider-runnable-track {
  background: transparent;
}

.figma-live-controls .apex-live-seek-control::-webkit-slider-thumb {
  background: transparent;
  box-shadow: none;
}

.figma-live-controls .apex-live-seek-control::-moz-range-track,
.figma-live-controls .apex-live-seek-control::-moz-range-progress,
.figma-live-controls .apex-live-seek-control::-moz-range-thumb {
  background: transparent;
  box-shadow: none;
}

.figma-live-controls .apex-live-indicator {
  min-height: 29px;
  gap: 10px;
  padding: 4px 10px;
  border-radius: 6.563px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .3828px;
}

.figma-live-controls .apex-live-indicator img {
  width: 12.06px;
  height: 8.86px;
}

.figma-live-controls .apex-live-programme {
  font-size: 13px;
  font-weight: 600;
}

.figma-live-controls .apex-figma-control-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.figma-live-controls .apex-figma-volume-icon,
.figma-live-controls .apex-captions-control img,
.figma-live-controls .apex-quality-control img {
  width: 24px;
  height: 24px;
}

/* Figma node 212:30132: active volume control. */
.figma-live-controls .apex-volume-popover {
  background: #22262a;
}

.player-frame.volume-open .figma-live-controls .apex-volume-popover {
  width: 100px;
  height: 40px;
  flex-basis: 100px;
  box-sizing: border-box;
  padding: 0 12px;
  background: #4e5358;
}

.player-frame.volume-open .figma-live-controls .apex-volume-popover .apex-bottom-mute,
.player-frame.volume-open .figma-live-controls .apex-volume-popover .apex-bottom-mute:hover:not(:disabled),
.player-frame.volume-open .figma-live-controls .apex-volume-popover .apex-bottom-mute:focus-visible {
  flex-basis: 24px;
  background: #4e5358;
}

.player-frame.volume-open .figma-live-controls .apex-volume-control,
.player-frame.volume-open .figma-live-controls .apex-volume-control input {
  width: 52px;
  min-width: 52px;
  padding: 0;
  background: transparent;
}

.figma-live-controls .apex-volume-control input {
  height: 8px;
}

.figma-live-controls .apex-volume-control input::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, #fff var(--volume-progress), rgba(255, 255, 255, .16) var(--volume-progress));
}

.figma-live-controls .apex-volume-control input::-webkit-slider-thumb {
  width: 8px;
  height: 8px;
  margin-top: -3px;
}

.figma-live-controls .apex-volume-control input::-moz-range-track,
.figma-live-controls .apex-volume-control input::-moz-range-progress {
  height: 2px;
}

.figma-live-controls .apex-volume-control input::-moz-range-track {
  background: rgba(255, 255, 255, .16);
}

.figma-live-controls .apex-volume-control input::-moz-range-thumb {
  width: 8px;
  height: 8px;
}

.apex-volume-label {
  position: absolute;
  bottom: 64px;
  left: 106px;
  z-index: 1;
  display: none;
  width: calc(min(42vw, 210px) - 62px);
  text-align: center;
}

.apex-volume-label > span {
  display: inline-block;
  padding: 2px 4px;
  background: #000;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
}

.player-frame.volume-open .apex-volume-label {
  display: block;
}

.apex-bitmovin-controls.is-vod {
  min-height: 86px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 18px 16px 8px;
}

.apex-bitmovin-controls.is-vod .apex-seek-row {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 1;
}

.apex-bitmovin-controls.is-vod .apex-live-seek-row {
  display: none;
}

.apex-bitmovin-controls.is-vod .apex-control-left {
  grid-column: 1;
  grid-row: 2;
}

.apex-bitmovin-controls.is-vod .apex-control-right {
  grid-column: 2;
  grid-row: 2;
}

/* SF VOD controls from Figma node 210:25681. */
.apex-bitmovin-controls.is-vod.figma-vod-controls {
  min-height: 86px;
  grid-template-rows: 14px 40px;
  gap: 12px 20px;
  padding: 8px 16px 12px;
}

.figma-vod-controls .apex-control-group {
  gap: 20px;
}

.figma-vod-controls .apex-live-indicator,
.figma-vod-controls .apex-live-programme {
  display: none;
}

.figma-vod-controls .apex-seek-row {
  height: 14px;
  align-items: center;
}

.figma-vod-controls .apex-seek-control {
  height: 14px;
}

.figma-vod-controls .apex-seek-control::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, var(--control-live) var(--seek-progress), rgba(255, 255, 255, .16) var(--seek-progress));
}

.figma-vod-controls .apex-seek-control::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -4px;
}

.figma-vod-controls .apex-seek-control::-moz-range-track,
.figma-vod-controls .apex-seek-control::-moz-range-progress {
  height: 6px;
}

.figma-vod-controls .apex-seek-control::-moz-range-thumb {
  width: 14px;
  height: 14px;
}

.figma-vod-controls .apex-play-control,
.figma-vod-controls.is-vod .apex-play-control {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #22262a;
}

.figma-vod-controls .apex-play-control:hover:not(:disabled),
.figma-vod-controls .apex-play-control:focus-visible {
  background: #4e5358;
}

.figma-vod-controls .apex-jump-control svg {
  width: 24px;
  height: 24px;
}

.figma-vod-controls .apex-time-display {
  font-size: 13px;
  font-weight: 600;
}

.figma-vod-controls .apex-captions-control img,
.figma-vod-controls .apex-quality-control img,
.figma-vod-controls .apex-figma-control-icon,
.figma-vod-controls .apex-figma-volume-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.apex-seek-control {
  --seek-progress: 0%;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.apex-live-seek-control {
  --seek-progress: 100%;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.apex-seek-control::-webkit-slider-runnable-track,
.apex-live-seek-control::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--control-live) var(--seek-progress),
    rgba(255, 255, 255, .38) var(--seek-progress)
  );
}

.apex-seek-control::-webkit-slider-thumb,
.apex-live-seek-control::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--control-live);
}

.apex-seek-control::-moz-range-track,
.apex-live-seek-control::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .38);
}

.apex-seek-control::-moz-range-progress,
.apex-live-seek-control::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--control-live);
}

.apex-seek-control::-moz-range-thumb,
.apex-live-seek-control::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--control-live);
}

.apex-seek-control:focus-visible,
.apex-live-seek-control:focus-visible {
  outline: 2px solid var(--control-live);
  outline-offset: 2px;
}

.apex-live-seek-control:disabled {
  cursor: default;
}

.apex-time-display {
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.apex-jump-control svg {
  width: 27px;
  height: 27px;
}

.apex-jump-control text {
  fill: currentColor;
  stroke: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7px;
  font-weight: 800;
}

.apex-bitmovin-controls.is-vod:not(.figma-vod-controls) .apex-play-control {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.apex-control-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #22262a;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition:
    background-color .15s ease,
    color .15s ease,
    opacity .15s ease,
    transform .15s ease;
}

.apex-control-button:hover:not(:disabled),
.apex-control-button:focus-visible {
  background: #4e5358;
  outline: none;
  transform: scale(1.05);
}

.apex-control-button:focus-visible {
  box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--control-yellow);
}

.apex-control-button:disabled {
  cursor: default;
  opacity: .42;
}

.apex-control-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.apex-control-button .speaker-fill,
.apex-control-button .solid {
  fill: currentColor;
  stroke: none;
}

.apex-figma-volume-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.icon-muted {
  gap: 2px;
}

.apex-figma-muted-x {
  width: 8px;
  height: 8px;
  object-fit: contain;
}

.apex-bottom-mute .icon-volume-full,
.apex-bottom-mute .icon-volume-half,
.apex-bottom-mute .icon-muted,
.apex-play-control[data-paused="true"] .icon-pause,
.apex-play-control[data-paused="false"] .icon-play {
  display: none;
}

.apex-bottom-mute[data-volume-level="full"] .icon-volume-full,
.apex-bottom-mute[data-volume-level="half"] .icon-volume-half,
.apex-bottom-mute[data-volume-level="muted"] .icon-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.apex-play-control {
  background: #22262a;
}

.apex-play-control svg {
  width: 24px;
  height: 24px;
}

.apex-volume-control {
  display: flex;
  width: 0;
  min-width: 0;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: width .18s ease, min-width .18s ease, opacity .12s ease, padding .18s ease;
}

.apex-volume-popover {
  display: flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #22262a;
  transition: width .2s ease, height .2s ease, background-color .2s ease;
}

.apex-volume-popover .apex-bottom-mute,
.apex-volume-popover .apex-bottom-mute:hover:not(:disabled),
.apex-volume-popover .apex-bottom-mute:focus-visible {
  flex: 0 0 40px;
  background: transparent;
}

.player-frame.volume-open .apex-volume-popover {
  width: min(42vw, 210px);
  height: 40px;
  flex-basis: min(42vw, 210px);
  background: #626870;
}

.player-frame.volume-open .apex-volume-popover .apex-bottom-mute,
.player-frame.volume-open .apex-volume-popover .apex-bottom-mute:hover:not(:disabled),
.player-frame.volume-open .apex-volume-popover .apex-bottom-mute:focus-visible {
  background: #626870;
}

.player-frame.volume-open .apex-volume-control,
.apex-volume-control:focus-within {
  width: calc(100% - 60px);
  min-width: 0;
  padding: 0 18px 0 4px;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  pointer-events: auto;
}

.player-frame.volume-open .apex-volume-control,
.player-frame.volume-open .apex-volume-control input {
  background-color: #626870;
}

.apex-volume-control input {
  --volume-progress: 75%;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  accent-color: #fff;
  cursor: pointer;
}

.apex-volume-control input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #fff var(--volume-progress), #626870 var(--volume-progress));
}

.apex-volume-control input::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.apex-volume-control input::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #626870;
}

.apex-volume-control input::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #fff;
}

.apex-volume-control input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.apex-captions-control[aria-expanded="true"],
.apex-quality-control[aria-expanded="true"] {
  background: #fff;
  color: #15181b;
}

.apex-live-indicator {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--control-live);
  color: #f3f3f4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.apex-live-indicator img {
  width: 13px;
  height: 9px;
  object-fit: contain;
}

.apex-live-programme {
  overflow: hidden;
  max-width: min(28vw, 220px);
  color: #f3f3f4;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apex-selector {
  position: static;
}

.apex-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 60;
  width: min(280px, calc(100vw - 36px));
  max-height: min(390px, calc(100vh - 110px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 4px;
  background: rgba(12, 12, 12, .98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
  color: #fff;
}

.apex-quality-menu {
  width: 190px;
  padding: 7px;
}

.apex-menu-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  background: #111;
  font-size: 13px;
}

.apex-menu-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.apex-menu-close:hover,
.apex-menu-close:focus-visible {
  background: rgba(255, 255, 255, .14);
  outline: none;
}

.apex-caption-tracks {
  padding: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.apex-menu-option {
  display: grid;
  width: 100%;
  min-height: 36px;
  grid-template-columns: 22px 1fr;
  align-items: center;
  padding: 7px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.apex-menu-option:hover,
.apex-menu-option:focus-visible {
  background: rgba(31, 241, 200, .14);
  outline: none;
}

.apex-option-check {
  color: var(--accent);
  opacity: 0;
}

.apex-menu-option[aria-checked="true"] .apex-option-check {
  opacity: 1;
}

.apex-caption-appearance {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px;
  border: 0;
}

.apex-caption-appearance legend {
  padding: 12px 0 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.apex-caption-appearance label {
  display: grid;
  grid-template-columns: 1fr 118px;
  align-items: center;
  gap: 10px;
  color: #d8dce2;
  font-size: 12px;
}

.apex-caption-appearance select {
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 3px;
  background: #242424;
  color: #fff;
}

.apex-caption-reset {
  width: calc(100% - 24px);
  min-height: 34px;
  margin: 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 3px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.apex-caption-reset:hover,
.apex-caption-reset:focus-visible {
  border-color: var(--accent);
  outline: none;
}

/* Figma-derived captions and settings panels. */
.apex-captions-control img,
.apex-quality-control img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 1;
}

.apex-captions-control img {
  width: 18px;
  height: 18px;
}

.apex-quality-control img {
  width: 20px;
  height: 20px;
}

.apex-captions-control[aria-expanded="true"] img,
.apex-quality-control[aria-expanded="true"] img {
  filter: brightness(0);
}

.apex-captions-control:disabled,
.apex-quality-control:disabled {
  opacity: 1 !important;
}

.apex-captions-control:disabled img,
.apex-quality-control:disabled img {
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}

.apex-captions-menu,
.apex-quality-menu {
  width: 25%;
  bottom: calc(100% + 16px);
  max-height: min(280px, calc(100vh - 72px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 78% 3%, rgba(213, 38, 11, .44), transparent 42%),
    radial-gradient(circle at 4% 0%, rgba(31, 106, 141, .38), transparent 37%),
    rgba(34, 38, 42, .97);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .62);
}

.apex-captions-menu {
  right: 70px;
  width: calc(25% + 50px);
  border-radius: 8px;
}

.apex-captions-menu.styles-open {
  width: calc(25% + 50px);
}

.apex-quality-menu {
  right: 26px;
  width: calc(25% + 50px);
}

.apex-panel-header {
  position: static;
  min-height: 38px;
  gap: 8px;
  justify-content: flex-start;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  font-size: 13px;
}

.apex-panel-header > img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.apex-panel-header > strong {
  font-weight: 700;
}

.apex-panel-header .apex-menu-close,
.apex-panel-header .apex-settings-close {
  display: grid;
  width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.apex-panel-header button svg,
.apex-submenu-header button svg,
.apex-settings-row svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.apex-caption-root {
  display: grid;
  min-height: 134px;
  grid-template-columns: 1fr 1fr;
}

.apex-caption-column,
.apex-audio-column {
  padding: 8px 12px;
}

.apex-audio-column {
  border-left: 1px solid rgba(255, 255, 255, .28);
}

.apex-panel-section-heading {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 16px;
}

.apex-caption-styles-open {
  min-height: 16px;
  margin-left: auto;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: #34383d;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.apex-captions-menu .apex-caption-tracks,
.apex-captions-menu .apex-audio-tracks {
  padding: 2px 0;
  border: 0;
}

.apex-captions-menu .apex-menu-option,
.apex-quality-menu .apex-menu-option {
  min-height: 20px;
  grid-template-columns: 13px 1fr;
  padding: 2px 6px;
  border-radius: 3px;
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
  font-weight: 700;
}

.apex-captions-menu .apex-menu-option[aria-checked="true"],
.apex-quality-menu .apex-menu-option[aria-checked="true"] {
  color: #fff;
}

.apex-captions-menu .apex-option-check,
.apex-quality-menu .apex-option-check {
  color: #fff;
  font-size: 8px;
}

.apex-empty-option {
  margin: 8px 6px;
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
}

.apex-caption-styles,
.apex-settings-panel,
.apex-settings-root {
  min-height: 120px;
}

.apex-submenu-header {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 16px;
}

.apex-submenu-header button {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.apex-caption-appearance {
  gap: 0;
  padding: 4px 12px;
}

.apex-caption-appearance label {
  min-height: 24px;
  grid-template-columns: 1fr minmax(72px, auto);
  border-bottom: 0;
  color: #fff;
  font-size: 13px;
}

.apex-caption-appearance select {
  min-height: 22px;
  border: 0;
  appearance: none;
  padding-right: 16px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 5 7 7-7 7' fill='none' stroke='%23ffffff' stroke-opacity='.72' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right center / 12px 12px;
  color: rgba(255, 255, 255, .62);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.apex-caption-appearance select option {
  font-size: 13px;
}

.apex-caption-reset {
  width: auto;
  min-height: 24px;
  margin: 0 12px 10px;
  padding: 0 8px;
  border-color: rgba(255, 255, 255, .45);
  border-radius: 7px;
}

.apex-settings-root {
  padding: 2px 0 8px;
}

.apex-settings-row {
  display: grid;
  width: 100%;
  min-height: 28px;
  grid-template-columns: 1fr auto 12px;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.apex-settings-row svg {
  width: 11px;
  height: 11px;
}

/* Figma nodes 212:30141, 212:30168, 212:30158, and 212:30163. */
.figma-live-controls .apex-captions-menu,
.figma-live-controls .apex-quality-menu {
  width: 330px;
  max-height: min(360px, calc(100vh - 72px));
  border: 0;
  border-radius: 8px;
  background: rgba(34, 38, 42, .73);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .45);
  backdrop-filter: blur(15px);
}

.figma-live-controls .apex-captions-menu,
.figma-live-controls .apex-captions-menu.styles-open {
  right: 70px;
  width: 330px;
}

.figma-live-controls .apex-quality-menu {
  right: 26px;
}

.figma-live-controls .apex-captions-menu:not(.styles-open) {
  height: 221px;
}

.figma-live-controls .apex-captions-menu.styles-open,
.figma-live-controls .apex-quality-menu:has(.apex-settings-panel:not([hidden])) {
  height: 221px;
}

.figma-live-controls .apex-quality-menu:has(.apex-settings-panel:not([hidden])) {
  height: 205px;
}

.figma-live-controls .apex-panel-header,
.figma-live-controls .apex-submenu-header {
  min-height: 44px;
  gap: 8px;
  padding: 10px 16px;
  border-bottom-color: rgba(255, 255, 255, .3);
  font-size: 14px;
}

.figma-live-controls .apex-panel-header > img,
.figma-live-controls .apex-figma-menu-icon,
.figma-live-controls .apex-submenu-header button {
  display: block;
  width: 24px;
  height: 24px;
}

.figma-live-controls .apex-panel-header > strong,
.figma-live-controls .apex-submenu-header > strong {
  font-weight: 600;
}

.figma-live-controls .apex-panel-header .apex-menu-close,
.figma-live-controls .apex-panel-header .apex-settings-close,
.figma-live-controls .apex-submenu-header button {
  width: 24px;
  height: 24px;
}

.figma-live-controls .apex-caption-root {
  min-height: 176px;
}

.figma-live-controls .apex-caption-column,
.figma-live-controls .apex-audio-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px;
}

.figma-live-controls .apex-audio-column {
  border-left-color: rgba(255, 255, 255, .3);
}

.figma-live-controls .apex-panel-section-heading {
  min-height: 20px;
  font-size: 13px;
  font-weight: 400;
}

.figma-live-controls .apex-caption-styles-open {
  min-height: 16px;
  padding: 3.019px 6.038px;
  border-radius: 3.019px;
  font-size: 9.06px;
  line-height: 1;
}

.figma-live-controls .apex-captions-menu .apex-caption-tracks,
.figma-live-controls .apex-captions-menu .apex-audio-tracks {
  display: grid;
  gap: 10px;
  padding: 0;
}

.figma-live-controls .apex-captions-menu .apex-menu-option {
  min-height: 20px;
  grid-template-columns: 20px 1fr;
  gap: 4px;
  padding: 0;
  font-size: 13px;
}

.figma-live-controls .apex-captions-menu .apex-option-check,
.figma-live-controls .apex-quality-menu .apex-option-check {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.figma-live-controls .apex-figma-selection-dot {
  display: block;
  width: 20px;
  height: 20px;
}

.figma-live-controls .apex-caption-styles {
  min-height: 221px;
}

.figma-live-controls .apex-caption-appearance {
  padding: 0;
}

.figma-live-controls .apex-caption-appearance label {
  min-height: 44px;
  grid-template-columns: 1fr minmax(90px, auto);
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
}

.figma-live-controls .apex-caption-appearance select {
  min-height: 24px;
  padding-right: 28px;
  background-image: url('./assets/figma-chevron-forward.svg');
  background-size: 24px 24px;
  color: rgba(255, 255, 255, .5);
  font-size: 13px;
}

.figma-live-controls .apex-caption-reset {
  margin: 4px 16px 12px;
}

.figma-live-controls .apex-settings-root {
  min-height: auto;
  padding: 0 0 8px;
}

.figma-live-controls .apex-settings-row {
  min-height: 44px;
  grid-template-columns: 1fr auto 24px;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
}

.figma-live-controls .apex-settings-row svg {
  width: 24px;
  height: 24px;
}

.figma-live-controls .apex-settings-summary {
  font-size: 13px;
}

.figma-live-controls .apex-settings-panel {
  min-height: 205px;
}

.figma-live-controls .apex-settings-panel .apex-menu-option {
  min-height: 40px;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 400;
}

.figma-live-controls .apex-settings-panel .apex-menu-option[aria-checked="true"] {
  font-weight: 600;
}

.apex-settings-summary {
  color: rgba(255, 255, 255, .56);
  font-size: 13px;
  font-weight: 700;
}

.apex-quality-menu .apex-submenu-header {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 16px;
}

.apex-quality-menu .apex-submenu-header button {
  width: 16px;
  height: 16px;
}

.apex-quality-menu .apex-menu-option {
  min-height: 26px;
  grid-template-columns: 13px 1fr;
  padding: 3px 12px;
  font-size: 13px;
}

/* Keep the Quality detail header on the Figma 24px icon / 14px title grid. */
.figma-live-controls .apex-quality-menu .apex-submenu-header {
  min-height: 44px;
  gap: 8px;
  padding: 10px 16px;
  border-bottom-color: rgba(255, 255, 255, .3);
  font-size: 14px;
}

.figma-live-controls .apex-quality-menu .apex-submenu-header button,
.figma-live-controls .apex-quality-menu .apex-submenu-header .apex-figma-menu-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.figma-live-controls .apex-quality-menu .apex-submenu-header > strong {
  line-height: 24px;
  font-weight: 600;
}

.figma-live-controls .apex-quality-menu [data-settings-view="speed"] .apex-submenu-header {
  min-height: 44px;
  gap: 8px;
  padding: 10px 16px;
  border-bottom-color: rgba(255, 255, 255, .3);
  font-size: 14px;
}

.figma-live-controls .apex-quality-menu [data-settings-view="speed"] .apex-submenu-header button,
.figma-live-controls .apex-quality-menu [data-settings-view="speed"] .apex-submenu-header .apex-figma-menu-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.figma-live-controls .apex-quality-menu [data-settings-view="speed"] .apex-submenu-header > strong {
  line-height: 24px;
  font-weight: 600;
}

.player-frame:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

#status {
  min-height: 20px;
  margin: 14px 0 0;
  color: #d8dce2;
  font-size: 14px;
  line-height: 1.4;
}

#status[data-kind="error"] {
  color: var(--danger);
}

.preview-badge {
  position: absolute;
  top: 17px;
  right: 18px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 4px;
  background: rgba(0, 0, 0, .82);
  pointer-events: none;
}

.preview-badge span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

#preview-countdown {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.expiry-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(5, 8, 12, .94);
  text-align: center;
}

.expiry-kicker {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.expiry-overlay h2 {
  max-width: 570px;
  margin: 0;
  font-size: clamp(21px, 4vw, 32px);
  line-height: 1.22;
}

.login-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 0 20px;
  border-radius: 3px;
  background: var(--accent);
  color: #071411;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.example-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 0;
  list-style: none;
}

.example-list a {
  display: block;
  min-height: 130px;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #1a1a1a;
  color: inherit;
  text-decoration: none;
}

.example-list a:hover,
.example-list a:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.example-list strong {
  color: var(--accent);
}

.example-list p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  .preview-badge {
    top: 12px;
    right: 10px;
  }

  .apex-bitmovin-controls {
    min-height: 92px;
    padding: 14px 10px 8px;
  }

  .apex-control-group {
    gap: 3px;
  }

  .apex-volume-control {
    display: none;
  }

  .apex-live-programme {
    display: none;
  }

  .apex-control-button {
    width: 34px;
    height: 34px;
  }

  .apex-play-control {
    width: 40px;
    height: 40px;
  }

  /* Figma node 212:30235: retain the full mobile live-control set. */
  .figma-live-controls {
    min-height: 86px;
    grid-template-rows: 14px 40px;
    gap: 12px 20px;
    padding: 8px 16px 12px;
  }

  .figma-live-controls .apex-control-button {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .figma-live-controls .apex-captions-control img {
    width: 18px;
    height: 18px;
  }

  .figma-live-controls .apex-quality-control img {
    width: 20px;
    height: 20px;
  }

  .figma-live-controls .apex-fullscreen-control .apex-figma-control-icon {
    width: 24px;
    height: 24px;
  }

  @media (max-width: 400px) {
    .figma-live-controls .apex-control-group {
      gap: 12px;
    }
  }

  .apex-bitmovin-controls.is-vod {
    min-height: 78px;
    padding: 12px 8px 6px;
  }

  .apex-bitmovin-controls.is-vod .apex-control-left {
    gap: 1px;
  }

  .apex-bitmovin-controls.is-vod .apex-time-display,
  .apex-bitmovin-controls.is-vod .apex-jump-control {
    display: none;
  }
}

/* Figma node 212:30357: phone portrait live controls. */
.apex-mobile-live-indicator {
  display: none;
}

@media (max-width: 640px) and (orientation: portrait) {
  .figma-live-controls {
    min-height: 118px;
    grid-template-rows: 20px 14px 40px;
    gap: 12px 20px;
    padding: 8px 16px 12px;
  }

  .figma-live-controls .apex-mobile-live-indicator {
    display: inline-flex;
    min-height: 20px;
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    justify-self: start;
    gap: 6.661px;
    padding: 2.665px 6.661px;
    border-radius: 6.563px;
    background: var(--control-live);
    color: #f3f3f4;
    font-size: 10.66px;
    font-weight: 500;
    letter-spacing: .3828px;
    line-height: 14.281px;
  }

  .figma-live-controls .apex-mobile-live-indicator img {
    width: 8.033px;
    height: 5.902px;
  }

  .figma-live-controls .apex-live-seek-row {
    grid-row: 2;
  }

  .figma-live-controls .apex-control-left,
  .figma-live-controls .apex-control-right {
    grid-row: 3;
    gap: 20px;
  }

  .figma-live-controls .apex-control-left .apex-live-indicator,
  .figma-live-controls .apex-control-left .apex-live-programme {
    display: none;
  }

  .figma-live-controls .apex-captions-menu,
  .figma-live-controls .apex-captions-menu.styles-open,
  .figma-live-controls .apex-quality-menu {
    top: auto;
    right: 16px;
    bottom: calc(100% - 32px);
    width: min(330px, calc(100vw - 32px));
    max-height: min(190px, calc(100dvh - 24px));
    overflow-y: auto;
  }

  .figma-live-controls .apex-captions-menu:not(.styles-open) {
    height: 190px;
  }

  .figma-live-controls .apex-captions-control:focus-visible,
  .figma-live-controls .apex-quality-control:focus-visible {
    outline: 0;
    box-shadow: none;
    transform: none;
  }

  .player-frame.volume-open .figma-live-controls .apex-volume-popover {
    width: 100px;
    height: 40px;
    flex-basis: 100px;
    padding: 0 12px;
    background: #4e5358;
  }

  .player-frame.volume-open .figma-live-controls .apex-volume-popover .apex-bottom-mute,
  .player-frame.volume-open .figma-live-controls .apex-volume-popover .apex-bottom-mute:hover:not(:disabled),
  .player-frame.volume-open .figma-live-controls .apex-volume-popover .apex-bottom-mute:focus-visible {
    flex-basis: 24px;
    background: #4e5358;
  }

  .player-frame.volume-open .figma-live-controls .apex-volume-control,
  .player-frame.volume-open .figma-live-controls .apex-volume-control input {
    display: flex;
    width: 52px;
    min-width: 52px;
    padding: 0;
    background: transparent;
  }
}
