.youtube-demo {
  --rail: 126px;
}
.tube-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.tube-mark > svg {
  width: 43px;
  height: 31px;
  fill: var(--structure);
}
.tube-mark > svg path {
  fill: #000;
}
.tube-mark > span {
  font:
    500 33px/1 Antonio,
    sans-serif;
  color: var(--text);
  letter-spacing: -0.025em;
}
.tube-mark > small {
  color: var(--secondary);
  font:
    400 14px/1 Antonio,
    sans-serif;
  align-self: start;
  padding-top: 3px;
}
.tube-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--control);
  border-radius: 26px;
  height: 48px;
  width: min(520px, 48vw);
  margin: 0 auto;
  padding-left: 21px;
  overflow: hidden;
}
.tube-search:focus-within {
  outline: 2px solid var(--bright);
  outline-offset: 3px;
}
.tube-search input {
  font-size: 15px;
}
.tube-search button {
  width: 65px;
  height: 48px;
  flex: none;
  border: 0;
  background: var(--control);
  color: #000;
  padding: 13px 21px;
}
.tube-search button:hover {
  background: var(--secondary);
}
.tube-search button:focus-visible {
  outline-offset: -5px;
}
.tube-search svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.workshop-link {
  color: var(--secondary);
  padding: 12px 0;
  text-decoration: none;
}
.workshop-link:hover {
  text-decoration: underline;
}
.youtube-demo .console-frame {
  grid-template-rows: 52px minmax(580px, 1fr) 48px;
}
.nav-bank {
  display: flex;
  flex-direction: column;
  gap: var(--frame-gap);
}
.nav-bank > button,
.nav-bank > a {
  display: flex;
  align-items: end;
  justify-content: end;
  min-height: 64px;
  padding: 14px;
  border: 0;
  background: var(--control);
  color: #000;
  font:
    500 18px/1.2 Antonio,
    sans-serif;
  text-align: right;
  text-decoration: none;
}
.nav-bank > button[aria-pressed='true'] {
  background: var(--structure);
}
.nav-bank > button:hover,
.nav-bank > a:hover {
  background: var(--bright);
}
.examples-nav > a:first-child {
  background: var(--data);
}
.examples-nav > a:last-child {
  background: var(--secondary);
}
.youtube-demo .rail-fill {
  min-height: 140px;
}
.video-library {
  min-width: 0;
  padding: 11px 30px 32px 35px;
}
.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 29px;
}
.youtube-demo h1 {
  color: var(--bright);
  font:
    500 clamp(30px, 3.4vw, 47px)/1.15 Antonio,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}
.library-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.collection-tag {
  color: var(--muted);
  white-space: nowrap;
  font:
    400 14px/1.4 Antonio,
    sans-serif;
}
.library-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.topic-group {
  min-width: 0;
}
.group-label {
  display: block;
  color: var(--muted);
  font:
    400 14px/1.4 Antonio,
    sans-serif;
  text-transform: uppercase;
  margin: 0 0 9px;
}
.video-library button {
  border: 0;
  background: var(--control);
  color: #000;
  font:
    500 17px/1.2 Antonio,
    sans-serif;
  text-transform: uppercase;
  min-height: 44px;
  padding: 12px 22px;
}
.video-library button:hover {
  background: var(--bright);
}
.video-library button[aria-pressed='true'] {
  background: var(--secondary);
}
#video-count {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 31px 21px;
}
.video-card {
  min-width: 0;
}
.video-card .thumbnail {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: 14px 14px 0 0;
  padding: 0;
  overflow: hidden;
  background: #17131c;
  text-align: left;
}
.thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.thumbnail:hover img {
  opacity: 0.82;
}
.thumbnail::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--data);
}
.video-card:nth-child(2n) .thumbnail::after {
  background: var(--secondary);
}
.video-card:nth-child(3n) .thumbnail::after {
  background: var(--control);
}
.thumbnail .play {
  position: absolute;
  right: 12px;
  bottom: 16px;
  background: #000;
  color: var(--secondary);
  width: 36px;
  height: 28px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.play svg {
  width: 12px;
  height: 14px;
  fill: currentColor;
}
.thumbnail .image-fallback {
  display: none;
  padding: 24px;
  font:
    400 28px/1.2 Antonio,
    sans-serif;
  color: var(--data);
}
.thumbnail.image-failed img {
  display: none;
}
.thumbnail.image-failed .image-fallback {
  display: block;
}
.video-meta {
  display: flex;
  align-items: start;
  gap: 12px;
  padding-top: 12px;
}
.video-meta > div {
  flex: 1;
  min-width: 0;
}
.video-meta h2 {
  margin: 0;
  font:
    600 15px/1.45 system-ui,
    sans-serif;
}
.video-meta .title-button {
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
  font: inherit;
  text-transform: none;
  min-height: 44px;
}
.video-meta .title-button:hover {
  color: var(--secondary);
}
.video-meta p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.video-meta .save {
  flex: none;
  padding: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: var(--control);
}
.video-meta .save:hover {
  background: var(--control);
  color: #000;
}
.video-meta .save[aria-pressed='true'] {
  background: var(--secondary);
  color: #000;
}
.save svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.video-status,
.collection-note {
  font-size: 12px;
  color: var(--muted);
}
.video-status {
  min-height: 18px;
  margin: 20px 0 0;
  color: var(--data);
}
.collection-note {
  max-width: 80ch;
  margin: 12px 0 0;
  line-height: 1.7;
}
.watch {
  margin-bottom: 40px;
}
.watch-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 16px;
}
.watch-heading h2 {
  margin: 0;
  color: var(--secondary);
  font:
    500 28px/1.2 Antonio,
    sans-serif;
}
.watch-heading button {
  flex-shrink: 0;
  border-radius: 24px;
}
.player {
  aspect-ratio: 16/9;
  background: #15121a;
}
.player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.watch > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.watch > p a {
  color: var(--secondary);
}
.empty {
  padding: 55px 12px 70px;
}
.empty h2 {
  font:
    500 30px/1.3 Antonio,
    sans-serif;
  color: var(--secondary);
  margin: 0 0 14px;
}
.empty p {
  color: var(--muted);
}
.empty button {
  border-radius: 24px;
  margin-top: 12px;
}
.youtube-demo .mobile-library {
  display: none;
}
@media (max-width: 1100px) {
  .youtube-demo {
    --rail: 104px;
  }
  .video-library {
    padding: 12px 12px 28px 25px;
  }
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collection-tag {
    display: none;
  }
}
@media (max-width: 720px) {
  .youtube-demo {
    --rail: 18px;
  }
  .youtube-demo .masthead {
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
  }
  .tube-mark > span {
    font-size: 29px;
  }
  .tube-mark > svg {
    width: 37px;
    height: 27px;
  }
  .workshop-link {
    margin-left: auto;
    font-size: 12px;
  }
  .tube-search {
    width: 100%;
    order: 3;
    margin: 0;
  }
  .youtube-demo .console-frame {
    grid-template-rows: 42px 1fr 40px;
  }
  .youtube-demo .rail .nav-bank {
    display: none;
  }
  .video-library {
    padding: 0 0 24px 15px;
  }
  .youtube-demo .mobile-library {
    display: flex;
    margin-bottom: 27px;
  }
  .mobile-library > button {
    padding: 12px 16px;
  }
  .library-heading {
    margin-bottom: 22px;
  }
  .youtube-demo h1 {
    font-size: 34px;
  }
  .library-heading p {
    font-size: 12px;
  }
  .library-toolbar {
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 18px;
  }
  .topic-group {
    width: 100%;
  }
  #topics > button {
    padding: 12px 6px;
    font-size: 15px;
  }
  #video-count {
    margin: 9px 0 0;
  }
  .video-grid {
    grid-template-columns: 1fr;
    gap: 27px;
  }
  .video-meta h2 {
    font-size: 14px;
  }
  .collection-note {
    font-size: 11px;
  }
  .watch-heading {
    align-items: start;
    flex-direction: column-reverse;
    gap: 14px;
  }
  .watch-heading h2 {
    font-size: 25px;
  }
}
