/* The Videos page (youtube.html): the night flight deck behind the title and the way to the channel; the newest video on
   its own stage with the next ones beside it; every video in a grid of cards, as the Articles page's, with its series
   and systems to filter by and a search; the channel again at the end; and the player, a dark theatre over the page in
   either theme. Nothing of YouTube's loads before play is pressed (assets/js/youtube.js). */

/* ---------- the hero ---------- */
/* shorter than the other photo heroes, so the newest video comes up into its dissolve, in sight as the page opens */
.page-hero.is-yt { padding-block: clamp(56px, 7.5vw, 104px) clamp(72px, 7vw, 104px); }
.yt-latest { padding-top: clamp(4px, 1vw, 16px); }
.yt-latest .section-head { margin-bottom: clamp(20px, 2.4vw, 28px); }
.page-hero.is-yt .ph-photo img { object-position: 50% 58%; filter: saturate(0.95) contrast(1.05) brightness(0.9); }
.page-hero.is-yt .ph-photo::after { background:
    linear-gradient(90deg, rgba(11, 12, 14, 0.9) 0%, rgba(11, 12, 14, 0.78) 42%, rgba(11, 12, 14, 0.36) 72%, rgba(11, 12, 14, 0.3) 100%),
    linear-gradient(180deg, rgba(11, 12, 14, 0.5) 0%, rgba(11, 12, 14, 0) 30%, rgba(11, 12, 14, 0) 60%, rgba(11, 12, 14, 0.5) 100%); }
.page-hero.is-yt .btn-primary, .page-hero.is-yt .btn-ghost { --pb-bg: #F2F3F5; --pb-fg: #121315; }
.yt-hero-cta { margin-top: 34px; gap: 12px; }
/* Subscribe: the one filled button on the page, with YouTube's own mark in it */
.btn.yt-sub { gap: 0.6em; padding-left: 1.05em; background-color: var(--pb-bg); border-color: var(--pb-bg); color: var(--pb-fg); }
.btn.yt-sub:hover, .btn.yt-sub:focus-visible { background-color: color-mix(in srgb, var(--pb-bg) 88%, var(--pb-fg)); border-color: color-mix(in srgb, var(--pb-bg) 88%, var(--pb-fg)); color: var(--pb-fg); transform: translateY(-1px); }
.yt-logo { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; flex: none; color: #FF0033; }
.yt-logo svg { width: 100%; height: 100%; display: block; }
.yt-logo-tri { fill: #FFFFFF; }
.yt-facts { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.875rem; color: var(--muted); }
.yt-facts li { display: inline-flex; align-items: center; gap: 6px; }
.yt-facts li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.6; margin-right: 16px; }
.yt-facts b { color: var(--fg); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- what a card says above its title, and the link out ---------- */
.yt-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); }
.yt-new { display: inline-flex; align-items: center; gap: 6px; min-height: 20px; padding: 0 8px; border-radius: 999px; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--ok); background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.yt-new::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.yt-out { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 0.8125rem; font-weight: 600; color: var(--fg); text-decoration: none; white-space: nowrap; transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
.yt-out:hover, .yt-out:focus-visible { background: var(--invert-bg); border-color: var(--invert-bg); color: var(--invert-fg); }
.yt-out-ic svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the play button: a dark glass disc, filling white when pointed at ---------- */
.yt-play { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: #FFFFFF; background: rgba(12, 13, 15, 0.56); border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  transition: transform .45s var(--ease-out), background-color .3s ease, color .3s ease, border-color .3s ease; }
.yt-play svg { width: 40%; height: 40%; margin-left: 8%; }
.yt-play-lg { left: 50%; top: 50%; bottom: auto; width: 84px; height: 84px; margin: -42px 0 0 -42px; }
a:hover > * > .yt-play, a:focus-visible > * > .yt-play, .yt-facade:hover .yt-play, .yt-facade:focus-visible .yt-play {
  background: #FFFFFF; color: #121315; border-color: #FFFFFF; transform: scale(1.08); }

/* ---------- the newest video on its stage, the next ones beside it ---------- */
.yt-feature-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 24px); align-items: stretch; }
.yt-feature { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); padding: 8px; }
.yt-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 19px; background: #0B0C0E; }
.yt-stage iframe, .yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.yt-facade { position: absolute; inset: 0; display: block; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92) contrast(1.03); transition: transform 1s var(--ease-out), filter .6s ease; }
.yt-facade::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(ellipse at 50% 50%, rgba(10, 11, 13, 0) 30%, rgba(10, 11, 13, 0.32) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.yt-facade:hover img, .yt-facade:focus-visible img { transform: scale(1.025); filter: saturate(1.04) contrast(1.03); }
.yt-facade:focus-visible { outline: 3px solid #FFFFFF; outline-offset: -6px; border-radius: 19px; }
.yt-feature-body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding: clamp(18px, 2.2vw, 26px) clamp(14px, 2vw, 22px) clamp(16px, 2vw, 20px); }
.yt-feature-copy { display: grid; gap: 12px; min-width: 0; flex: 1 1 340px; }
.yt-feature-t { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); font-weight: 700; line-height: 1.16; letter-spacing: -0.025em; text-wrap: balance; }

.yt-next { min-width: 0; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); padding: clamp(16px, 1.8vw, 22px) 10px 10px; display: flex; flex-direction: column; }
.yt-next-h { padding: 0 10px 10px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
/* (beside the stage, as tall as it, the four spread down its height) */
.yt-next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; flex: 1; align-content: space-evenly; }
.vnext { display: grid; grid-template-columns: minmax(112px, 42%) minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px; border-radius: 16px; text-decoration: none; color: inherit;
  transition: background-color .25s ease; }
.vnext:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.vnext:focus-visible { outline: 2px solid var(--fg); outline-offset: 0; }
.vnext-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 11px; background: #0c0d0f; }
.vnext-img img, .vcard-img img { width: 100%; height: 100%; object-fit: cover; }
.vnext-img .yt-play { left: 6px; bottom: 6px; width: 28px; height: 28px; }
.vnext-body { display: grid; gap: 6px; min-width: 0; }
.vnext-body .yt-kicker { font-size: 0.625rem; letter-spacing: 0.12em; }
.vnext-t { font-size: 0.9375rem; font-weight: 600; line-height: 1.32; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- the library ---------- */
.yt-lib-head { align-items: end; gap: 24px 48px; }
.yt-lib-line { color: var(--fg-2); max-width: 52ch; }
.yt-search { margin-top: 0; width: min(100%, 400px); }
.yt-search input { height: 52px; padding-right: 96px; }
.yt-search .faq-found { right: 20px; }
.yt-key { right: 18px; border-color: var(--line-strong); color: var(--muted); }
.yt-search.has-q .yt-key, .yt-search:focus-within .yt-key { opacity: 0; }

.yt-filters { display: grid; gap: 18px; margin-bottom: clamp(28px, 3vw, 40px); padding-top: clamp(20px, 2.4vw, 28px); border-top: 1px solid var(--line); }
.yt-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yt-chips-k { flex: 0 0 100%; margin-bottom: 2px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.yt-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--fg);
  font: 600 0.8125rem/1 var(--font-body); letter-spacing: 0.01em; white-space: nowrap; cursor: pointer; touch-action: manipulation;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.yt-chip-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--muted); background: color-mix(in srgb, var(--fg) 7%, transparent); }
.yt-chip:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); border-color: color-mix(in srgb, var(--fg) 40%, transparent); }
.yt-chip:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.yt-chip[aria-pressed="true"] { background: var(--invert-bg); border-color: var(--invert-bg); color: var(--invert-fg); }
.yt-chip[aria-pressed="true"] .yt-chip-n { color: var(--invert-fg); background: color-mix(in srgb, var(--invert-fg) 14%, transparent); }

.yt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.yt-grid > li { display: flex; min-width: 0; }
.yt-grid > li[data-hide], .yt-grid > li[data-more] { display: none; }
/* the library a few rows at a time (the script; without it, every video shows) */
.yt-more { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(28px, 3vw, 40px); }
.yt-more-n { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* a card: the Articles page's, its picture the video's, a play disc on it */
.vcard { position: relative; display: flex; flex-direction: column; flex: 1; min-width: 0; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--surface);
  transition: border-color .4s ease, transform .55s var(--ease-out), box-shadow .55s var(--ease-out); }
.vcard:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: 0 28px 56px -34px rgba(0, 0, 0, 0.55); }
.vcard:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.vcard-img { position: relative; margin: 8px 8px 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 15px; background: #0c0d0f; }
.vcard-img::after, .vnext-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 30%, transparent 62%, rgba(10, 11, 13, 0.3) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.vcard-img img { filter: saturate(0.8) contrast(1.03); transition: transform .9s var(--ease-out), filter .6s ease; }
.vcard:hover .vcard-img img { transform: scale(1.04); filter: saturate(1) contrast(1.03); }
.vcard-body { display: grid; align-content: start; gap: 9px; flex: 1; padding: 16px 18px 20px; }
.vcard-t { font-size: 1rem; font-weight: 700; line-height: 1.32; letter-spacing: -0.012em; text-wrap: balance; }
.yt-empty { margin-top: 8px; }

/* ---------- the channel, at the end: the Company page's way in, with YouTube's red for its glow ---------- */
.yt-cta { border-color: rgba(240, 85, 90, 0.24); box-shadow: 0 0 70px rgba(240, 85, 90, 0.07), 0 40px 80px -30px rgba(0, 0, 0, 0.6); }
.yt-cta::before { background: radial-gradient(closest-side, rgba(240, 85, 90, 0.16), transparent); }
.yt-cta .eyebrow { color: #FF7A7E; }
.yt-cta-copy { display: grid; gap: 14px; justify-items: start; }
.yt-cta-copy p { margin: 0; }
.yt-cta-ico { width: 56px; height: 56px; margin-bottom: 8px; border-radius: 16px; display: grid; place-items: center; color: #FF6B70;
  background: rgba(30, 32, 36, 0.78); border: 1px solid rgba(240, 85, 90, 0.38);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 14px 28px -16px rgba(0, 0, 0, 0.45), 0 0 24px rgba(240, 85, 90, 0.12); }
.yt-cta-ico svg { width: 26px; height: 26px; }

/* ---------- the player: a dark theatre in either theme ---------- */
html.yt-open { overflow: hidden; }
.yt-dlg { width: min(1120px, calc(100vw - 32px), calc((100vh - 210px) * 16 / 9 + 22px)); width: min(1120px, calc(100vw - 32px), calc((100dvh - 210px) * 16 / 9 + 22px));
  max-width: none; max-height: calc(100dvh - 16px); padding: 0; border: 0; background: transparent; color: #F2F3F5; overflow: visible; }
.yt-dlg::backdrop { background: rgba(6, 7, 8, 0.84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.yt-dlg[open] { animation: yt-in .32s var(--ease-out) both; }
.yt-dlg[open]::backdrop { animation: yt-fade .3s ease both; }
@keyframes yt-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes yt-fade { from { opacity: 0; } to { opacity: 1; } }
.yt-dlg-in { --fg: #F2F3F5; --fg-2: #D6D9DE; --muted: rgba(242, 243, 245, 0.62); --line: rgba(242, 243, 245, 0.12); --line-strong: rgba(242, 243, 245, 0.26);
  --invert-bg: #F2F3F5; --invert-fg: #121315; --steel: #A9BDCD; color-scheme: dark;
  padding: 10px; border-radius: 26px; background: #111214; border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8); }
.yt-dlg-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 2px 10px 12px; min-height: 50px; }
.yt-x { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); color: var(--fg); cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.yt-x svg { width: 18px; height: 18px; }
.yt-x:hover, .yt-x:focus-visible { background: #F2F3F5; color: #121315; border-color: #F2F3F5; }
.yt-x:focus-visible, .yt-step:focus-visible, .yt-dlg .yt-out:focus-visible { outline: 2px solid #F2F3F5; outline-offset: 3px; }
.yt-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 17px; background: #000; }
.yt-dlg-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 16px 12px 8px; }
.yt-dlg-t { flex: 1 1 320px; min-width: 0; font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; color: #FFFFFF; text-wrap: balance; }
.yt-dlg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yt-step { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--fg);
  font: 600 0.8125rem/1 var(--font-body); cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.yt-step svg { width: 14px; height: 14px; }
.yt-step:hover:not(:disabled) { background: rgba(242, 243, 245, 0.1); border-color: rgba(242, 243, 245, 0.45); }
.yt-step:disabled { opacity: 0.35; cursor: default; }

/* ---------- iPad and phone ---------- */
@media (max-width: 1180px) { .yt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .yt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .yt-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .yt-next-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
}
@media (max-width: 720px) {
  .yt-search { width: 100%; }
  /* the filters a row each, scrolled sideways, edge to edge */
  .yt-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px; scroll-padding-inline: 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%); }
  .yt-chips::-webkit-scrollbar { display: none; }
  .yt-chips-k { flex: none; margin: 0 4px 0 0; }
  .yt-chips > :last-child { margin-right: 16px; }
}
@media (max-width: 640px) {
  .yt-next-list { grid-template-columns: minmax(0, 1fr); }
  .yt-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .yt-play-lg { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .yt-feature-body { padding-inline: 10px; }
  .yt-facts li + li::before { display: none; }
  .yt-facts { gap: 6px 18px; }
  .yt-dlg { width: calc(100vw - 16px); }
  .yt-dlg-in { padding: 6px; border-radius: 20px; }
  .yt-frame { border-radius: 14px; }
  .yt-dlg-bar { padding: 2px 2px 8px 10px; min-height: 46px; }
  .yt-dlg-foot { padding: 14px 8px 6px; }
  /* Previous and Next as two round buttons, Watch on YouTube beside them, all on one line */
  .yt-dlg-actions { width: 100%; flex-wrap: nowrap; }
  .yt-step { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .yt-step span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .yt-dlg-actions .yt-out { margin-left: auto; min-height: 44px; }
}
@media (pointer: coarse) { .yt-chip { height: 40px; } .yt-search input { font-size: 16px; } .yt-key { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .vcard, .vcard-img img, .yt-facade img, .yt-play, .vnext, .yt-chip, .yt-out, .yt-x, .yt-step { transition: none; }
  .vcard:hover { transform: none; }
  .vcard:hover .vcard-img img, .yt-facade:hover img, .yt-facade:focus-visible img { transform: none; }
  a:hover > * > .yt-play, a:focus-visible > * > .yt-play, .yt-facade:hover .yt-play, .yt-facade:focus-visible .yt-play { transform: none; }
  .yt-dlg[open], .yt-dlg[open]::backdrop { animation: none; }
}
