.page-videos {
  --vid-line: rgba(255, 255, 255, 0.09);
  --vid-line-bright: rgba(34, 211, 238, 0.38);
  --vid-panel: rgba(13, 14, 17, 0.82);
  --vid-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  --vid-red: #ff0033;

  --vid-font-title: "LEMON MILK", "MADE TOMMY", var(--font-nav), system-ui, sans-serif;
  --vid-font-head: "MADE TOMMY", var(--font-nav), system-ui, sans-serif;
  padding: 0 0 4rem;
}

.vid-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2.25rem 0 2.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--vid-line);
}

.vid-hero__backdrop {
  position: absolute;
  inset: -8% -4%;
  z-index: -3;
  background-size: cover;
  background-position: 50% 40%;
  filter: saturate(0.5) blur(18px) brightness(0.75);
  transform: scale(1.06);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.vid-hero__backdrop.is-ready {
  opacity: 1;
  animation: vid-drift 48s ease-in-out infinite alternate;
}

@keyframes vid-drift {
  from { transform: scale(1.06) translate3d(-1%, 0, 0); }
  to { transform: scale(1.14) translate3d(1%, -1%, 0); }
}

.vid-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(110% 90% at 8% 0%, rgba(34, 211, 238, 0.15), transparent 56%),
    linear-gradient(100deg, rgba(5, 6, 9, 0.96) 30%, rgba(5, 6, 9, 0.8) 60%, rgba(5, 6, 9, 0.62) 100%),
    linear-gradient(to top, var(--bg) 1%, rgba(10, 10, 11, 0.4) 46%, rgba(10, 10, 11, 0.78) 100%);
}

.vid-hero__scan {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0 1px,
    transparent 1px 4px
  );
}

.vid-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1000px) {
  .vid-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 2.5rem;
  }
}

.vid-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  font-family: "Lexend", "Futura PT", "Futura", "Source Sans 3", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.7);
}

.vid-hero__eyebrow svg {
  color: var(--vid-red);
  flex: none;
}

.vid-hero__title {
  font-family: var(--font-nav);
  font-weight: 700;
  text-transform: none;
  font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
  margin: 0 0 0.9rem;
  background: linear-gradient(176deg, #ffffff 18%, #b9c3c7 62%, #65757c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.vid-hero__intro {
  max-width: 48ch;
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-family: "Lexend", "Futura PT", "Futura", "Source Sans 3", system-ui, sans-serif;
  line-height: 1.6;
  font-weight: 300;
}

.vid-hero__intro a {
  color: var(--accent);
}

.vid-stats {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border: 1px solid var(--vid-line);
  border-radius: var(--radius);
  background: rgba(10, 11, 14, 0.6);
  backdrop-filter: blur(6px);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
}

.vid-stat {
  padding: 0.75rem 1.3rem;
  border-right: 1px solid var(--vid-line);
  min-width: 7rem;
}

.vid-stat:last-child {
  border-right: none;
}

.vid-stat dt {
  margin: 0 0 0.3rem;
  font-family: "Lexend", "Futura PT", "Futura", "Source Sans 3", system-ui, sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 300;
}

.vid-stat dd {
  margin: 0;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.vid-feature {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--vid-line);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background: #0a0b0e;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.vid-feature:hover,
.vid-feature:focus-visible {
  border-color: var(--vid-line-bright);
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(34, 211, 238, 0.2);
  outline: none;
}

.vid-feature__art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0b0e;
}

.vid-feature__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.vid-feature:hover .vid-feature__art img {
  transform: scale(1.04);
}

.vid-feature__scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 70%;
  background: linear-gradient(to top, rgba(5, 6, 9, 0.97) 10%, rgba(5, 6, 9, 0.6) 52%, transparent 100%);
  pointer-events: none;
}

.vid-feature__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vid-feature__kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Lexend", "Futura PT", "Futura", "Source Sans 3", system-ui, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--accent);
  font-weight: 300;
}

.vid-feature__name {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw, 1.5rem);
  line-height: 1.22;
  color: #fff;
}

.vid-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 10, 13, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
  pointer-events: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.vid-play::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}

.vid-feature:hover .vid-play,
.vid-feature:focus-visible .vid-play {
  background: rgba(34, 211, 238, 0.85);
  border-color: transparent;
  transform: translate(-50%, -50%) scale(1.08);
}

.vid-feature:hover .vid-play::after,
.vid-feature:focus-visible .vid-play::after {
  border-left-color: #04161a;
}

.vid-deck {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--vid-line);
  border-bottom: 1px solid var(--vid-line);
  background: var(--vid-panel);
  backdrop-filter: blur(14px) saturate(1.2);
}

.vid-deck.is-stuck {
  border-bottom-color: rgba(34, 211, 238, 0.28);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.vid-deck__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 0;
}

.vid-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 240px;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--vid-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.vid-search:focus-within {
  border-color: var(--vid-line-bright);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.vid-search__icon {
  flex: none;
  color: rgba(255, 255, 255, 0.4);
}

.vid-search:focus-within .vid-search__icon {
  color: var(--accent);
}

.vid-search__input {
  flex: 1 1 auto;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-nav);
  font-size: 0.98rem;
  padding: 0;
}

.vid-search__input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.vid-search__input::-webkit-search-cancel-button {
  appearance: none;
}

.vid-search__key {
  flex: none;
  font-family: var(--font-nav);
  font-size: 0.68rem;
  line-height: 1;
  padding: 0.28rem 0.42rem;
  border-radius: 5px;
  border: 1px solid var(--vid-line);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.45);
}

.vid-search:focus-within .vid-search__key,
.vid-search.has-value .vid-search__key {
  display: none;
}

.vid-search__clear {
  flex: none;
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.vid-search.has-value .vid-search__clear {
  display: block;
}

.vid-search__clear:hover {
  background: rgba(34, 211, 238, 0.25);
}

.vid-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.vid-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.44rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--vid-line);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-nav);
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}

.vid-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
}

.vid-chip__n {
  font-family: var(--font-nav);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
}

.vid-chip[aria-pressed="true"] {
  color: #04161a;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.vid-chip[aria-pressed="true"] .vid-chip__n {
  color: rgba(4, 22, 26, 0.65);
}

.vid-tools {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.vid-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.44rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--vid-line);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-nav);
  font-size: 0.84rem;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s;
}

.vid-tool:hover {
  color: var(--accent);
  border-color: var(--vid-line-bright);
}

.vid-tool svg {
  flex: none;
}

.vid-count {
  padding: 0 0 0.65rem;

  margin: 0 auto;
  font-family: "Lexend", "Futura PT", "Futura", "Source Sans 3", system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
}

.channel-videos-grid {
  margin-top: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr));
}

.channel-videos-grid > li[hidden] {
  display: none;
}

.channel-videos-grid > li {
  position: relative;
  list-style: none;
  margin: 0;
}

.video-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  text-align: left;
  margin: 0;
  padding: 0;
  border: 1px solid var(--vid-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  cursor: pointer;
  color: var(--text);
  font: inherit;
  isolation: isolate;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.video-tile:hover,
.video-tile:focus-visible {
  border-color: var(--vid-line-bright);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(34, 211, 238, 0.18);
  outline: none;
}

.video-tile-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #0a0b0e;
  overflow: hidden;
}

.video-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s;
  filter: saturate(0.92);
}

.video-tile:hover .video-tile-thumb img,
.video-tile:focus-visible .video-tile-thumb img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

.video-tile-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 10, 13, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(3px);
  opacity: 0.85;
  pointer-events: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, opacity 0.2s;
}

.video-tile-play::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}

.video-tile:hover .video-tile-play,
.video-tile:focus-visible .video-tile-play {
  background: rgba(34, 211, 238, 0.9);
  border-color: transparent;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.video-tile:hover .video-tile-play::after,
.video-tile:focus-visible .video-tile-play::after {
  border-left-color: #04161a;
}

.video-tile-tag,
.video-tile-ep {
  position: absolute;
  top: 0.5rem;
  z-index: 2;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  background: rgba(4, 6, 9, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  font-family: var(--font-nav);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.78);
}

.video-tile-tag {
  left: 0.5rem;
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.28);
}

.video-tile-ep {
  right: 0.5rem;
}

.video-tile-caption {
  display: block;
  padding: 0.7rem 0.8rem 0.8rem;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-tile-yt {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(4, 6, 9, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.18s, color 0.18s, border-color 0.18s;
}

.channel-videos-grid > li:has(.video-tile-ep) .video-tile-yt {
  right: 3.6rem;
}

.channel-videos-grid > li:hover .video-tile-yt,
.channel-videos-grid > li:focus-within .video-tile-yt {
  opacity: 1;
}

.video-tile-yt:hover,
.video-tile-yt:focus-visible {
  color: var(--vid-red);
  border-color: rgba(255, 0, 51, 0.5);
  opacity: 1;
}

.video-tile-yt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.video-tile mark {
  background: rgba(34, 211, 238, 0.26);
  color: #eafdff;
  border-radius: 2px;
  padding: 0 1px;
}

body.vid-view-list .channel-videos-grid {
  display: block;
  border-top: 1px solid var(--vid-line);
}

body.vid-view-list .video-tile {
  display: grid;
  grid-template-columns: 2.6rem 150px minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  border: none;
  border-bottom: 1px solid var(--vid-line);
  border-radius: 0;
  background: none;
  padding: 0.55rem 0.6rem;
  transform: none;
  box-shadow: none;
}

body.vid-view-list .video-tile:hover,
body.vid-view-list .video-tile:focus-visible {
  background: rgba(34, 211, 238, 0.06);
  transform: none;
  box-shadow: none;
}

body.vid-view-list .video-tile::before {
  content: attr(data-ord);
  font-family: var(--font-nav);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.28);
  font-variant-numeric: tabular-nums;
}

body.vid-view-list .video-tile-thumb {
  width: 150px;
  border-radius: 6px;
}

body.vid-view-list .video-tile-play {
  width: 30px;
  height: 30px;
}

body.vid-view-list .video-tile-play::after {
  border-width: 6px 0 6px 10px;
}

body.vid-view-list .video-tile-tag,
body.vid-view-list .video-tile-ep {
  padding: 0.1rem 0.28rem;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
}

body.vid-view-list .video-tile-tag {
  top: auto;
  bottom: 0.22rem;
  left: 0.22rem;
}

body.vid-view-list .video-tile-ep {
  top: 0.22rem;
  right: 0.22rem;
}

body.vid-view-list .video-tile-caption {
  padding: 0;
  font-size: 0.98rem;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

body.vid-view-list .video-tile-yt {
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
}

body.vid-view-list .channel-videos-grid > li:has(.video-tile-ep) .video-tile-yt {
  right: 0.4rem;
}

.channel-videos-loading,
.channel-videos-error,
.vid-empty {
  grid-column: 1 / -1;
  margin: 2rem auto;
  max-width: 40rem;
  padding: 2.25rem 1.5rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--vid-line);
  border-radius: var(--radius);
}

.vid-empty[hidden] {
  display: none;
}

.vid-empty strong {
  display: block;
  font-family: var(--font-nav);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.channel-videos-notice {
  max-width: none;
  margin: 0 0 1.5rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(234, 179, 8, 0.35);
  border-radius: 8px;
  background: rgba(234, 179, 8, 0.05);
}

body:not(.site-admin-session) .channel-videos-notice {
  display: none !important;
}

.video-page-cta {
  margin-top: 3rem;
  text-align: center;
}

.video-modal-dialog {
  width: min(96vw, 1100px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
}

.video-modal-title {
  margin: 0;
  padding: 0.75rem 3.25rem 0.8rem 1rem;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--text);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.video-modal-title a {
  display: inline-block;
  margin-top: 0.3rem;
  font-family: "Lexend", "Futura PT", "Futura", "Source Sans 3", system-ui, sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--accent);
  text-decoration: none;
  font-weight: 300;
}

.video-modal-title a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .vid-hero__backdrop.is-ready {
    animation: none;
  }

  .video-tile,
  .video-tile-thumb img,
  .vid-feature,
  .vid-feature__art img {
    transition: none;
  }

  .video-tile:hover,
  .video-tile:focus-visible,
  .vid-feature:hover,
  .vid-feature:focus-visible {
    transform: none;
  }
}

@media (max-width: 900px) {
  .vid-hero {
    padding: 1.5rem 0 2rem;
  }

  .vid-tools {
    margin-left: 0;
  }

  .vid-stat {
    padding: 0.6rem 1rem;
    min-width: 6rem;
  }

  .vid-stat dd {
    font-size: 1.55rem;
  }
}

@media (max-width: 620px) {
  .vid-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .vid-stat:nth-child(odd) {
    border-right: 1px solid var(--vid-line);
  }

  .vid-stat:nth-child(even) {
    border-right: none;
  }

  .vid-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--vid-line);
  }

  .vid-stat:nth-child(odd):last-child {
    grid-column: 1 / -1;
    border-right: none;
  }

  .vid-filters {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .vid-filters::-webkit-scrollbar {
    display: none;
  }

  .channel-videos-grid {
    grid-template-columns: 1fr;
  }

  body.vid-view-list .video-tile {
    grid-template-columns: 2rem 110px minmax(0, 1fr);
  }

  body.vid-view-list .video-tile-thumb {
    width: 110px;
  }
}
