/* Layout only: typography, card artwork and section rules use the main theme. */
.video-library { margin-bottom: 36px; }
.video-library__section-heading { display: block; }
.video-library__section-heading h2 { min-width: 0; }
.video-library [hidden] { display: none !important; }
.video-library :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
.video-featured { margin-bottom: 24px; }
.video-featured__track { display: flex; gap: 20px; aspect-ratio: 16 / 9; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 8px; }
.video-featured__track::-webkit-scrollbar { display: none; }
.video-featured__slide { position: relative; flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; background: #151515; border-radius: 8px; overflow: hidden; }
.video-featured__link { display: block; position: relative; aspect-ratio: 16 / 9; color: #fff; text-decoration: none; }
.video-featured__link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.28) 70%), linear-gradient(0deg, rgba(0,0,0,.4), transparent 70%); }
.video-featured__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-featured__body { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: clamp(26px, 4.1vw, 52px); }
.video-featured__body h2 { max-width: 760px; margin: 0; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.12; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.video-featured__description { max-width: 590px; margin: 16px 0 0; font-size: 16px; line-height: 1.5; color: rgba(255,255,255,.85); }
.video-featured__watch { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; padding: 12px 19px; border-radius: 4px; background: var(--color-accent); color: #fff; font-size: 14px; font-weight: 600; transition: transform .15s ease, box-shadow .15s ease; }
.video-featured__watch svg { width: auto; height: .75em; aspect-ratio: 11 / 14; flex: none; }
.video-featured__link:hover .video-featured__watch, .video-featured__link:focus-visible .video-featured__watch { box-shadow: 0 7px 18px #ff2a0033; transform: translateY(-2px); }
.video-featured__dots { display: flex; justify-content: center; gap: 4px; min-height: 24px; margin-top: 12px; }
.video-featured__dot { display: grid; place-items: center; width: 30px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.video-featured__indicator { display: block; width: 7px; height: 7px; border-radius: 5px; overflow: hidden; background: var(--color-border-strong); transition: width .18s ease, background-color .18s ease; }
.video-featured__dot[aria-current="true"] .video-featured__indicator { width: 21px; background: var(--color-accent); }
.video-shelf { margin-top: 24px; }
.video-shelf__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 54px) / 3); gap: 27px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 4px; margin: -4px; scrollbar-width: none; }
.video-shelf__track > .content-tile { min-width: 0; scroll-snap-align: start; margin-bottom: 10px; }
.video-library .content-tile__img { aspect-ratio: 16 / 9; }
.video-library .content-tile:hover { opacity: 1; }
@media (max-width: 780px) {
  .video-shelf__track { grid-auto-columns: calc((100% - 20px) / 2); gap: 20px; }
}
@media (max-width: 480px) {
  .video-shelf__track { grid-auto-columns: 82%; gap: 15px; }
}

@media (max-width: 780px) {
  .video-featured__body { padding: 28px; }
  .video-featured__body h2 { font-size: 30px; }
  .video-featured__description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 12px; font-size: 14px; line-height: 1.4; }
}
@media (max-width: 480px) {
  .video-featured__link::after { background: linear-gradient(0deg, rgba(0,0,0,.92), rgba(0,0,0,.06)); }
  .video-featured__body { padding: 14px; }
  .video-featured__body h2 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 18px; line-height: 1.2; }
  .video-featured__description { -webkit-line-clamp: 2; margin-top: 8px; font-size: 12px; }
  .video-featured__watch { margin-top: 10px; padding: 8px 12px; font-size: 12px; }
}
@media (max-width: 360px) {
  .video-featured__body h2 { -webkit-line-clamp: 2; }
}

.video-shelf__body { position: relative; }
.video-shelf__controls { position: absolute; inset: 0 0 auto; height: var(--shelf-image-height, 0px); pointer-events: none; }

.video-library [data-video-preview] .content-tile__img > picture { position: relative; z-index: 1; opacity: 1; }
.video-library .content-tile.is-preview-preparing .content-tile__img > picture { will-change: opacity; }
.video-library .content-tile__preview { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* Use YouTube's easing on the already-painted poster, after the video is composited. */
.video-library .content-tile.is-preview-playing .content-tile__img > picture { opacity: 0; transition: opacity 250ms cubic-bezier(0.05, 0, 0, 1); }
@media (prefers-reduced-motion: reduce) { .video-library .content-tile.is-preview-playing .content-tile__img > picture { transition: none; } }

@media (prefers-reduced-motion: reduce) {
  .video-featured__indicator, .video-featured__watch { transition: none; }
  .video-featured__link:hover .video-featured__watch, .video-featured__link:focus-visible .video-featured__watch { transform: none; }
}

.video-shelf__track::-webkit-scrollbar { display: none; }
.video-library .video-shelf__controls .gallery-nav { opacity: .95; pointer-events: auto; }
