#page-change-history.ns-page-history {
  box-sizing: border-box;
  inline-size: min(100%, 74rem);
  min-inline-size: 0;
  margin: clamp(1.5rem, 4vw, 3rem) auto 1rem;
  padding: clamp(.875rem, 3vw, 1.5rem);
  border: 1px solid #486153;
  border-radius: .9rem;
  background: #122d24;
  color: #f5f1e3;
  container: page-history / inline-size;
}

main:is(.pj-shell, .rx-atlas) > #page-change-history {
  grid-column: 1 / -1;
  inline-size: 100%;
}

/* Keep the contact card inside the two-column area, above the closing text. */
.ns-project-request-rail {
  display: contents;
}

@media (min-width: 1080px) {
  main.pj-shell > .ns-project-request-rail {
    display: block;
    grid-area: 1 / 2 / 3 / 3;
    align-self: stretch;
    min-inline-size: 0;
  }

  main.pj-shell > .ns-project-breadcrumb ~ .ns-project-request-rail {
    grid-area: 2 / 2 / 4 / 3;
  }

  main.pj-shell:has(> .ns-request-inline > #pj-ask:target) > .ns-project-request-rail {
    display: none;
  }

  main.pj-shell > .ns-project-request-rail > .ns-project-request-card[data-ns-stable-project-request] {
    margin: 0;
  }
}

@media (min-width: 1080px) and (min-height: 600px) {
  main.pj-shell > .ns-project-request-rail > .ns-project-request-card[data-ns-stable-project-request] {
    position: sticky;
    top: calc(var(--ns-header-h, 94px) + 12px);
  }
}

#page-change-history > h2 {
  margin: 0 0 .65rem;
  padding: 0;
  color: #f0cc87;
  font-size: clamp(1.25rem, 1.1rem + .8vw, 1.65rem);
  line-height: 1.2;
}

#page-change-history > h2::before,
#page-change-history > h2::after,
#page-change-history ol > li::before,
#page-change-history ol > li::after {
  content: none;
}

#page-change-history ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

#page-change-history ol > li {
  margin: 0;
  padding: .7rem 0;
  border-top: 1px solid #3d5848;
  list-style: none;
}

#page-change-history ol > li:last-child { padding-block-end: 0; }

#page-change-history li > p {
  margin: .3rem 0 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#page-change-history .ns-history-date {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .65rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#page-change-history time { color: #f0cc87; font-weight: 700; }
#page-change-history .ns-history-date span { color: #c5d8ce; font-size: .875rem; }

#page-change-history .ns-history-archive { margin-block-start: .8rem; }

#page-change-history .ns-history-archive > summary {
  display: list-item;
  box-sizing: border-box;
  min-block-size: 44px;
  padding: .7rem 0;
  color: #f0cc87;
  cursor: pointer;
}

@container page-history (min-width: 42rem) {
  #page-change-history ol > li {
    display: grid;
    grid-template-columns: minmax(12rem, .4fr) minmax(0, 1fr);
    gap: .8rem;
  }

  #page-change-history li > p { margin: 0; }
}
