/* Long Suhalia projects use one sober contents rail beside the reading column.
   The shell belongs to projects that genuinely need stable internal geography. */
.excalibur-project,
.excalibur-project * {
  box-sizing: border-box;
}

body.excalibur-project {
  background: #fff;
  color: #000;
  margin: 0;
  max-width: none;
}

.project-bar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #000;
  display: grid;
  grid-template-columns: 230px minmax(0, 800px);
  min-height: 51px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.project-return {
  align-items: center;
  align-self: stretch;
  border-right: 1px solid #000;
  display: flex;
  padding: 9px 12px;
}

.project-name {
  font-size: 1.5em;
  font-weight: bold;
  padding: 0 12px;
}

.project-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 800px);
  max-width: 1030px;
  min-height: calc(100vh - 51px);
}

.project-toc {
  align-self: stretch;
  border-right: 1px solid #000;
  grid-column: 1;
  grid-row: 1;
  height: calc(100vh - 51px);
  overflow: auto;
  padding: 32px 20px 48px;
  position: sticky;
  top: 51px;
}

.project-toc ol {
  margin: 0;
  padding-left: 2.15em;
}

.project-toc li {
  margin: 0.18em 0;
}

.project-toc a[aria-current="location"] {
  font-weight: bold;
  text-decoration: none;
}

.project-article {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  min-width: 0;
  padding: 40px 40px 72px;
}

.project-section {
  scroll-margin-top: 75px;
}

.project-section + .project-section {
  border-top: 1px solid #000;
  margin-top: 3em;
  padding-top: 2.5em;
}

.project-section > :first-child {
  margin-top: 0;
}

@media (max-width: 720px) {
  .project-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 9px 12px;
  }

  .project-return {
    border-right: 0;
    padding: 0;
  }

  .project-name {
    justify-self: end;
    padding: 0;
  }

  .project-shell {
    display: block;
    min-height: 0;
  }

  .project-toc {
    border-bottom: 1px solid #000;
    border-right: 0;
    height: auto;
    padding: 26px 20px 30px;
    position: static;
  }

  .project-toc ol {
    column-gap: 2.5em;
    columns: 2;
  }

  .project-toc li {
    break-inside: avoid;
  }

  .project-article {
    padding: 32px 20px 64px;
  }
}

@media (max-width: 460px) {
  .project-toc ol {
    columns: 1;
  }
}
