
/* A screen of its own on every width, so the Trusted by band below never
   crowds it. Phones: small-viewport height (stable while the URL bar moves). */
.mel-film { position: relative; max-width: 1280px; margin: 0 auto; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; padding: 72px 16px 32px; }
.mel-film-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 18px; flex-wrap: wrap; }
.mel-film-lang { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 Poppins, system-ui, sans-serif; color: var(--mel-text-tertiary); }
.mel-film-lang select { appearance: none; -webkit-appearance: none; height: 32px; padding: 0 30px 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--mel-border-default); color: var(--mel-text-primary); font: 600 12.5px/1 Poppins, system-ui, sans-serif;
  background: var(--mel-surface-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.mel-film-lang select:focus-visible { outline: 2px solid #a99df7; outline-offset: 2px; }
.mel-film-title { margin: 0; font: 700 clamp(20px, 2vw, 26px)/1.2 Poppins, system-ui, sans-serif;
  letter-spacing: -.02em; color: var(--mel-text-primary); text-wrap: balance; }
/* Phones: the film sits high in its screen and the caption rail takes the
   room left below it (at least 170px, so a few lines always read). */
.mel-film-grid { display: grid; gap: 16px; flex: 1; grid-template-rows: auto minmax(170px, 1fr); }
@media (max-width: 1023px) {
  .mel-film { justify-content: flex-start; padding-top: clamp(116px, 17svh, 156px); }
  .mel-film-head { justify-content: center; text-align: center; }
}
@media (min-width: 1024px) {
  /* A full screen of its own (dynamic viewport) with the film centred, so the
     Trusted by / Secured by band below starts as its own piece. */
  .mel-film { min-height: 100dvh; padding: 72px 24px 64px; }
  .mel-film-grid { flex: none; grid-template-rows: none; grid-template-columns: minmax(0, 1fr) clamp(280px, 27vw, 360px); gap: clamp(28px, 3vw, 44px); }
}

/* Neomorphic tile: the screen sits inset in a raised surface (soft light
   edge top-left, soft drop shadow bottom-right). No hard border. */
.mel-film-frame { position: relative; padding: clamp(8px, 1vw, 12px); border-radius: 26px;
  background: var(--mel-surface-card, #12141f);
  box-shadow: -8px -8px 20px rgba(255,255,255,.035), 14px 18px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05); }
.mel-film-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #FAFCFE; }
.mel-film-screen video, .mel-film-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mel-film-poster { transition: opacity .5s ease; pointer-events: none; }
.mel-film[data-started="1"] .mel-film-poster { opacity: 0; }
.mel-film-play { position: absolute; inset: 0; display: grid; place-items: end start; padding: clamp(14px, 2vw, 24px);
  background: linear-gradient(0deg, rgba(3,4,10,.55), transparent 45%); border: 0; cursor: pointer; color: #fff; }
.mel-film-play-pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px;
  background: rgba(10,12,24,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.18); font: 600 14px/1 Poppins, system-ui, sans-serif;
  transition: transform .2s ease, background .2s ease; }
.mel-film-play:hover .mel-film-play-pill, .mel-film-play:focus-visible .mel-film-play-pill { transform: translateY(-2px); background: rgba(124,111,240,.55); }
.mel-film-play:focus-visible { outline: 2px solid #a99df7; outline-offset: -4px; border-radius: 18px; }
.mel-film-play-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #111; }
.mel-film-play-time { font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: .75; font-variant-numeric: tabular-nums; }

/* Transcript rail: a teleprompter beside the frame on wide screens, the same
   teleprompter under it on phones (filling the grid row below the film). */
.mel-film-rail { display: block; position: relative; }
/* Absolutely filled: the rail takes the frame's height, never the list's. */
.mel-film-rail-view { position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 70%, transparent 100%); }
.mel-film-rail-view::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--mel-border-default) 20%, var(--mel-border-default) 80%, transparent); }
.mel-film-cues { list-style: none; margin: 0; padding: 0; will-change: transform;
  transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.mel-film-cue > button { position: relative; display: block; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 7px 0 7px 22px; color: var(--mel-text-muted); font: 500 14px/1.45 Poppins, system-ui, sans-serif;
  transition: color .45s ease, opacity .45s ease; }
.mel-film-cue > button:hover { color: var(--mel-text-secondary); }
.mel-film-cue > button:focus-visible { outline: 2px solid #a99df7; outline-offset: 2px; border-radius: 6px; }
.mel-film-cue[data-s="past"] > button { opacity: .45; }
.mel-film-cue[data-s="now"] > button { color: var(--mel-text-primary); font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.mel-film-cue[data-s="now"] > button::before { content: ""; position: absolute; left: 1px; top: .95em; width: 9px; height: 9px; border-radius: 50%;
  background: #a99df7; box-shadow: 0 0 0 4px rgba(169,157,247,.18), 0 0 14px 2px rgba(169,157,247,.7); }
.mel-film-cue-bar { position: absolute; left: 22px; right: 0; bottom: 2px; height: 1px; background: currentColor; opacity: .35;
  transform-origin: left; transform: scaleX(0); animation: mel-film-cue var(--d, 2s) linear forwards; }
.mel-film:not([data-playing="1"]) .mel-film-cue-bar { animation-play-state: paused; }
@keyframes mel-film-cue { to { transform: scaleX(1); } }
.mel-film-chapter { padding: 16px 0 4px 22px; font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--mel-text-tertiary); display: flex; gap: 10px; }
.mel-film-chapter time { opacity: .6; font-variant-numeric: tabular-nums; }

html.light .mel-film-frame, html[data-theme="light"] .mel-film-frame {
  background: var(--mel-surface-card, #f4f6fb);
  box-shadow: -10px -10px 24px rgba(255,255,255,.9), 14px 18px 36px rgba(30,58,138,.16), inset 0 1px 0 rgba(255,255,255,.8); }
html.light .mel-film-cue[data-s="now"] > button::before, html[data-theme="light"] .mel-film-cue[data-s="now"] > button::before {
  background: #6D28D9; box-shadow: 0 0 0 4px rgba(109,40,217,.14); }

/* Home: the small link to the film's own watch page, beside the Audio menu. */
.mel-film-head-tools { display: inline-flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; justify-content: center; }
.mel-film-watch-link { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1 Poppins, system-ui, sans-serif;
  color: var(--mel-text-secondary); text-decoration: none; transition: color .15s ease; }
.mel-film-watch-link:hover { color: var(--mel-text-primary); text-decoration: underline; text-underline-offset: 3px; }
.mel-film-watch-link:focus-visible { outline: 2px solid #a99df7; outline-offset: 3px; border-radius: 4px; }

/* Watch page (/<lang>/launch-film): the film opens the page, so no full
   screen of its own, no title row (the page H1 sits right under it). */
.mel-film.mel-film--watch { min-height: 0; justify-content: flex-start; padding: 92px 16px 8px; }
.mel-film--watch .mel-film-head { justify-content: flex-end; margin-bottom: 12px; }
@media (min-width: 1024px) {
  .mel-film.mel-film--watch { min-height: 0; padding: 100px 24px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .mel-film-cues, .mel-film-cue > button, .mel-film-poster { transition: none; }
  .mel-film-cue-bar { display: none; }
}
