.nkt-video-library {
  --video-green: #085639;
  --video-ink: #152b22;
  --video-muted: #53685c;
  --video-mint: #e6f3ec;
  color: var(--video-ink);
  background: #fff;
}

.nkt-video-library [hidden] { display: none !important; }
.nkt-video-library :focus-visible { outline: 3px solid #08734a; outline-offset: 4px; }
.nkt-video-container { width: min(100% - 40px, 1200px); margin-inline: auto; }
.nkt-video-hero {
  padding: 20px 0 clamp(26px, 5vw, 55px);
  background: linear-gradient(160deg, #eaf6ee 0%, #f6faf7 70%, #fff 100%);
}
.nkt-video-hero h1 {
  max-width: 820px;
  margin: 12px 0 24px;
  color: #084b2b;
  font-size: clamp(1.95rem, 4vw, 3.4rem);
  font-weight: 750;
  line-height: 1.13;
}

.nkt-video-library :is(.nkt-breadcrumbs a, .nkt-video-card-meta a) {
  color: var(--video-green);
  text-decoration: underline;
  text-underline-offset: .19em;
}
.nkt-video-library :is(.nkt-breadcrumbs a, .nkt-video-card-meta a):is(:hover, :focus-visible) {
  color: #063c29;
  text-decoration-thickness: 2px;
}

.nkt-video-banner {
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: clamp(12px, 2vw, 26px);
  background:
    radial-gradient(ellipse at 69% 50%, #9de2bf 0 26%, transparent 63%),
    radial-gradient(ellipse at 24% 45%, #fff 0 15%, transparent 56%),
    linear-gradient(155deg, #cdece2, #f4fdf9 44%, #d3f3e5);
}
.nkt-video-banner::before,
.nkt-video-banner::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.nkt-video-banner::before {
  top: -44%;
  left: -22%;
  width: 51%;
  height: 66%;
  border: 1px solid #ffffffa1;
  border-radius: 48%;
  background: linear-gradient(135deg, #f1fbf8, #bce8d6);
  box-shadow: 10px 18px 0 #a8dfc98a;
  transform: rotate(-18deg);
}
.nkt-video-banner::after {
  right: -24%;
  bottom: -47%;
  width: 82%;
  height: 60%;
  border-radius: 50%;
  background: linear-gradient(112deg, #239364, #064631);
  transform: rotate(-17deg);
}
.nkt-video-banner-copy {
  position: absolute;
  z-index: 2;
  top: 45%;
  left: 3%;
  width: 28.5%;
  transform: translateY(-50%);
}
.nkt-video-banner-copy h2 {
  margin: 0 0 19px;
  color: #064e32;
  font-size: clamp(2.55rem, 5.9cqw, 5rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.06em;
  text-transform: uppercase;
}
.nkt-video-banner-copy h2 span { display: block; }
.nkt-video-banner-copy h2 span + span { margin-top: .16em; }
.nkt-video-banner-copy h2::after {
  content: "";
  display: block;
  width: 71%;
  height: .27em;
  margin: .22em 0 0 .08em;
  border-top: .11em solid #65ca8f;
  border-radius: 50% 100% 0 0;
  transform: rotate(-5deg);
}
@media (prefers-reduced-motion: no-preference) {
  .nkt-video-banner-copy h2 span { animation: nkt-video-title-wave 4s ease-in-out infinite; }
  .nkt-video-banner-copy h2 span + span { animation-delay: 210ms; }
  .nkt-video-banner-copy h2::after { animation: nkt-video-underline-wave 4s ease-in-out infinite; transform-origin: left; }
}
@keyframes nkt-video-title-wave {
  0%, 39%, 100% { transform: translateY(0); color: #064e32; }
  17% { transform: translateY(-.18em); color: #0b7950; }
}
@keyframes nkt-video-underline-wave {
  0%, 39%, 100% { transform: rotate(-5deg) scaleX(1); }
  17% { transform: rotate(-5deg) scaleX(.62); }
}
.nkt-video-mosaic { position: absolute; inset: 0; }
.nkt-video-tile {
  position: absolute;
  top: var(--tile-y);
  left: var(--tile-x);
  width: var(--tile-w);
  height: var(--tile-h);
  display: block;
  overflow: hidden;
  border: clamp(2px, .38cqw, 5px) solid #fbfffd;
  border-radius: clamp(12px, 2.8cqw, 37px);
  background: #c7efdc;
  perspective: 680px;
}
.nkt-video-tile:nth-child(1) { --tile-x: 32%; --tile-y: 15.6%; --tile-w: 21.5%; --tile-h: 42%; }
.nkt-video-tile:nth-child(2) { --tile-x: 51.5%; --tile-y: 5.5%; --tile-w: 12.7%; --tile-h: 20.7%; }
.nkt-video-tile:nth-child(3) { --tile-x: 64.2%; --tile-y: 4.1%; --tile-w: 10.7%; --tile-h: 22.1%; }
.nkt-video-tile:nth-child(4) { --tile-x: 74.9%; --tile-y: 2.9%; --tile-w: 11.4%; --tile-h: 22.4%; }
.nkt-video-tile:nth-child(5) { --tile-x: 86.2%; --tile-y: 1.6%; --tile-w: 12.7%; --tile-h: 22.3%; }
.nkt-video-tile:nth-child(6) { --tile-x: 49.4%; --tile-y: 26%; --tile-w: 19.3%; --tile-h: 35.3%; }
.nkt-video-tile:nth-child(7) { --tile-x: 68.6%; --tile-y: 24.8%; --tile-w: 16.2%; --tile-h: 36.5%; }
.nkt-video-tile:nth-child(8) { --tile-x: 84.1%; --tile-y: 23.7%; --tile-w: 14.9%; --tile-h: 37.8%; }
.nkt-video-tile:nth-child(9) { --tile-x: 23.6%; --tile-y: 57.4%; --tile-w: 13.7%; --tile-h: 22.8%; }
.nkt-video-tile:nth-child(10) { --tile-x: 37%; --tile-y: 57.4%; --tile-w: 12.6%; --tile-h: 22.8%; }
.nkt-video-tile:nth-child(11) { --tile-x: 49.4%; --tile-y: 61.1%; --tile-w: 12.1%; --tile-h: 19.1%; }
.nkt-video-tile:nth-child(12) { --tile-x: 61.5%; --tile-y: 61.1%; --tile-w: 11.2%; --tile-h: 19.1%; }
.nkt-video-tile:nth-child(13) { --tile-x: 72.7%; --tile-y: 61.1%; --tile-w: 12.1%; --tile-h: 19.1%; }
.nkt-video-tile:nth-child(14) { --tile-x: 23.4%; --tile-y: 80.15%; --tile-w: 11.8%; --tile-h: 18.6%; }
.nkt-video-tile:nth-child(15) { --tile-x: 35.2%; --tile-y: 80.15%; --tile-w: 12.5%; --tile-h: 18.6%; }
.nkt-video-tile:nth-child(16) { --tile-x: 47.7%; --tile-y: 80.15%; --tile-w: 11.7%; --tile-h: 18.6%; }
.nkt-video-tile:nth-child(17) { --tile-x: 59.4%; --tile-y: 80.15%; --tile-w: 14%; --tile-h: 18.6%; }
.nkt-video-tile:nth-child(1),
.nkt-video-tile:nth-child(8) { z-index: 1; }
.nkt-video-tile:focus-visible { outline: 3px solid #064e32; outline-offset: -5px; z-index: 3; }
.nkt-video-tile-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #e6faf2, #9fe3c8);
}
.nkt-video-tile-face::before {
  position: absolute;
  inset: -12%;
  content: "";
  background: var(--portrait-background) center / cover no-repeat;
  filter: blur(14px);
  opacity: .22;
}
.nkt-video-tile img {
  position: relative;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent),
    linear-gradient(180deg, transparent, #000 5%, #000 97%, transparent);
  mask-composite: intersect;
}
.nkt-video-tile:is(:hover, :focus-visible) { border-color: #0d7950; z-index: 3; }

.nkt-video-catalog { padding-block: 12px clamp(42px, 7vw, 85px); }
.nkt-video-catalog h2 { margin: 0 0 14px; color: #084b2b; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 750; }
.nkt-video-filters { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 24px; }
.nkt-video-tags {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 4px 9px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #90b5a3 transparent;
}
.nkt-video-filters button {
  flex: none;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid #d6e9df;
  border-radius: 100px;
  background: var(--video-mint);
  color: #194d37;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.nkt-video-filters button:hover:not(:disabled) { background: #d2eadd; }
.nkt-video-filters button[aria-pressed="true"],
.nkt-video-filters button[aria-pressed="true"]:hover { border-color: var(--video-green); background: var(--video-green); color: #fff; }
.nkt-video-tags button:focus-visible { outline-offset: 1px; }
.nkt-video-tag-controls { display: flex; gap: 5px; padding-top: 4px; }
.nkt-video-tag-controls button { width: 44px; padding: 0; background: #fff; font-size: 1.5rem; }
.nkt-video-tag-controls button:disabled { opacity: .4; }

.nkt-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
.nkt-video-card {
  min-width: 0;
  border: 1px solid #dce9e2;
  border-radius: 14px;
  background: #fff;
  scroll-margin-top: 6px;
}
.nkt-video-card:target { outline: 2px solid #16855c; outline-offset: 4px; }
.nkt-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 13px 13px 0 0;
  background: #172e25;
}
.nkt-video-frame iframe, .nkt-video-play, .nkt-video-play img { display: block; width: 100%; height: 100%; border: 0; }
.nkt-video-play img { object-fit: cover; }
.nkt-video-play:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.nkt-video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: rgba(8, 64, 43, .88);
}
.nkt-video-play-icon::before {
  margin-left: 4px;
  border: solid transparent;
  border-width: 8px 0 8px 12px;
  border-left-color: #fff;
  content: "";
}
.nkt-video-play:hover .nkt-video-play-icon, .nkt-video-play:focus-visible .nkt-video-play-icon { background: var(--video-green); }
.nkt-video-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(12, 27, 21, .9);
  color: #fff;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.nkt-video-card-body { padding: 14px 14px 16px; }
.nkt-video-card-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.65em;
  margin: 0 0 9px;
  color: var(--video-ink);
  font-size: 1.07rem;
  font-weight: 750;
  line-height: 1.325;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.nkt-video-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .45em;
  margin: 0 0 5px;
  color: var(--video-muted);
  font-size: .87rem;
}
.nkt-video-card-meta a { font-weight: 700; }
.nkt-video-card-meta .nkt-video-views { font-weight: inherit; }
.nkt-video-card-meta span::before { margin-right: .45em; content: "·"; }
.nkt-video-stage { margin: 0; color: var(--video-muted); font-size: .81rem; }

@media (max-width: 991px) {
  .nkt-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .nkt-video-banner { aspect-ratio: auto; padding: 22px 9px 9px; }
  .nkt-video-banner-copy { position: static; width: auto; transform: none; text-align: center; }
  .nkt-video-banner-copy h2 { margin-bottom: 7px; font-size: clamp(2rem, 8.1cqw, 3.55rem); }
  .nkt-video-banner-copy h2 span { display: inline-block; }
  .nkt-video-banner-copy h2 span + span { margin: 0; }
  .nkt-video-banner-copy h2::after { width: min(140px, 42%); margin: .18em auto 0; }
  .nkt-video-mosaic {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: clamp(74px, 28cqw, 145px);
    gap: 4px;
    margin-top: 9px;
  }
  .nkt-video-tile { position: relative; inset: auto; width: auto; height: auto; }
  .nkt-video-tile:first-child { grid-area: span 2 / span 2; }
  .nkt-video-tile:nth-child(n+10) { display: none; }
}
@media (max-width: 639px) {
  .nkt-video-container { width: calc(100% - 28px); }
  .nkt-video-hero { padding-top: 14px; }
  .nkt-video-hero h1 { margin: 8px 0 19px; }
  .nkt-video-tag-controls { display: none; }
  .nkt-video-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .nkt-video-filters { margin-bottom: 17px; }
}
