/* CaseModel website - css/p-film.css
   The nine-minute briefing, wherever it is met: its own section on the overview (the player, its cover and living picture,
   the words beneath, the fifteen chapters), the head of each feature page (that page's part), "Play this part" under a
   section's heading and on the overview's cards, the pill in the header, the corner, and the theatre.
   One player per page (#player, in js/film.js) is moved between its frame, the corner (.docked) and the theatre (.theatre)
   by a class. On the page it sits on the page's own light ground, as the film itself does. Only the theatre is navy. */

:root {
  --fm-gut: clamp(16px, 4vw, 56px);                 /* the theatre: room at the sides, above and below the picture */
  --fm-top: 72px; --fm-low: 84px;
  --fm-vh: 100vh;
  --fm-tw: min(calc(100vw - 2 * var(--fm-gut)), calc((var(--fm-vh) - var(--fm-top) - var(--fm-low) - 16px) * 16 / 9), 1680px);
  --fm-ty: calc(var(--fm-top) + (var(--fm-vh) - var(--fm-top) - var(--fm-low) - var(--fm-tw) * 9 / 16) / 2);
  --fm-dw: min(380px, calc(100vw - 36px));           /* the corner: how wide, and how far it is lifted over what is already there */
  --fm-dx: 18px; --fm-bar: 40px;
  --fm-lift: 0px;
  --fm-foot: calc(var(--fm-dx) + var(--fm-lift) + env(safe-area-inset-bottom, 0px));
}
@supports (height: 100dvh) { :root { --fm-vh: 100dvh; } }

/* ---- the overview's own section, directly under the hero, on the page's own ground. The player is as wide as the page
   allows and never taller than the window leaves room for: the heading, the player, its words and the chapters share
   that one width. ---- */
#film { --fm-fw: min(var(--wrap), max(560px, calc((100vh - 240px) * 16 / 9))); }
@supports (height: 100svh) { #film { --fm-fw: min(var(--wrap), max(560px, calc((100svh - 240px) * 16 / 9))); } }
#film.film { padding: clamp(36px, 5vw, 76px) 0 clamp(68px, 8.4vw, 128px); background: none; color: var(--text); overflow: visible; }
#film.film::before { content: none; }
#film > .wrap { max-width: calc(var(--fm-fw) + var(--gut) * 2); }
#film .film-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: end; gap: 14px clamp(28px, 4.4vw, 72px); max-width: none; margin: 0 0 clamp(22px, 2.6vw, 34px); text-align: left; }
#film .film-head .eyebrow { justify-content: flex-start; margin-bottom: 16px; }
#film h2 { color: var(--brand-navy); font-size: clamp(30px, 3.1vw, 44px); line-height: 1.05; letter-spacing: -0.034em; }
#film .sub { max-width: 34em; margin: 0; color: var(--text-2); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.5; }
#film .film-frame { max-width: none; margin: 0; }
@media (max-width: 860px) {
  #film .film-head { grid-template-columns: 1fr; }
  #film .sub { max-width: 40em; }
}

/* ---- the player, on the light page: a hairline, a soft shadow, the film's own white ground ---- */
#player { border: 1px solid rgb(0 40 96 / .13); background: #ffffff; box-shadow: 0 30px 80px rgb(0 40 96 / .14), 0 2px 6px rgb(0 40 96 / .05); }
#player video { background: #ffffff; }
.pl-poster, .pl-art { pointer-events: none; }                                   /* a press on the picture reaches the picture */
/* the holding picture, while the film is looked for or is not there yet */
#player .pl-art { background: radial-gradient(80% 90% at 50% 40%, var(--sky-3), #ffffff 75%); }
#player .pl-art::before { background-image: linear-gradient(rgb(0 40 96 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(0 40 96 / .05) 1px, transparent 1px); }
#player .pl-art img { width: 30%; }
#player .pl-art b { color: var(--brand-navy); }
#player .pl-art .dot { background: var(--brand-azure); }
#player .pl-art .tw { background: var(--brand-sky); animation: fm-tw var(--t, 2s) var(--d, 0s) 1 both; }
@keyframes fm-tw { from { opacity: 0; } to { opacity: var(--a, .5); } }
#player .pl-soon { color: var(--azure-11); }
/* the play mark in the middle of the picture is for a briefing that has started and is paused; before that, the cover */
#player .pl-big { transition: transform .3s var(--spring), opacity .3s, visibility 0s; box-shadow: 0 14px 40px rgb(0 40 96 / .28), 0 0 0 1px rgb(0 40 96 / .1); }
#player .pl-big::after { animation: none; border-color: var(--brand-azure); }
#player:not(.started) .pl-big { display: none; }
#player.theatre:not(.started) .pl-big, #player.docked:not(.started) .pl-big { display: block; }
#player.playing .pl-big, #player.ended .pl-big, #player.waiting .pl-big, #player.fm-pended .pl-big { visibility: hidden; transition: transform .3s var(--spring), opacity .3s, visibility 0s .3s; }
.fm-wait { position: absolute; left: 50%; top: 50%; display: none; gap: 6px; transform: translate(-50%, -50%); pointer-events: none; }
.player.waiting .fm-wait { display: flex; }
.fm-wait i { width: 10px; height: 10px; background: var(--brand-navy); animation: fm-wait 1s var(--ease) infinite; }
.fm-wait i:nth-child(2) { background: var(--brand-azure); animation-delay: .14s; }
.fm-wait i:nth-child(3) { background: var(--brand-sky); animation-delay: .28s; }
@keyframes fm-wait { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-5px); } }
.fm-fail { position: absolute; left: 0; right: 0; top: 50%; margin: 0; padding: 14px 8%; background: rgb(255 255 255 / .92); color: var(--brand-navy); font: 600 15px/1.4 var(--font-display); text-align: center; transform: translateY(-50%); }
/* the controls sit on a shade of their own, over whatever the picture is; they show whenever one of them has the focus */
#player .pl-bar { z-index: 2; }
#player:focus-within .pl-bar { opacity: 1; }
.pl-bar .pl-large svg { width: 21px; height: 21px; }
#player.theatre .pl-large, #player.docked .pl-large { display: none; }
/* the end of the whole briefing: it closes on white, and so does the card that follows it */
#player .pl-end { z-index: 1; gap: clamp(14px, 2vw, 24px); padding: 0 6%; background: rgb(255 255 255 / .9); }
#player .pl-end b { color: var(--brand-navy); text-wrap: balance; }
#player .pl-end .btn svg, .fm-pend-b .btn svg { width: 15px; height: 15px; margin-left: -2px; fill: currentColor; }
.player.ended .pl-bar { background: linear-gradient(transparent, rgb(0 40 96 / .66)); }
/* the end of a feature page's own part: what it was, then the next page, the part again, or the whole briefing */
#player .fm-pend { position: absolute; inset: 0; z-index: 1; display: none; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 22px); padding: 0 6% 40px; background: rgb(255 255 255 / .93); text-align: center; }
#player.fm-pended .fm-pend { display: flex; }
.fm-pend-k { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; }
.fm-pend-k b { color: var(--brand-navy); font: 800 clamp(20px, 2.3vw, 30px)/1.1 var(--font-display); letter-spacing: -0.03em; text-wrap: balance; }
.fm-pend-k span { color: var(--text-3); font: 500 13px/1.35 var(--font-mono); }
.fm-pend-b { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.fm-pend-next svg { margin: 0 -3px 0 0 !important; }

/* ---- the cover: what the frame shows before its briefing plays. The whole picture is one control; its plate, at the
   foot of the picture, says what it plays and for how long ---- */
.film-frame > .fm-cover { position: absolute; inset: 0; z-index: 3; display: none; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: var(--r-3); background: none; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.film-frame.fm-cov > .fm-cover { display: block; }
.fm-cover:focus-visible { outline-offset: 5px; }
.fm-cover[disabled] { cursor: default; }
.fm-cover-c { position: absolute; left: clamp(12px, 1.7vw, 24px); right: clamp(12px, 1.7vw, 24px); bottom: clamp(12px, 1.7vw, 24px); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; pointer-events: none; }
.fm-plate { display: flex; align-items: stretch; max-width: 100%; border-radius: var(--r-2); background: #ffffff; box-shadow: 0 14px 36px rgb(0 40 96 / .16), 0 0 0 1px rgb(0 40 96 / .1); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.fm-go { position: relative; flex: none; display: grid; place-items: center; width: 58px; min-height: 58px; border-radius: var(--r-2) 0 0 var(--r-2); background: var(--brand-navy); color: #ffffff; transition: background .18s var(--ease); }
.fm-go svg { width: 20px; height: 20px; margin-left: 3px; fill: currentColor; }
/* the play mark calls three times, the first time the frame is seen, and then rests */
.fm-go::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--brand-azure); border-radius: inherit; opacity: 0; pointer-events: none; }
.film-frame.fm-seen .fm-go::after { animation: ring 2.4s var(--ease) .6s 3; }
.fm-plate-w { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding: 9px 20px 10px 16px; }
.fm-plate-w b { color: var(--brand-navy); font: 700 17px/1.25 var(--font-display); letter-spacing: -0.012em; }
.fm-plate-k { color: var(--azure-11); font: 700 11px/1.2 var(--font-display); letter-spacing: .09em; text-transform: uppercase; }
.fm-plate-l { color: var(--text-3); font: 500 13px/1.3 var(--font-mono); }
.fm-cover:hover .fm-go, .fm-cover:focus-visible .fm-go { background: var(--azure-10); }
.fm-cover:hover .fm-plate { transform: translateY(-2px); box-shadow: 0 18px 44px rgb(0 40 96 / .2), 0 0 0 1px rgb(0 40 96 / .12); }
[data-state="empty"] .fm-go { display: none; }
[data-state="empty"] .fm-plate-l { color: var(--azure-11); font: 600 13.5px/1.3 var(--font-display); }
/* "Open it large", over the cover's corner, on the overview */
.film-frame > .fm-cover-th { position: absolute; right: clamp(12px, 1.7vw, 24px); top: clamp(12px, 1.7vw, 24px); z-index: 4; display: none; align-items: center; gap: 9px; height: 38px; padding: 0 13px 0 11px;
  border: 1px solid rgb(0 40 96 / .14); border-radius: var(--r-2); background: rgb(255 255 255 / .9); color: var(--brand-navy); font: 700 13px/1 var(--font-display); white-space: nowrap; cursor: pointer;
  box-shadow: var(--shadow-1); transition: border-color .15s, color .15s, background .15s; }
.film-frame.fm-cov > .fm-cover-th { display: inline-flex; }
.fm-cover-th svg { width: 17px; height: 17px; fill: currentColor; }
.fm-cover-th:hover { border-color: var(--brand-azure); background: #ffffff; color: var(--azure-11); }
[data-state="empty"] .fm-cover-th, [data-state="probing"] .fm-cover-th { display: none !important; }
/* the overview's living picture: the opening, without sound, over the still; at its end, its last frame held under a light
   veil, with one quiet line over the plate */
.film-frame > .fm-open { position: absolute; inset: 1px; z-index: 1; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: cover; border-radius: var(--r-2); background: #ffffff; opacity: 0; pointer-events: none; transition: opacity .9s var(--ease); }
.film-frame.fm-cov.is-on > .fm-open { opacity: 1; }
.film-frame > .fm-hold { position: absolute; inset: 1px; z-index: 2; border-radius: var(--r-2); background: rgb(255 255 255 / .42); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .7s var(--ease), visibility 0s .7s; }
.film-frame.fm-cov.is-over > .fm-hold { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.film-frame.fm-done > .fm-open, .film-frame.fm-done > .fm-hold { display: none; }
.fm-over-c { display: block; max-width: 100%; padding: 9px 15px; border-radius: var(--r-2); background: #ffffff; color: var(--brand-navy); font: 700 16px/1.3 var(--font-display); letter-spacing: -0.012em; box-shadow: var(--shadow-2), 0 0 0 1px rgb(0 40 96 / .08);
  opacity: 0; transform: translateY(6px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.film-frame.is-over .fm-over-c { opacity: 1; transform: none; }
/* while the player is in the corner or the theatre its frame shows its picture, faint, inside a dashed line; nothing about
   the frame may hold the player back */
.film-frame.fm-out { opacity: 1 !important; transform: none !important; transition: none !important; border-radius: var(--r-3); background: var(--sky-2) var(--fm-pic, none) center / cover no-repeat; }
.film-frame.fm-out::before { content: ''; position: absolute; inset: 0; border: 1px dashed var(--slate-7); border-radius: var(--r-3); background: rgb(255 255 255 / .76); }
.film-frame.fm-out.fm-cov::before { content: none; }
/* what the opening says, as it says it, beneath the picture: each word comes up at its moment */
#film .fm-said { min-height: 2.9em; max-width: 46em; margin: 18px 0 0; color: var(--brand-navy); font: 400 italic clamp(16.5px, 1.3vw, 19px)/1.45 var(--font-serif); text-wrap: pretty; }
#film .fm-said.swap { animation: fm-swap .3s var(--ease) both; }
@keyframes fm-swap { from { opacity: 0; transform: translateY(4px); } }
#film .fm-said .w { opacity: .26; transition: opacity .28s linear; }
#film .fm-said .w.on { opacity: 1; }
#film .fm-said.fm-gone { visibility: hidden; }

/* ---- a feature page's head: its part of the briefing, over the still of the part's first chapter ---- */
.ph-film.fm-ph > .fig-fb { display: none; }
.ph-film .film-frame { width: 100%; max-width: none; margin: 0; }
.fm-ph .film-frame > .fm-cover { background: var(--sky-3) var(--fm-pic, none) center / cover no-repeat; box-shadow: inset 0 0 0 1px rgb(0 40 96 / .13); }
.fm-ph .fm-cover-c { right: auto; max-width: calc(100% - 2 * clamp(12px, 1.7vw, 24px)); }
.fm-ph .fm-plate-w b { font-size: 16.5px; }
.fm-ph #player { box-shadow: 0 24px 60px rgb(0 40 96 / .13), 0 2px 6px rgb(0 40 96 / .05); }

@media (max-width: 1020px) {
  #film .fm-said { font-size: 16.5px; }
}
@media (max-width: 640px) {
  /* a phone: the overview's player runs edge to edge, the largest thing the screen can hold */
  #film .film-frame { margin: 0 calc(var(--gut) * -1); }
  #film .film-frame:not(.fm-out) > #player, #film .film-frame > .fm-cover, #film .film-frame.fm-out, #film .film-frame.fm-out::before { border-radius: 0; }
  #film .film-frame:not(.fm-out) > #player { border-left-width: 0; border-right-width: 0; }
  #film .film-frame > .fm-open, #film .film-frame > .fm-hold { inset: 1px 0; width: 100%; border-radius: 0; }
  .film-frame > .fm-cover-th, #player .pl-large { display: none !important; }
  .fm-cover-c { gap: 8px; }
  .fm-go { width: 46px; min-height: 46px; }
  .fm-go svg { width: 17px; height: 17px; }
  .fm-plate-w { gap: 3px; padding: 7px 14px 8px 12px; }
  .fm-plate-w b, .fm-ph .fm-plate-w b { font-size: 15.5px; }
  .fm-plate-l { font: 600 14px/1.3 var(--font-ui); }
  .fm-over-c { padding: 7px 12px; font-size: 15px; }
  #film .fm-said { min-height: 4.35em; margin-top: 14px; font-size: 16px; }
  #player .fm-pend { gap: 10px; padding: 0 12px 38px; }
  .fm-pend-k b { font-size: 18px; }
  .fm-pend-k span { display: none; }
  .fm-pend-b { gap: 6px; }
  .fm-pend-b .btn { height: 40px; padding: 0 12px; font-size: 13.5px; }
}

/* ---- the pill in the header. Its mark comes first and is 14 px wide where it sits; the page's own styles may let the
   words go and keep the mark. ---- */
:where(.film-pill) { display: inline-flex; }
.film-pill { align-items: center; gap: 13px; height: 40px; padding: 0 14px 0 12px; border: 1px solid var(--slate-6); border-radius: var(--r-2); background: rgb(255 255 255 / .82); color: var(--brand-navy);
  font: 600 13.5px/1 var(--font-display); letter-spacing: -0.005em; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s; }
.film-pill:hover { border-color: var(--brand-azure); background: #ffffff; }
.fm-ring { position: relative; flex: none; width: 14px; height: 14px; }
.fm-ring svg { position: absolute; left: -4px; top: -4px; width: 22px; height: 22px; max-width: none; overflow: visible; }
.fm-ring .tr { fill: none; stroke: var(--azure-6); stroke-width: 2; }
.fm-ring .on { fill: none; stroke: var(--brand-azure); stroke-width: 2.5; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .4s linear; }
.fm-ring .go { fill: var(--brand-navy); transition: fill .15s; }
.fm-ring .live { display: none; fill: var(--brand-azure); }
.film-pill:hover .fm-ring .go { fill: var(--azure-10); }
.film-pill[data-state="playing"] .fm-ring .go { display: none; }
.film-pill[data-state="playing"] .fm-ring .live { display: block; }
.fm-pill-w { display: inline-flex; align-items: baseline; min-width: 132px; }
.fm-pill-w b { font-weight: 700; }
.fm-pill-w span { color: var(--text-3); font: 500 12.5px/1 var(--font-mono); font-variant-numeric: tabular-nums; white-space: pre; }
.film-pill[data-state="playing"] .fm-pill-w span, .film-pill[data-state="resume"] .fm-pill-w span { color: var(--azure-11); }

/* ---- "Play this part", under a section's heading and on the overview's cards ---- */
:where(.cue-film) { display: inline-flex; }
.cue-film { align-items: center; gap: 13px; min-height: 64px; max-width: 100%; padding: 7px 18px 7px 7px; border: 1px solid var(--slate-6); border-radius: var(--r-3); background: rgb(255 255 255 / .94); color: var(--brand-navy);
  text-align: left; cursor: pointer; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .2s var(--ease), background .2s; }
.cue-film:hover { border-color: var(--brand-azure); box-shadow: var(--shadow-2); }
.cue-film[data-state="on"], .cue-film[data-state="held"] { border-color: var(--brand-azure); background: var(--sky-3); }
.fm-cue-pic { position: relative; flex: none; width: 92px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-1); background: var(--sky-4); box-shadow: 0 0 0 1px var(--slate-5); }
.fm-cue-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fm-cue-pic.no-pic::before { content: attr(data-n); position: absolute; right: 7px; top: 6px; color: var(--azure-11); font: 500 12.5px/1 var(--font-mono); }
.fm-cue-go { position: absolute; left: 5px; bottom: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-1); background: var(--brand-navy); color: #ffffff; transition: background .15s, transform .25s var(--spring); }
.fm-cue-go svg { width: 11px; height: 11px; fill: currentColor; }
.fm-cue-go .i-play { margin-left: 1px; }
.fm-cue-go .i-pause, .cue-film[data-state="on"] .fm-cue-go .i-play { display: none; }
.cue-film[data-state="on"] .fm-cue-go .i-pause { display: block; }
.cue-film:hover .fm-cue-go { background: var(--azure-10); transform: scale(1.1); }
.cue-film[data-state="on"] .fm-cue-go, .cue-film[data-state="held"] .fm-cue-go { background: var(--azure-10); }
.fm-cue-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.fm-cue-bar i { display: block; height: 100%; background: var(--brand-azure); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s linear; }
.fm-cue-w { display: block; min-width: 0; }
.fm-cue-w b { display: block; color: var(--brand-navy); font: 700 14.5px/1.25 var(--font-display); letter-spacing: -0.01em; }
.fm-cue-w > span { display: block; margin-top: 3px; color: var(--text-2); font: 500 13.5px/1.3 var(--font-display); }
.fm-cue-w i { margin-left: 7px; padding-left: 8px; border-left: 1px solid var(--slate-6); color: var(--text-3); font: 500 12.5px/1 var(--font-mono); font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cue-film[data-state="on"] .fm-cue-w i, .cue-film[data-state="held"] .fm-cue-w i { color: var(--azure-11); }
/* on the overview's cards the cue is the card's picture (its box is the card's): the still fills it, and a small plate at its
   foot says what pressing it does and for how long. The card's own title names the part. */
.cue-film.wd-play .fm-cue-pic { position: absolute; inset: 0; width: auto; aspect-ratio: auto; border-radius: inherit; box-shadow: none; }
.cue-film.wd-play .fm-cue-pic.no-pic::before { right: 12px; top: 10px; font-size: 14px; }
.cue-film.wd-play .fm-cue-go { left: 10px; bottom: 10px; z-index: 1; width: 36px; height: 36px; border-radius: var(--r-2) 0 0 var(--r-2); }
.cue-film.wd-play .fm-cue-go svg { width: 13px; height: 13px; }
.cue-film.wd-play:hover .fm-cue-go { transform: none; }
.cue-film.wd-play .fm-cue-w { position: absolute; left: 46px; bottom: 10px; display: flex; align-items: center; max-width: calc(100% - 56px); height: 36px; padding: 0 12px;
  border-radius: 0 var(--r-2) var(--r-2) 0; background: #ffffff; box-shadow: 0 6px 18px rgb(0 40 96 / .14), 0 0 0 1px rgb(0 40 96 / .1); white-space: nowrap; }
.cue-film.wd-play .fm-cue-w b { font-size: 13.5px; }
.cue-film.wd-play .fm-cue-w > span { display: inline-flex; margin: 0; }
.cue-film.wd-play .fm-cue-l { display: none; }
.cue-film.wd-play .fm-cue-bar { height: 4px; }
@media (max-width: 640px) {
  .fm-cue-pic { width: 100px; }
  .fm-cue-pic.no-pic::before { font-size: 14px; }
  .cue-film.wd-play .fm-cue-w b { font-size: 14px; }
  .fm-cue-w b { font-size: 15.5px; }
  .fm-cue-w > span { font-size: 14px; }
  .fm-cue-w i { font-size: 14px; font-family: var(--font-ui); font-weight: 600; }
}

/* ---- the overview's chapters, under the player: each a tile that plays here, with the way to the page that holds it ---- */
.film-chapters.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(204px, 100%), 1fr)); justify-content: stretch; gap: 24px 16px; max-width: none; margin: clamp(26px, 3vw, 40px) 0 0; }
.fm-route-note:not([hidden]) + .film-chapters.fm-grid { margin-top: 16px; }
.film-chapters.fm-grid > li { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.film-chapters.fm-grid .fm-tile { display: block; width: 100%; height: auto; padding: 0; border: 0; border-radius: var(--r-2); background: none; color: var(--brand-navy); font: inherit; text-align: left; cursor: pointer; }
.film-chapters.fm-grid .fm-tile:hover, .film-chapters.fm-grid .fm-tile.now { border: 0; background: none; }
.film-chapters.fm-grid .fm-tile:focus-visible { outline-offset: 5px; }
:where(.fm-tile) i, :where(.fm-tile) em { display: block; font-style: normal; }
.fm-tile-pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-2); background: var(--sky-3); box-shadow: 0 0 0 1px rgb(0 40 96 / .12); transition: box-shadow .2s, transform .3s var(--ease); }
.fm-tile-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fm-tile-pic.no-pic::before { content: attr(data-n); position: absolute; left: 12px; top: 10px; color: var(--azure-11); font: 500 20px/1 var(--font-mono); }
.fm-tile:hover .fm-tile-pic { box-shadow: 0 0 0 2px var(--brand-azure), var(--shadow-2); transform: translateY(-3px); }
.fm-tile.now .fm-tile-pic { box-shadow: 0 0 0 3px var(--brand-azure); }
.fm-tile-go { position: absolute; left: 8px; bottom: 9px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-1); background: var(--brand-navy); color: #ffffff; transition: background .15s, transform .25s var(--spring); }
.fm-tile-go svg { width: 12px; height: 12px; margin-left: 1px; fill: currentColor; }
.fm-tile:hover .fm-tile-go, .fm-tile.now .fm-tile-go { background: var(--azure-10); }
.fm-tile:hover .fm-tile-go { transform: scale(1.1); }
.fm-tile-len { position: absolute; right: 8px; bottom: 9px; padding: 4px 6px; border-radius: var(--r-1); background: rgb(255 255 255 / .94); color: var(--brand-navy); font: 500 11.5px/1 var(--font-mono); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 1px rgb(0 40 96 / .12); }
.fm-tile-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.fm-tile-bar i { height: 100%; background: var(--brand-azure); transform: scaleX(0); transform-origin: 0 50%; }
.fm-tile-w { display: flex; align-items: baseline; gap: 9px; margin-top: 11px; }
.fm-tile-w b { flex: none; color: var(--azure-11); font: 500 12.5px/1.3 var(--font-mono); }
.fm-tile-w em { color: var(--brand-navy); font: 600 14.5px/1.3 var(--font-display); letter-spacing: -0.005em; text-wrap: balance; }
.fm-tile:hover .fm-tile-w em { color: var(--azure-11); }
.fm-tile-r { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--azure-11); font: 700 11px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.fm-tile-r b { flex: none; width: 17px; height: 17px; background: var(--brand-azure); color: #ffffff; font: 700 11px/17px var(--font-display); letter-spacing: 0; text-align: center; }
/* the way to the page that holds the chapter */
.fm-tile-page { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; margin: auto 0 0; padding-top: 3px; color: var(--azure-11); font: 600 13px/1.2 var(--font-display); text-decoration: none; }
.fm-tile-page::after { content: ''; flex: none; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); }
.fm-tile-page:hover { color: var(--azure-12); text-decoration: underline; }
.fm-tile-page:hover::after { transform: translateX(2px) rotate(-45deg); }
/* a phone: the chapters as a list, each row the still, its number, name and length, and the way to its page */
@media (max-width: 640px) {
  .film-chapters.fm-grid { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--border-row); }
  .film-chapters.fm-grid > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--border-row); }
  .film-chapters.fm-grid .fm-tile { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "pic w" "pic r"; align-items: center; column-gap: 12px; }
  .fm-tile-pic { grid-area: pic; }
  .fm-tile:hover .fm-tile-pic { transform: none; }
  .fm-tile-go { left: 5px; bottom: 5px; width: 22px; height: 22px; }
  .fm-tile-go svg { width: 10px; height: 10px; }
  .fm-tile-len { display: none; }
  .fm-tile-w { grid-area: w; flex-direction: column; gap: 2px; margin: 0; }
  .fm-tile-w b { font-size: 14px; }
  .fm-tile-w b::after { content: attr(data-len); }
  .fm-tile-w em { font-size: 15px; }
  .fm-tile-r { grid-area: r; margin-top: 4px; font-size: 14px; letter-spacing: 0; text-transform: none; }
  .fm-tile-r b { width: 20px; height: 20px; font-size: 12px; line-height: 20px; }
  .fm-tile-page { min-height: 44px; margin: 0; padding: 0 2px 0 10px; font-size: 14px; }
}

/* the reader's route, in the briefing: what it holds, and the way to play it by itself */
.fm-route-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; max-width: none; margin: 22px 0 0; }
.fm-route-note .sq { background: var(--brand-azure); }
.fm-route-w { flex: 1 1 300px; margin: 0; color: var(--brand-navy); font: 600 14.5px/1.4 var(--font-display); }
.fm-route-go { flex: none; display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px 0 13px; border: 1px solid var(--azure-6); border-radius: var(--r-2); background: var(--azure-3); color: var(--azure-11);
  font: 700 14px/1 var(--font-display); white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; }
.fm-route-go:hover { border-color: var(--brand-azure); background: var(--azure-4); }
.fm-route-go svg { width: 13px; height: 13px; fill: currentColor; }
@media (max-width: 640px) {
  .fm-route-note { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .fm-route-note .sq { margin-top: 5px; }
  .fm-route-w { font-size: 15px; }
  .fm-route-go { grid-column: 1 / -1; justify-content: center; height: 44px; }
}

/* ---- the corner. On a wide window the player's own box carries a bar above its picture: the chapter being told, the way
   to that part of the page (or to the page that holds it), larger, and stop. ---- */
#player.docked { inset: auto var(--fm-dx) var(--fm-foot) auto; width: var(--fm-dw); height: calc(var(--fm-dw) * 9 / 16 + var(--fm-bar)); aspect-ratio: auto; animation: none; border-color: rgb(0 40 96 / .2); box-shadow: 0 24px 70px rgb(0 40 96 / .32), 0 0 0 1px rgb(0 40 96 / .14); }
.player.docked video, .player.docked .pl-poster, .player.docked .pl-art, .player.docked .pl-end, .player.docked .fm-pend { top: var(--fm-bar); height: calc(100% - var(--fm-bar)); }
.player.docked .pl-big, .player.docked .fm-wait, .player.docked .fm-fail { top: calc(50% + var(--fm-bar) / 2); }
.player.docked .pl-big { width: 56px; }
.player.docked .pl-big::before { border-left-width: 16px; border-top-width: 10px; border-bottom-width: 10px; }
.player.docked .pl-end { gap: 12px; }
.player.docked .pl-end b { font-size: 21px; }
.player.docked .pl-end .btn, .player.docked .fm-pend-b .btn { height: 34px; padding: 0 11px; font-size: 12.5px; }
#player.docked .fm-pend { top: var(--fm-bar); bottom: 0; height: auto; gap: 10px; padding: 0 10px; }
#player.docked.fm-pended .pl-bar { visibility: hidden; }             /* in the corner the card's own "Again" is the play */
.player.docked .fm-pend-k b { font-size: 17px; }
.player.docked .fm-pend-k span { display: none; }
.player.docked .fm-pend-b { gap: 6px; }
.fm-dock { position: fixed; right: var(--fm-dx); bottom: calc(var(--fm-foot) + var(--fm-dw) * 9 / 16); z-index: 71; display: flex; align-items: stretch; width: var(--fm-dw); height: var(--fm-bar);
  border-radius: var(--r-3) var(--r-3) 0 0; background: var(--brand-navy); color: #ffffff; opacity: 0; transition: opacity .25s var(--ease) .3s; }
.fm-dock.on { opacity: 1; }
.fm-dock :focus-visible { outline-color: #ffffff; outline-offset: -3px; }
.fm-dk-page { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 4px 0 12px; border: 0; border-radius: var(--r-3) 0 0 0; background: none; color: #ffffff; text-align: left; text-decoration: none; cursor: pointer; }
a.fm-dk-page:hover { color: #ffffff; }
.fm-dk-n { flex: 1 1 auto; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fm-dk-n b { flex: none; color: var(--brand-sky-pale); font: 500 12px/1 var(--font-mono); }
.fm-dk-n span { overflow: hidden; font: 600 13.5px/1.3 var(--font-display); letter-spacing: -0.005em; text-overflow: ellipsis; white-space: nowrap; }
.fm-dk-go { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px; border: 1px solid rgb(255 255 255 / .36); border-radius: var(--r-2); font: 700 12.5px/1 var(--font-display); white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.fm-dk-go .sq { display: none; width: 7px; height: 7px; }
.fm-dk-page:hover .fm-dk-go { border-color: #ffffff; background: rgb(255 255 255 / .14); }
.fm-dk-page[aria-pressed="true"] .fm-dk-go { border-color: #ffffff; background: #ffffff; color: var(--brand-navy); }
.fm-dk-page[aria-pressed="true"] .fm-dk-go .sq { display: block; }
.fm-dk-away .fm-dk-go::after { content: ''; width: 6px; height: 6px; margin-left: 1px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.fm-dk-b { flex: none; display: grid; place-items: center; width: 38px; padding: 0; border: 0; background: none; color: #ffffff; cursor: pointer; transition: background .15s; }
.fm-dk-b:last-child { border-radius: 0 var(--r-3) 0 0; }
.fm-dk-b:hover { background: rgb(255 255 255 / .16); }
.fm-dk-b svg { width: 16px; height: 16px; fill: currentColor; }
.fm-dk-play { display: none; }
.fm-dk-play .i-pause, .fm-dk-play.on .i-play { display: none; }
.fm-dk-play.on .i-pause { display: block; }
/* on a phone it is a strip along the foot: the picture, small, at its left; press the picture for the theatre */
@media (max-width: 640px) {
  :root { --fm-dx: 10px; }
  #player.docked { inset: auto auto var(--fm-foot) var(--fm-dx); width: 114px; height: 64px; border-radius: var(--r-2) 0 0 var(--r-2); cursor: pointer; }
  .player.docked video, .player.docked .pl-poster, .player.docked .pl-art { top: 0; height: 100%; }
  .player.docked .pl-bar, .player.docked .pl-end, .player.docked .fm-pend, .player.docked .pl-big, .player.docked .fm-wait, .player.docked .fm-fail { display: none !important; }
  .fm-dock { left: calc(var(--fm-dx) + 114px); right: var(--fm-dx); bottom: var(--fm-foot); width: auto; height: 64px; border-radius: 0 var(--r-2) var(--r-2) 0; box-shadow: 0 16px 44px rgb(0 40 96 / .34); }
  .fm-dk-page { flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 0 4px 0 12px; border-radius: 0; }
  .fm-dk-n { flex: none; max-width: 100%; }
  .fm-dk-n b { display: none; }
  .fm-dk-n span { font-size: 14px; }
  .fm-dk-go { height: auto; padding: 0; border: 0; color: var(--brand-sky-pale); font-size: 14px; }
  .fm-dk-go::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
  .fm-dk-page:hover .fm-dk-go { background: none; }
  .fm-dk-page[aria-pressed="true"] .fm-dk-go { background: none; color: #ffffff; }
  .fm-dk-page[aria-pressed="true"] .fm-dk-go::after { display: none; }
  .fm-dk-b { width: 44px; }
  .fm-dk-b svg { width: 18px; height: 18px; }
  .fm-dk-play { display: grid; }
  .fm-dk-big { display: none; }
}
/* over a section held on screen while it is scrolled (the build: js/film.js sets fm-held), a wider window's corner takes the
   same strip, as wide as the corner and at its foot, clear of what the section shows. Press the picture for the theatre. */
@media (min-width: 641px) {
  html.fm-held { --fm-foot: calc(10px + var(--fm-lift) + env(safe-area-inset-bottom, 0px)); }      /* as low as the phone's */
  .fm-held #player.docked { inset: auto calc(var(--fm-dx) + var(--fm-dw) - 114px) var(--fm-foot) auto; width: 114px; height: 64px; border-radius: var(--r-2) 0 0 var(--r-2); cursor: pointer; }
  .fm-held .player.docked video, .fm-held .player.docked .pl-poster, .fm-held .player.docked .pl-art { top: 0; height: 100%; }
  .fm-held .player.docked .pl-bar, .fm-held .player.docked .pl-end, .fm-held .player.docked .fm-pend, .fm-held .player.docked .pl-big, .fm-held .player.docked .fm-wait, .fm-held .player.docked .fm-fail { display: none !important; }
  .fm-held .fm-dock { bottom: var(--fm-foot); width: calc(var(--fm-dw) - 114px); height: 64px; border-radius: 0 var(--r-2) var(--r-2) 0; box-shadow: 0 16px 44px rgb(0 40 96 / .34); }
  .fm-held .fm-dk-page { flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; border-radius: 0; }
  .fm-held .fm-dk-n { flex: none; max-width: 100%; }
  .fm-held .fm-dk-n b, .fm-held .fm-dk-big { display: none; }
  .fm-held .fm-dk-go { height: auto; padding: 0; border: 0; color: var(--brand-sky-pale); }
  .fm-held .fm-dk-go::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
  .fm-held .fm-dk-page:hover .fm-dk-go, .fm-held .fm-dk-page[aria-pressed="true"] .fm-dk-go { background: none; }
  .fm-held .fm-dk-page[aria-pressed="true"] .fm-dk-go { color: #ffffff; }
  .fm-held .fm-dk-page[aria-pressed="true"] .fm-dk-go::after { display: none; }
  .fm-held .fm-dk-b { width: 44px; }
  .fm-held .fm-dk-b:last-child { border-radius: 0 var(--r-2) var(--r-2) 0; }
  .fm-held .fm-dk-play { display: grid; }
}

/* ---- the theatre: the one player, large, over the page ---- */
.fm-th { position: fixed; inset: 0; z-index: 89; }
.fm-veil { position: absolute; inset: 0; background: var(--brand-navy); opacity: 0; transition: opacity .38s var(--ease); }
.fm-veil::after { content: ''; position: absolute; inset: 0; background: radial-gradient(64% 58% at 50% 50%, rgb(0 112 248 / .3), transparent 72%); }
.fm-th.on .fm-veil { opacity: 1; }
/* the theatre is the whole window while it is open: the page's own card waits, and comes back as it closes */
.film-theatre .rec { visibility: hidden; }
.fm-th :focus-visible { outline-color: #ffffff; }
.fm-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--fm-top); padding: 0 var(--fm-gut); opacity: 0; transform: translateY(-8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.fm-top .eyebrow { margin: 0; }
.fm-nb { white-space: nowrap; }
.fm-back { flex: none; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 14px; border: 1px solid rgb(255 255 255 / .3); border-radius: var(--r-2); background: none; color: #ffffff; font: 600 14px/1 var(--font-display); white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; }
.fm-back:hover { border-color: #ffffff; background: rgb(255 255 255 / .12); }
.fm-back svg { width: 18px; height: 18px; fill: currentColor; }
.fm-low { position: absolute; left: calc(50% - var(--fm-tw) / 2); top: calc(var(--fm-ty) + var(--fm-tw) * 9 / 16 + 16px); display: flex; align-items: center; gap: 10px 22px; width: var(--fm-tw); color: #ffffff; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.fm-th.on .fm-top, .fm-th.on .fm-low { opacity: 1; transform: none; transition-delay: .16s; }
.fm-now { flex: 1 1 auto; display: flex; align-items: baseline; gap: 12px; min-width: 0; margin: 0; }
.fm-now b { flex: none; color: var(--azure-6); font: 700 11.5px/1.3 var(--font-display); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.fm-now span { overflow: hidden; color: #ffffff; font: 700 17px/1.3 var(--font-display); letter-spacing: -0.012em; text-overflow: ellipsis; white-space: nowrap; }
.fm-now i { flex: none; color: var(--azure-6); font: 500 12.5px/1.3 var(--font-mono); font-style: normal; font-variant-numeric: tabular-nums; }
.fm-now.peek span, .fm-now.peek i { color: var(--brand-sky-pale); }
.fm-sqs { flex: none; display: flex; align-items: center; }
.fm-sqs button { position: relative; width: 22px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; }
.fm-sqs button::before { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid rgb(255 255 255 / .44); transition: transform .25s var(--spring), background .2s, border-color .2s; }
.fm-sqs button.done::before { border-color: var(--brand-sky); background: var(--brand-sky); }
.fm-sqs button.now::before { border-color: #ffffff; background: #ffffff; transform: scale(1.3); }
.fm-sqs button:hover::before, .fm-sqs button:focus-visible::before { border-color: #ffffff; transform: scale(1.3); }
.fm-sqs button:focus-visible { outline-offset: -8px; }
.fm-step { display: none; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgb(255 255 255 / .3); border-radius: var(--r-2); background: none; color: #ffffff; cursor: pointer; }
.fm-step svg { width: 18px; height: 18px; fill: currentColor; }
.fm-step[disabled] { opacity: .35; cursor: default; }
.fm-page { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 12px 0 16px; border: 0; border-radius: var(--r-2); background: #ffffff; color: var(--brand-navy); font: 700 14px/1 var(--font-display); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s; }
.fm-page:hover { background: var(--sky-4); color: var(--brand-navy); }
.fm-page svg { width: 16px; height: 16px; fill: var(--brand-azure); }
/* on the navy of the theatre the picture needs no shadow, and one would fall across the row of chapters beneath it */
#player.theatre { position: fixed; inset: var(--fm-ty) auto auto calc(50% - var(--fm-tw) / 2); z-index: 90; width: var(--fm-tw); height: calc(var(--fm-tw) * 9 / 16); border-color: rgb(255 255 255 / .16); box-shadow: 0 0 0 1px rgb(255 255 255 / .1); }
/* a middling window: the chapter's name has a line of its own, and the row of chapters and the way to the page share the next */
@media (min-width: 641px) and (max-width: 1020px) {
  :root { --fm-low: 116px; }
  .fm-low { flex-wrap: wrap; }
  .fm-now { flex: 1 1 100%; }
  .fm-sqs { margin-right: auto; }
}
@media (max-width: 860px) {
  .fm-sqs button { width: 18px; }
}
@media (max-width: 640px) {
  :root { --fm-gut: 0px; --fm-top: 60px; --fm-low: 176px; }
  .fm-th.on .fm-veil { opacity: .94; }
  .fm-top { padding: 0 12px 0 16px; }
  .fm-top .eyebrow { font-size: 12.5px; letter-spacing: .08em; line-height: 1.25; }
  .fm-back { padding: 0 10px 0 12px; }
  #player.theatre { border-left: 0; border-right: 0; border-radius: 0; }
  .fm-low { left: 0; width: 100%; padding: 0 16px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 12px 10px; }
  .fm-step { display: grid; }
  .fm-now { grid-column: 2; grid-row: 1; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
  .fm-now b { font: 600 14px/1.3 var(--font-display); letter-spacing: 0; text-transform: none; }
  .fm-now span { max-width: 100%; font-size: 16px; }
  .fm-now i { display: none; }
  .fm-low [data-fm="prev"] { grid-column: 1; grid-row: 1; } .fm-low [data-fm="next"] { grid-column: 3; grid-row: 1; }
  .fm-sqs { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; pointer-events: none; }
  .fm-sqs button { width: 12px; height: 14px; }
  .fm-sqs button::before { width: 8px; height: 8px; margin: -4px 0 0 -4px; border-width: 1.5px; }
  .fm-page { grid-column: 1 / -1; grid-row: 3; height: 46px; font-size: 15px; }
}
/* a short window (a phone on its side): the picture takes all of it, with the way out over its corner */
@media (max-height: 520px) {
  :root { --fm-gut: 0px; --fm-top: 0px; --fm-low: 0px; --fm-tw: min(100vw, calc(var(--fm-vh) * 16 / 9)); --fm-ty: calc((var(--fm-vh) - var(--fm-tw) * 9 / 16) / 2); }
  .fm-top { z-index: 91; height: 56px; padding: 0 10px; pointer-events: none; }
  .fm-top .eyebrow { visibility: hidden; }
  .fm-back { background: rgb(0 40 96 / .78); pointer-events: auto; }
  .fm-low { display: none; }
  #player.theatre { border-radius: 0; }
}

/* ---- readers who ask for less motion, more contrast, or paper ---- */
.still .fm-open, .still .fm-hold, .still .fm-over-c, .still #film .fm-said { display: none; }
@media (prefers-contrast: more) {
  .fm-th.on .fm-veil { opacity: 1; }
  #film .fm-said .w { opacity: .6; }
  .film-pill, .cue-film, .fm-cover-th, .fm-plate { background: #ffffff; }
  .fm-plate { box-shadow: 0 0 0 1px var(--slate-10); }
}
@media print {
  .film-pill, .cue-film, .fm-cover, .fm-cover-th, .fm-th, .fm-dock, .ph-film .film-frame { display: none !important; }
}
