/*
 * The tutorial videos: the poster at the top of a guide, the Videos row on the Help Centre's
 * front page, and the dialog a row card plays in. The videos themselves are help-content.js's
 * VIDEOS registry, and the poster's markup is its videoFacade(). Read by /help (help.html),
 * the /help/<id> pages (server/marketing-seo.ts) and the in-app Help (pages-help.jsx) - one
 * copy, so the three cannot drift.
 *
 * The poster is drawn here, not fetched: nothing from YouTube loads until play is pressed.
 */
.hv { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; color: #fff; text-decoration: none;
  background: radial-gradient(120% 95% at 88% 0%, rgba(75, 207, 232, 0.5) 0%, rgba(75, 207, 232, 0) 58%), linear-gradient(135deg, #16233f 0%, #1a3f8f 58%, #1a52c4 100%);
  box-shadow: 0 10px 30px -12px rgba(22, 35, 63, 0.35); margin: 0 0 26px; }
.hv:hover, .hv:focus { color: #fff; text-decoration: none; }
.hv:focus-visible { outline: 3px solid #2168dd; outline-offset: 3px; }
.hv-n { position: absolute; top: 14px; left: 18px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.78); }
.hv-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); transition: transform .15s; }
.hv-play svg { width: 28px; height: 28px; fill: #1a52c4; margin-left: 3px; }
.hv:hover .hv-play { transform: scale(1.06); }
.hv-cap { position: absolute; left: 18px; right: 18px; bottom: 16px; display: flex; flex-direction: column; gap: 2px; }
.hv-k { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.82); }
.hv-cap b { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; color: #fff; }
.hv.hv-on { background: #000; }
.hv.hv-on iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* A guide's video once pressed: the player, and under it the way out to YouTube (help-video.js). */
.hv-played { margin: 0 0 26px; }
.hv-played .hv { margin: 0; }
.hv-out { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 14.5px; color: #1a52c4; text-decoration: none; }
.hv-out:hover { text-decoration: underline; }

/* The Videos row: one line of cards that scrolls sideways. */
.hv-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin; }
/* A shallow shadow: the row's scroll box clips anything deeper into a grey band under the cards. */
.hv-row .hv { flex: 0 0 240px; margin: 0; scroll-snap-align: start; box-shadow: 0 4px 10px -6px rgba(22, 35, 63, 0.4); }
.hv-card .hv-n { top: 10px; left: 12px; font-size: 12px; }
.hv-card .hv-play { width: 46px; height: 46px; margin: -31px 0 0 -23px; }
.hv-card .hv-play svg { width: 20px; height: 20px; margin-left: 2px; }
.hv-card .hv-cap { left: 12px; right: 12px; bottom: 10px; }
.hv-card .hv-k { display: none; }
.hv-card .hv-cap b { font-size: 14px; line-height: 1.3; }

/* The dialog a card plays in (the public pages; the app uses its own sheet). */
/* margin: auto re-centres it: the pages' own `* { margin: 0 }` reset pins a modal dialog to the corner. */
.hv-dlg { margin: auto; border: 0; padding: 0; width: min(960px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); background: #0e1830; color: #fff; border-radius: 16px; overflow: hidden; }
.hv-dlg::backdrop { background: rgba(14, 24, 48, 0.72); }
.hv-dlg-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; }
.hv-dlg-head b { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
.hv-dlg-x { flex: none; width: 44px; height: 44px; border-radius: 10px; color: #fff; display: grid; place-items: center; background: transparent; border: 0; cursor: pointer; }
.hv-dlg-x:hover { background: rgba(255, 255, 255, 0.08); }
.hv-dlg-x svg { width: 20px; height: 20px; }
.hv-dlg-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.hv-dlg-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hv-dlg-foot { padding: 6px 18px 10px; display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 18px; }
.hv-dlg-foot a { color: #8fd6f0; font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; min-height: 44px; }
.hv-dlg-foot a:hover { color: #fff; }

@media (max-width: 560px) {
  .hv-row .hv { flex-basis: 72%; }
  .hv-cap { left: 14px; right: 14px; bottom: 12px; }
  .hv-cap b { font-size: 16px; }
  .hv-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .hv-play svg { width: 24px; height: 24px; }
}
