/* Video frames: the gallery at /history/videos/ and the single player on a
   story, glossary or boat page. A frame is YouTube's thumbnail with a play
   mark until pressed; src/assets/js/video.js then puts the player in it.
   Kept out of site.css, which sits at its weight budget. */
.video-toc { font-size: .95rem; }
.video-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); padding: 0; margin: 1rem 0 1.5rem; list-style: none; }
.video-card { border: 1px solid var(--canvas-2); background: var(--card); display: flex; flex-direction: column; min-width: 0; }
.video-body { padding: .8rem 1rem 1rem; }
.video-body h3 { margin: 0 0 .3rem; font-size: 1rem; color: var(--navy-2); }
.video-body p { margin: .25rem 0 0; font-size: .9rem; color: var(--slate); }

.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-frame iframe, .video-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { display: block; }
/* YouTube's thumbnail is 4:3 with the 16:9 picture letterboxed inside it,
   so covering the frame crops the bars. */
.video-play img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.video-play-icon { position: absolute; left: 50%; top: 50%; width: 3.5rem; height: 2.5rem; margin: -1.25rem 0 0 -1.75rem; border-radius: .6rem; background: rgba(0, 0, 0, .72); }
.video-play-icon::after { content: ''; position: absolute; left: 1.45rem; top: .75rem; border-style: solid; border-width: .5rem 0 .5rem .85rem; border-color: transparent transparent transparent #fff; }
.video-play:hover .video-play-icon, .video-play:focus-visible .video-play-icon { background: var(--emblem); }
.video-play:focus-visible { outline: 3px solid var(--emblem); outline-offset: -3px; }

.video-single { margin: 1rem 0 1.25rem; max-width: 40rem; }
.video-single figcaption { margin-top: .4rem; font-size: .9rem; color: var(--slate); }
