/* ========================= Repository Page ========================= */

/* ---- Hero ---- */
.repo-hero {
  padding-top: 160px;
  padding-bottom: 48px;
  background: var(--bg);
}

.repo-hero__inner {
  width: min(1441px, calc(100% - 96px));
  margin: 0 auto;
}

.repo-hero__title {
  display: flex;
  flex-direction: column;
  font-family: 'Sohne', sans-serif;
  font-weight: 400;
  font-size: 52px;
  line-height: 0.97;
  letter-spacing: -1.04px;
  margin: 0;
}

.repo-hero__title-accent {
  color: transparent;
  background-image: linear-gradient(270deg, #ff8e1b 7.41%, #f8280d 101.85%);
  background-clip: text;
  -webkit-background-clip: text;
}

.repo-hero__title-copy {
  color: var(--fg);
}

.repo-hero__subtitle {
  margin-top: 24px;
  font-family: 'Sohne', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--gray);
  max-width: 560px;
  text-wrap: balance;
}

/* ---- Logo marquee ---- */
.repo-marquee {
  overflow: hidden;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg);
}

/* ---- Portfolio section ---- */
.repo-portfolio {
  background: var(--bg);
  padding-top: 48px;
  padding-bottom: 120px;
  scroll-margin-top: 112px;
}

.repo-portfolio__inner {
  width: min(1441px, calc(100% - 96px));
  margin: 0 auto;
}

/* ---- Format tabs (Video / Image) ---- */
.repo-portfolio__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.repo-portfolio__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: 'Sohne', sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--gray);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.repo-portfolio__tab:hover {
  color: var(--fg);
}

.repo-portfolio__tab.is-active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

.repo-portfolio__tab svg {
  flex-shrink: 0;
}

/* ---- Category pills ---- */
.repo-portfolio__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.repo-portfolio__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  background: transparent;
  font-family: 'Sohne', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.repo-portfolio__pill:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.35);
}

.repo-portfolio__pill.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ---- Grid ---- */
.repo-portfolio__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

/* ---- Card ---- */
.repo-portfolio__card {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.repo-portfolio__card:hover {
  transform: translateY(-4px);
}

.repo-portfolio__card.is-hidden {
  display: none;
}

.repo-portfolio__card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.repo-portfolio__card-media img,
.repo-portfolio__card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.repo-portfolio__card-media img {
  position: relative;
  z-index: 2;
}

.repo-portfolio__card-media video {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* On hover: hide img, let clicks reach video controls. Mouse and trackpad only: on a phone :hover sticks
   after a tap and would leave the card showing a video that has no frame yet, which iOS paints black. */
@media (hover: hover) and (pointer: fine) {
  .repo-portfolio__card:hover .repo-portfolio__card-media img {
    opacity: 0;
    pointer-events: none;
  }

  /* Bring video above img on hover so controls are interactive */
  .repo-portfolio__card:hover .repo-portfolio__card-media video {
    z-index: 3;
  }

  .repo-portfolio__card:hover .repo-portfolio__card-media img,
  .repo-portfolio__card:hover .repo-portfolio__card-media video {
    transform: scale(1.04);
  }
}

/* Phones: the card on screen plays muted (repository.js). The thumbnail stays on top until the video is
   really playing, then fades, so a card is never black. */
.repo-portfolio__card.is-previewing .repo-portfolio__card-media img {
  opacity: 0;
}

/* ---- Video tags ---- */
.repo-portfolio__tags {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  max-width: calc(100% - 1.25rem);
  pointer-events: none;
}

.repo-portfolio__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.625rem;
  max-width: 100%;
  padding: 0.35rem 0.625rem 0.275rem;
  border: 1px solid rgba(247, 248, 248, 0.16);
  border-radius: 999px;
  background: rgba(8, 9, 10, 0.64);
  font-family: 'Nord', sans-serif;
  font-weight: 400;
  font-size: 0.625rem;
  letter-spacing: 0.055rem;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(247, 248, 248, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0.5rem 1.125rem rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.repo-portfolio__tag::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  flex: 0 0 auto;
  border-radius: 999px;
}

.repo-portfolio__tag--brand {
  border-color: rgba(255, 142, 27, 0.4);
}

.repo-portfolio__tag--language {
  border-color: rgba(216, 252, 20, 0.34);
}

.repo-portfolio__tag--brand::before {
  background: linear-gradient(90deg, #ff8e1b 0%, #f8280d 100%);
  box-shadow: 0 0 0.65rem rgba(248, 40, 13, 0.32);
}

.repo-portfolio__tag--language::before {
  background: linear-gradient(90deg, var(--accent) 0%, #02d1ad 50%, #1292fe 100%);
  box-shadow: 0 0 0.65rem rgba(216, 252, 20, 0.26);
}

/* ---- Load more ---- */
.repo-portfolio__load-more {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

.repo-portfolio__load-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 48px;
  padding: 0 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  font-family: 'Sohne', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.25s ease;
}

.repo-portfolio__load-btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ========================= Responsive ========================= */

@media (max-width: 1199px) {
  .repo-hero {
    padding-top: 140px;
    padding-bottom: 40px;
  }

  .repo-hero__inner {
    width: calc(100% - 64px);
  }

  .repo-hero__title {
    font-size: clamp(2.75rem, 5.4vw, 3.25rem);
  }

  .repo-portfolio__inner {
    width: calc(100% - 64px);
  }

  .repo-portfolio__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 991px) {
  .repo-portfolio {
    scroll-margin-top: 96px;
  }

  .repo-hero {
    padding-top: 120px;
    padding-bottom: 36px;
  }

  .repo-hero__inner {
    width: calc(100% - 48px);
  }

  .repo-hero__title {
    font-size: clamp(2.25rem, 6vw, 2.75rem);
  }

  .repo-portfolio__inner {
    width: calc(100% - 48px);
  }

  .repo-portfolio__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .repo-portfolio__categories {
    gap: 8px;
  }
}

@media (max-width: 767px) {
  .repo-portfolio {
    scroll-margin-top: 84px;
  }

  .repo-hero {
    padding-top: 104px;
    padding-bottom: 32px;
  }

  .repo-hero__inner {
    width: calc(100% - 32px);
  }

  .repo-hero__title {
    font-size: clamp(2rem, 10vw, 2.5rem);
    line-height: 1;
  }

  .repo-hero__subtitle {
    font-size: 16px;
    margin-top: 16px;
  }

  .repo-portfolio__inner {
    width: calc(100% - 32px);
  }

  .repo-portfolio__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .repo-portfolio__tabs {
    margin-bottom: 16px;
  }

  .repo-portfolio__tab {
    padding: 12px 20px;
    font-size: 14px;
  }

  .repo-portfolio__pill {
    padding: 6px 16px;
    font-size: 13px;
  }

  .repo-portfolio__categories {
    margin-bottom: 28px;
  }

  .repo-portfolio {
    padding-bottom: 80px;
  }
}

@media (max-width: 479px) {
  .repo-hero__inner,
  .repo-portfolio__inner {
    width: calc(100% - 24px);
  }

  .repo-hero__title {
    font-size: clamp(1.75rem, 9vw, 2.25rem);
  }

  .repo-portfolio__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }

  .repo-portfolio__categories {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
  }

  .repo-portfolio__categories::-webkit-scrollbar {
    display: none;
  }
}

/* ---- CTA ---- */
.repo-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8280d 0%, #ff8e1b 50%, #f8280d 100%);
  background-size: 200% 200%;
  animation: repo-cta-shift 8s ease infinite;
  padding: 160px 0;
}

@keyframes repo-cta-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Grain overlay */
.repo-cta__grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  pointer-events: none;
}

/* Content */
.repo-cta__inner {
  position: relative;
  z-index: 2;
  width: min(1441px, calc(100% - 96px));
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.repo-cta__eyebrow {
  font-family: 'Nord', sans-serif;
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(8, 9, 10, 0.55);
  margin-bottom: 24px;
}

.repo-cta__title {
  font-family: 'Tomato Grotesk', sans-serif;
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -2px;
  color: #08090a;
  margin: 0;
  max-width: 800px;
}

.repo-cta__subtitle {
  margin-top: 24px;
  font-family: 'Sohne', sans-serif;
  font-size: 19px;
  line-height: 1.5;
  color: rgba(8, 9, 10, 0.65);
}

.repo-cta__button {
  margin-top: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  height: 3rem;
  padding: 0 44px;
  border-radius: 0.25rem;
  background: #08090a;
  font-family: 'Sohne', sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, gap 0.3s ease;
}

.repo-cta__button svg {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.repo-cta__button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  gap: 14px;
}

.repo-cta__button:hover svg {
  transform: translateX(4px);
}

@media (max-width: 991px) {
  .repo-cta {
    padding: 120px 0;
  }
  .repo-cta__inner {
    width: calc(100% - 48px);
  }
  .repo-cta__title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    letter-spacing: -1px;
  }
}

@media (max-width: 767px) {
  .repo-cta {
    padding: 96px 0;
  }
  .repo-cta__inner {
    width: calc(100% - 32px);
  }
  .repo-cta__title {
    font-size: clamp(2rem, 10vw, 2.75rem);
    letter-spacing: -0.5px;
  }
  .repo-cta__title br { display: none; }
  .repo-cta__subtitle {
    font-size: 16px;
  }
  .repo-cta__button {
    width: 100%;
  }
}


/* What the selected ad format is for, under the pills */
.repo-portfolio__caption {
  max-width: 40rem;
  margin: -1.5rem 0 2.5rem;
  font-family: Sohne, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray);
}
.repo-portfolio__caption[hidden] { display: none; }
@media (max-width: 767px) {
  .repo-portfolio__caption { margin: -1rem 0 1.75rem; font-size: 14px; }
}

/* ========================= Cards open the feed ========================= */
.repo-portfolio__card:focus-visible { outline: 2px solid rgba(247, 248, 248, 0.72); outline-offset: 3px; }
html.repo-viewer-open, html.repo-viewer-open body { overflow: hidden; }

/* ========================= Video feed (repository) =========================
   TikTok's grammar: one video at a time, native vertical snap scrolling (finger, trackpad or wheel), category
   tabs on top, caption bottom left, sound on the right, a scrub bar along the bottom. Full screen on phones;
   on desktop each video sits in a centred 9:16 column (.repo-feed--desktop, at the end). */
.repo-feed {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  color: #fff;
  font-family: Sohne, sans-serif;
}
.repo-feed[hidden] { display: none; }
.repo-feed:focus { outline: none; } /* focused by script after a mouse click, see repository.js */
.repo-feed__track {
  position: absolute;
  inset: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.repo-feed__track::-webkit-scrollbar { display: none; }
.repo-feed__slide {
  position: relative;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
}
/* the shade under the caption, so white text reads on any frame */
.repo-feed__slide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
}
.repo-feed__poster, .repo-feed__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.repo-feed__video { z-index: 0; background: transparent; }
.repo-feed__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 18px;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.repo-feed__tabs {
  display: flex;
  gap: 18px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 0 8px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.repo-feed__tabs::-webkit-scrollbar { display: none; }
/* room after the last tab, so it can scroll clear of the fade on the right */
.repo-feed__tabs::after { content: ""; flex: 0 0 30px; }
.repo-feed__tab {
  position: relative;
  flex: 0 0 auto;
  padding: 10px 0;
  border: 0;
  background: none;
  font-family: Sohne, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.62);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.repo-feed__tab.is-active { color: #fff; }
.repo-feed__tab.is-active::after {
  content: "";
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}
.repo-feed__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  cursor: pointer;
}
.repo-feed__btn svg, .repo-feed__flash svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.repo-feed__btn:focus-visible, .repo-feed__tab:focus-visible, .repo-feed__cta:focus-visible { outline: 2px solid #d8fc14; outline-offset: 2px; }
.repo-feed__rail {
  position: absolute;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 120px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.repo-feed__caption {
  position: absolute;
  left: 16px;
  right: 76px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 36px);
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.repo-feed__brand { margin: 0; font-weight: 600; font-size: 17px; line-height: 1.3; }
.repo-feed__cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  margin-top: 12px;
  padding: 0 18px;
  border-radius: 999px;
  background: #d8fc14;
  font-weight: 600;
  font-size: 15px;
  color: #000;
  text-shadow: none;
  text-decoration: none;
}
/* Scrub bar: a thin line along the bottom that the finger, the mouse or the arrow keys move. The hit area is
   taller than the line; the line thickens and shows a dot while in use, with the time above it, and the rest
   of the overlay steps back. touch-action: none keeps a drag along it from scrolling the feed. */
.repo-feed__scrub {
  position: absolute;
  left: 0;
  right: 0;
  bottom: env(safe-area-inset-bottom, 0px);
  z-index: 3;
  display: flex;
  align-items: flex-end;
  height: 28px;
  touch-action: none;
  cursor: pointer;
  outline: none;
}
.repo-feed__scrub-bar {
  position: relative;
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  transition: height 150ms;
}
.repo-feed__scrub-fill {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.repo-feed__scrub-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 150ms, transform 150ms;
}
.repo-feed.is-scrubbing .repo-feed__scrub-bar, .repo-feed__scrub:focus-visible .repo-feed__scrub-bar, .repo-feed__scrub.is-seeking .repo-feed__scrub-bar { height: 6px; }
.repo-feed.is-scrubbing .repo-feed__scrub-thumb, .repo-feed__scrub:focus-visible .repo-feed__scrub-thumb, .repo-feed__scrub.is-seeking .repo-feed__scrub-thumb { opacity: 1; transform: scale(1); }
@media (hover: hover) and (pointer: fine) {
  .repo-feed__scrub:hover .repo-feed__scrub-bar { height: 6px; }
  .repo-feed__scrub:hover .repo-feed__scrub-thumb { opacity: 1; transform: scale(1); }
}
.repo-feed__scrub-time {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-weight: 600;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms;
}
.repo-feed.is-scrubbing .repo-feed__scrub-time, .repo-feed__scrub.is-seeking .repo-feed__scrub-time { opacity: 1; }
.repo-feed__caption, .repo-feed__rail, .repo-feed__top { transition: opacity 150ms; }
.repo-feed.is-scrubbing .repo-feed__caption, .repo-feed.is-scrubbing .repo-feed__rail, .repo-feed.is-scrubbing .repo-feed__top { opacity: 0; }
.repo-feed__hint {
  position: absolute;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  z-index: 3;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  font-family: Sohne, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}
.repo-feed__hint[hidden] { display: none; }
/* Swipe hint: the feed scrolls a short way to show the top of the next video, twice (repository.js), while
   the label and a rising chevron say what to do. */
.repo-feed__swipe {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 240px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 18px 10px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 250ms;
}
.repo-feed__swipe.is-on { opacity: 1; }
.repo-feed__swipe svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.repo-feed__swipe.is-on svg { animation: repo-feed-chevron 1.1s ease-in-out infinite; }
@keyframes repo-feed-chevron {
  0% { transform: translateY(6px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(-8px); opacity: 0; }
}
/* the play / pause icon flashes and fades, it never stays on the video */
.repo-feed__flash {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: opacity 400ms, transform 400ms;
}
.repo-feed__flash.is-on { opacity: 1; transform: scale(1); transition-duration: 80ms; }
.repo-feed__flash svg { width: 32px; height: 32px; fill: #fff; stroke: none; }
@media (prefers-reduced-motion: reduce) {
  .repo-feed__flash { transition: none; }
  /* the label still shows, nothing moves */
  .repo-feed__swipe.is-on svg { animation: none; }
}

/* Bars over the feed let wheel, trackpad and taps through where they have no button: only their children
   catch the pointer, so scrolling over the tabs row still moves the feed. */
.repo-feed__top, .repo-feed__rail { pointer-events: none; }
.repo-feed__top > *, .repo-feed__rail > * { pointer-events: auto; }
/* up / down buttons beside the video: desktop only */
.repo-feed__nav-btn { display: none; }
.repo-feed__nav-btn:disabled { opacity: 0.35; cursor: default; }

/* ---- Desktop: the same feed, each video in a centred 9:16 column on a dark backdrop ----
   Trackpad and wheel scroll it natively, one video per gesture. The column fills the height between the tabs
   row and a bottom margin; a click on the backdrop closes the feed (repository.js). */
.repo-feed--desktop {
  --top: 64px;
  --bottom: 24px;
  --col-h: calc(100vh - var(--top) - var(--bottom));
  --col-w: min(calc(var(--col-h) * 9 / 16), calc(100vw - 240px));
  background: #0b0c0d;
}
.repo-feed--desktop .repo-feed__slide { background: transparent; cursor: default; }
.repo-feed--desktop .repo-feed__slide::after {
  left: calc(50% - var(--col-w) / 2);
  right: auto;
  bottom: var(--bottom);
  width: var(--col-w);
  height: calc(var(--col-h) * 0.45);
  border-radius: 0 0 12px 12px;
}
.repo-feed--desktop .repo-feed__poster,
.repo-feed--desktop .repo-feed__video {
  inset: var(--top) auto auto calc(50% - var(--col-w) / 2);
  width: var(--col-w);
  height: var(--col-h);
  border-radius: 12px;
  cursor: pointer;
}
.repo-feed--desktop .repo-feed__caption {
  left: calc(50% - var(--col-w) / 2 + 16px);
  right: auto;
  width: calc(var(--col-w) - 32px);
  bottom: calc(var(--bottom) + 36px);
}
.repo-feed--desktop .repo-feed__scrub {
  left: calc(50% - var(--col-w) / 2 + 12px);
  right: auto;
  width: calc(var(--col-w) - 24px);
  bottom: var(--bottom);
}
.repo-feed--desktop .repo-feed__top { justify-content: center; padding: 12px 80px; background: none; }
.repo-feed--desktop .repo-feed__tabs { flex: 0 1 auto; -webkit-mask-image: none; mask-image: none; }
.repo-feed--desktop .repo-feed__tabs::after { content: none; }
.repo-feed--desktop .repo-feed__close { position: absolute; top: 10px; right: 20px; }
.repo-feed--desktop .repo-feed__rail {
  top: 50%;
  right: auto;
  bottom: auto;
  left: calc(50% + var(--col-w) / 2 + 20px);
  transform: translateY(-50%);
}
.repo-feed--desktop .repo-feed__nav-btn { display: inline-flex; }
.repo-feed--desktop .repo-feed__btn { background: rgba(255, 255, 255, 0.1); }
.repo-feed--desktop .repo-feed__btn:not(:disabled):hover { background: rgba(255, 255, 255, 0.2); }
.repo-feed--desktop .repo-feed__hint { top: calc(var(--top) + 16px); }
.repo-feed--desktop .repo-feed__flash { top: calc(var(--top) + var(--col-h) / 2); }
.repo-feed--desktop .repo-feed__swipe { bottom: calc(var(--bottom) + 220px); }
