.home-videos,
.videos-page-main {
  padding: clamp(48px, 6vw, 82px) clamp(22px, 6vw, 96px);
  border-bottom: 3px solid var(--ink);
  background: var(--white);
}

.home-videos-inner,
.videos-page-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.home-videos-heading h2,
.videos-page-heading h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 3vw, 3.25rem);
  line-height: 1.05;
}

.home-videos-heading p,
.videos-page-deck {
  max-width: 64ch;
  margin: 0 0 28px;
  line-height: 1.55;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.video-card {
  margin: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
}

.video-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.video-card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-card-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  background: var(--orange);
  color: var(--ink);
  pointer-events: none;
}

.video-card-play svg {
  width: 12px;
  height: 12px;
  margin-left: 2px;
}

.video-card-body {
  padding: 12px 14px 14px;
}

.video-card time {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.3;
}

.video-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.video-card-link:hover h3,
.video-card-link:focus-visible h3 {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.home-videos-more,
.videos-page-more {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin: 28px 0 0;
}

.video-grid-status {
  margin: 0;
  font-weight: 700;
}

.video-modal[hidden] {
  display: none;
}

.video-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 16, 15, 0.82);
}

.video-modal-dialog {
  width: min(960px, 100%);
  background: var(--white);
  border: 3px solid var(--ink);
}

.video-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 2px solid var(--ink);
  background: var(--lime);
}

.video-modal-bar h2 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.video-modal-close {
  flex: none;
  width: auto;
  max-width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.video-modal-dialog,
.video-modal-bar,
.video-modal-frame,
.video-modal-footer {
  min-width: 0;
  max-width: 100%;
}

.video-modal-frame {
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.video-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-modal-footer {
  padding: 10px 14px 14px;
}

.videos-page-header {
  background: var(--lime);
  border-bottom: 3px solid var(--ink);
  padding: clamp(36px, 5vw, 64px) clamp(22px, 6vw, 96px) clamp(28px, 3vw, 42px);
}

.videos-page-heading {
  max-width: 1200px;
  margin: 0 auto;
}

.videos-page-heading h1 {
  margin-bottom: 16px;
  max-width: 22ch;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
  font-size: clamp(1.75rem, 7.6vw, 3.25rem);
  line-height: 1.08;
}

.videos-page-heading h1 .videos-title-break {
  display: block;
}

.videos-page-deck {
  margin-bottom: 0;
  max-width: 46ch;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
}

.videos-page-cover {
  margin: 28px 0 0;
}

.videos-page-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
}

@media (max-width: 980px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-card h3 {
    font-size: 1.08rem;
  }
}

@media (max-width: 720px) {
  .video-modal:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    overflow: auto;
  }

  .video-modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 20px - env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .video-modal-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .video-modal-bar h2 {
    width: 100%;
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .video-modal-close {
    width: auto;
    align-self: flex-end;
    min-height: 40px;
    padding: 0 12px;
  }

  .video-modal-frame {
    width: 100%;
    flex: 0 0 auto;
  }

  .video-modal-footer {
    padding: 10px 12px 14px;
  }
}

body.video-modal-open {
  overflow: hidden;
}

body.video-modal-open .topbar,
body.video-modal-open .scroll-progress,
body.video-modal-open .newsletter-popover {
  visibility: hidden;
  pointer-events: none;
}
