/* Site navigation only; the reviewed Reader stylesheet is unchanged. */
.reader-orientation {
  max-width: 46em;
  margin: 1em 0 2em;
}
.reader-chapter-contents {
  margin: 1.5em 0 .5em;
  font-size: .88rem;
  line-height: 1.5;
}
.reader-chapter-contents summary {
  width: fit-content;
  padding: .5em 0;
  cursor: pointer;
  font-weight: 600;
}
.reader-chapter-contents ul {
  margin: .75em 0 1.25em;
  padding-left: 1.25em;
  column-gap: 2em;
}
.reader-chapter-contents li { margin-bottom: .7em; }
.reader-return {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .25em 1.5em;
  padding: .65em 0;
  border-bottom: 1px solid #d8e0e3;
  background: #faf9f6;
  font: .78rem/1.5 system-ui, sans-serif;
}
.reader-return a { text-underline-offset: .2em; }
.reader-chapter-contents summary:focus-visible,
.reader-chapter-contents a:focus-visible,
.reader-return a:focus-visible {
  outline: 2px solid #006a86;
  outline-offset: 4px;
}
/* Keep existing fragment destinations visible below the return links. */
[id] { scroll-margin-top: 4rem; }
.reader-chapter-contents { scroll-margin-top: 1rem; }
@media (max-width: 700px) {
  .reader-chapter-contents ul { columns: 1; }
}
.reader-site {
  display: flex;
  flex-wrap: wrap;
  gap: .25em 1.5em;
  margin: 0 0 1.5em;
  font: .85rem/1.5 system-ui, sans-serif;
}
.reader-site a { text-underline-offset: .2em; }
/* Phones: wide tables and equations scroll inside the column instead of widening the page. */
@media (max-width: 700px) {
  main { padding: 24px 16px 64px; }
  main table { display: block; max-width: 100%; overflow-x: auto; }
  main .equation { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
}
.reader-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75em 2em;
  margin: 3em 0 0;
  padding-top: 1em;
  border-top: 1px solid #d8e0e3;
  font: .9rem/1.5 system-ui, sans-serif;
}
.reader-pager a { max-width: 46%; text-underline-offset: .2em; }
.reader-pager .reader-next { margin-left: auto; text-align: right; }
@media print {
  .reader-site, .reader-orientation, .reader-chapter-contents, .reader-return, .reader-pager { display: none; }
}
