/* Reading pages, instrument and colophon */
.chapter {
  --book-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --book-gutter: max(clamp(1rem, 5vw, 5rem), (100vw - 82rem) / 2);
}

.chapter :is(.bench-cover, .notebook-cover, .author-cover) h1 {
  margin: 0;
  font-family: var(--book-display);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.22;
}

.chapter .chapter-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  min-height: 2.85rem;
  width: fit-content;
  border-bottom: 1px solid currentColor;
  color: inherit;
  font-size: .96rem;
  font-weight: 600;
  text-decoration: none;
}
.chapter .chapter-action span { font-family: system-ui, sans-serif; font-size: 1.15em; }
.chapter .chapter-action:hover { color: var(--action-hover, #ffc69b); }

.bench-cover { position: relative; isolation: isolate; overflow: clip; color: #fff3e2; background: #18120e; }
.bench-photo, .bench-cover::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.bench-photo { z-index: -2; object-fit: cover; object-position: 61% 54%; }
.bench-cover::before {
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgb(15 13 11 / 86%) 0%, rgb(15 13 11 / 61%) 35%, transparent 69%);
}
.bench-cover-inner {
  display: flex;
  align-items: center;
  min-height: clamp(26rem, 40vw, 40rem);
  padding-block: clamp(3rem, 6vw, 6rem);
}
.bench-cover-copy { max-width: 28rem; }
.bench-cover h1 { font-size: clamp(3.5rem, 6.8vw, 6.5rem); }
.bench-cover-copy > p { margin-block: 1.3rem .85rem; line-height: 1.85; color: #eee4d7; }
.chapter--lab #interactive { padding-block: clamp(2.4rem, 5.3vw, 5.2rem); }
.chapter--lab .lab-intro { padding-bottom: 1.35rem; border-bottom: 1px solid var(--border); }
.chapter--lab .lab-intro h2 { font-size: clamp(1.65rem, 3vw, 2.8rem); }
.chapter--lab .lab-intro > p { margin: 0; }
.chapter--lab .lab-instrument { border-radius: 0; box-shadow: none; }
.chapter--lab .lab-result dd > span { font-weight: 500; }
.chapter--lab .lab-related h2 { font-family: var(--book-display); }

.notebook-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .98fr);
  min-height: clamp(25rem, 34vw, 33rem);
  color: #29241e;
  background: #e7decf;
}
.notebook-copy {
  align-self: center;
  padding: clamp(3rem, 5.7vw, 6.5rem) clamp(1.2rem, 3vw, 4rem) clamp(2.8rem, 5.5vw, 5.6rem) var(--book-gutter);
}
.notebook-copy h1 { font-size: clamp(2.6rem, 4.35vw, 5.1rem); }
.notebook-copy p {
  max-width: 25em;
  margin: 1.5rem 0 1rem;
  color: #574a3c;
  line-height: 1.95;
  text-wrap: pretty;
}
.notebook-copy .chapter-action { --action-hover: #843d23; }
.notebook-photo { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 64% 54%; }

.chapter--notes .notes-section { padding-block: clamp(2rem, 4.1vw, 4rem) clamp(3.2rem, 7vw, 6.5rem); }
.chapter--notes .notes-index-header { margin: 0; padding-bottom: 1rem; align-items: center; }
.chapter--notes .notes-index-header h2 { color: var(--muted); font-size: 1rem; font-weight: 630; }
.chapter--notes .notes-feature-text { padding-block: clamp(2.2rem, 4.8vw, 5rem); }
.chapter--notes .notes-feature-side h3, .chapter--notes .notes-archive-heading h3 {
  margin: 0;
  font: 600 clamp(1.45rem, 2.3vw, 2.25rem)/1.35 var(--book-display);
  letter-spacing: -.045em;
}
.chapter--notes .notes-prose { max-width: 41em; line-height: 1.98; }
.chapter--notes .notes-prose h4 { font-size: clamp(1.32rem, 2.1vw, 1.85rem); }
.chapter--notes .notes-steps { padding-inline-start: 1.5rem; margin-block: 1.25rem; }
.chapter--notes .notes-steps li + li { margin-top: .7rem; }
.chapter--notes .notes-entry-icon { border-radius: 0; border: 0; }
.chapter--notes .notes-entry[open] .notes-entry-title { color: #713b28; }

.author-cover { overflow: clip; color: #f3ede1; background: #22221f; }
.author-spread {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  gap: clamp(2rem, 5.7vw, 6rem);
  padding-block: clamp(3.2rem, 6.4vw, 7.4rem);
}
.author-intro h1 { font-size: clamp(3.4rem, 6.1vw, 6.1rem); }
.author-intro > p { max-width: 25em; margin-block: 1.5rem 1.15rem; color: #e5ddcf; line-height: 1.95; }
.author-intro .editorial-links { gap: .5rem 1.5rem; }
.author-notes { display: inline-flex; align-items: center; min-height: 2.85rem; color: #e6cfb2; text-underline-offset: .28em; }
.author-plate { position: relative; padding: clamp(.6rem, 1.3vw, 1.3rem); background: #d6c9b4; }
.author-plate img { aspect-ratio: 3 / 2; width: 100%; height: auto; object-fit: cover; }
.author-plate::after {
  content: "";
  position: absolute;
  top: -.15rem;
  right: 7%;
  width: clamp(.85rem, 2.1vw, 1.75rem);
  height: clamp(1.8rem, 4.8vw, 4.2rem);
  background: #9c492c;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
}
.author-colophon, .chapter--about .site-privacy {
  display: grid;
  align-items: baseline;
  grid-template-columns: minmax(0, .64fr) minmax(0, 1.36fr);
  column-gap: clamp(2rem, 5vw, 6rem);
  padding-block: clamp(2.6rem, 5.5vw, 5.6rem);
}
.author-colophon h2, .chapter--about .site-privacy h2 {
  margin: 0;
  align-self: start;
  font: 600 clamp(1.65rem, 2.6vw, 2.5rem)/1.35 var(--book-display);
  letter-spacing: -.055em;
}
.author-colophon p, .chapter--about .site-privacy p { max-width: 40em; color: var(--muted); line-height: 1.95; }
.author-colophon .text-link { margin: .4rem 0 1.1rem; }
.author-disclosure { font-size: .915rem; }
.chapter--about .site-privacy h2 { grid-row: span 3; }
.chapter--about .site-privacy p { margin: 0 0 .85rem; }
.chapter--about .site-privacy p:last-child { margin-bottom: 0; }

@media (max-width: 48rem) {
  .notebook-cover { grid-template-columns: minmax(0, 1fr); }
  .notebook-copy { padding: 2.5rem var(--book-gutter) 2.1rem; }
  .notebook-copy p { margin-block: 1rem .45rem; }
  .notebook-photo { aspect-ratio: 2.9; min-height: 8.2rem; max-height: 14rem; object-position: 65% 63%; }
  .bench-cover-inner { min-height: 27rem; }
  .bench-cover::before { background: linear-gradient(90deg, rgb(15 13 11 / 84%), rgb(15 13 11 / 45%) 54%, transparent 93%); }
  .author-spread { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.8rem; }
  .author-plate { width: min(100%, 34rem); }
  .author-colophon, .chapter--about .site-privacy { grid-template-columns: 1fr; row-gap: 1rem; }
  .chapter--about .site-privacy h2 { grid-row: auto; }
  .chapter--about .site-privacy p { margin: 0; }
}
@media (max-width: 36rem) {
  .bench-cover-inner { min-height: 27.5rem; align-items: end; padding-block: 2rem; }
  .bench-photo { object-position: 71% 36%; }
  .bench-cover::before { background: linear-gradient(0deg, rgb(15 13 11 / 95%) 0%, rgb(15 13 11 / 88%) 23%, rgb(15 13 11 / 63%) 49%, transparent 91%); }
  .bench-cover-copy > p { margin-block: .8rem .45rem; }
  .chapter--lab .lab-intro { padding-bottom: 1rem; }
  .chapter--notes .notes-index-header { gap: .2rem 1.2rem; }
  .chapter--notes .notes-topics { column-gap: .95rem; }
}
