html {
  scroll-padding-top: var(--head);
}

.project {
  display: block;
}

.sets {
  container-type: inline-size;
}

.sets > project-slides {
  display: block;
}

.sets > project-slides + project-slides {
  margin-top: 8px;
}

.project-info {
  box-sizing: border-box;
  min-height: calc(100vh - var(--head) - 9px);
  padding: 8px 24px 72px;
  font-size: 16.5px;
  line-height: 20px;
  scroll-margin-top: 9px;
}

@supports (height: 100svh) {
  .project-info {
    min-height: calc(100svh - var(--head) - 9px);
  }
}

.project > .project-info:first-child {
  min-height: 0;
}

.project-info p {
  margin: 0;
}

.project-info .facts {
  line-height: 1.42;
}

.project-info .label {
  font-weight: 700;
}

.project-info .facts p + .years,
.project-info .facts > * + .extra {
  margin-top: 1.42em;
}

.project-info .description p + p {
  margin-top: 0.55em;
}

.project-info .links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-info .description + .links {
  margin-top: 24px;
}

.project-info .about {
  max-width: 460px;
}

.project-info .facts + .about {
  margin-top: 24px;
}

.neighbours {
  display: flex;
  margin-top: 40px;
}

.neighbours a {
  padding: 12px 0;
  color: var(--tag);
  text-decoration: none;
}

.neighbours a:hover {
  color: var(--link);
}

.neighbours span {
  display: inline-block;
}

.neighbours .prev span {
  transform: skewX(6deg);
}

.neighbours .next span {
  transform: skewX(-6deg);
}

.neighbours .next {
  margin-left: auto;
}

@media (max-width: 899.98px) and (hover: hover) and (pointer: fine) {
  html {
    scroll-snap-type: y mandatory;
  }

  html:has(project-slides:not(:defined) .slide + .slide) {
    scroll-snap-type: none;
  }

  .sets > project-slides,
  .project-info {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .sets > project-slides:first-child {
    scroll-margin-top: var(--head);
  }
}

@media (min-width: 900px) {
  .project {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 17px;
    align-items: start;
    padding: 0 34px;
  }

  .sets {
    grid-area: 1 / 1;
  }

  .sets > project-slides + project-slides {
    margin-top: 0;
  }

  .has-previous > project-slides + project-slides:last-child {
    padding-bottom: 52px;
  }

  .project-info {
    grid-area: 1 / 2;
    position: sticky;
    top: var(--head);
    display: grid;
    grid-template-columns: minmax(0, 245px) minmax(0, 232px);
    column-gap: 20px;
    align-items: start;
    min-height: 0;
    padding: 4px 0 72px;
    font-size: 12.5px;
    line-height: 15.2px;
    scroll-margin-top: 0;
  }

  .project-info .about {
    grid-area: 1 / 1;
    max-width: none;
  }

  .project-info .facts {
    grid-area: 1 / 2;
  }

  .project-info .facts + .about {
    margin-top: 0;
  }

  .neighbours {
    margin: 0;
  }

  .neighbours a {
    position: fixed;
    bottom: 26px;
    z-index: 1;
  }

  .neighbours .prev {
    left: 34px;
  }

  .neighbours .next {
    right: 40px;
    margin: 0;
  }
}
