/* Layout */
body {
  max-width: 1000px;
  margin: 2vh auto;
}
.work-page main, .meta, .preface {
  padding: 1em;
}
* {box-sizing: border-box;}

/* Metadata */
.meta {
  padding: 1em;
  border: 2px solid rgba(from currentColor r g b / .5);
  display: flex;
  flex-wrap: wrap;
}
dt, dd {
  display: inline-block;
  padding: .5em;
  box-sizing: border-box;
}
dt {
  min-width: 10.5em;
  width: 25%;
}
dd {
  width: 70%;
  ul {
    list-style: none;
    padding: 0;
    li {display: inline}
    li:not(:last-of-type)::after {content: ', '}
  }
}

/* Title, Summary, and Notes */
.work-preface, .end-notes {
  max-width: 850px;
  margin: auto auto 2em;
}
h1, .byline {
    text-align: center;
}
.work-preface h1 {
  margin-bottom: .25em;
}
.summary, .notes {
  font-weight: normal;
  border-bottom: 2px solid currentColor;
}
.end-notes {margin: 3em auto}

/* Coauthors */
.byline span:not(:last-of-type)::after {
  content: ", ";
}
.byline:has(span:nth-of-type(2)) span:nth-last-child(2)::after {
  content: " & ";
}
.byline:has(span:nth-of-type(3)) span:nth-last-child(2)::after {
  content: ", & ";
}

/* Chapters */
ol[row] {
  padding: 0;
  margin: 0;
  counter-reset: item;
  li {
    display: inline-block;
    padding: 0 1em 0 0;
    &::before {
      content: counter(item) ". ";
      counter-increment: item;
    }
  }
}
.chapter {
  display: none;
  box-sizing: border-box;
  margin-bottom: 5em;
  &:target {
    display: block;
    scroll-margin-top: 400px;
  }
  h2:first-of-type {
    text-align: center;
    font-size: 2em;
  }
}
nav {
  border: 1px solid var(--backing);
  padding: .5em;
  border-radius: .5em;
}
nav ol {text-align: right}
