.book-hero {
  padding-top: 72px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
}

.book-hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.draft-notice {
  max-width: 760px;
  margin: 30px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.book-toc {
  padding-top: 68px;
  padding-bottom: 84px;
}

.book-section-head {
  padding-bottom: 26px;
}

.part-list {
  border-top: 2px solid var(--ink);
}

.book-part {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.5fr);
  gap: 48px;
  padding: 34px 0 42px;
  border-bottom: 1px solid var(--line);
}

.part-heading h3 {
  max-width: 310px;
  margin: 4px 0 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.part-number {
  margin: 0;
  color: var(--rust);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.chapter-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.chapter-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) max-content;
  gap: 16px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.chapter-list .chapter-number {
  color: var(--rust);
  font-size: 0.79rem;
  font-weight: 700;
}

.chapter-title {
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration-color: var(--rust);
}

.chapter-title:hover {
  color: var(--green-dark);
}

.chapter-status {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p:last-child {
  text-align: right;
}

/* Shared reading shell for generated chapter pages. */
.chapter-shell {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
}

.chapter-content {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.72;
}

.chapter-content img,
.chapter-content svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.chapter-content figure {
  margin: 38px 0;
}

.chapter-content figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
}

.chapter-content .keypoint,
.chapter-content .warning,
.chapter-content .sideline,
.chapter-content .casestudy,
.chapter-content .historicalnote,
.chapter-content .studyandlearn {
  margin: 30px 0;
  padding: 20px 22px;
  border-left: 4px solid var(--gold);
  background: #ffffff;
}

.aifiguredescription,
[data-ai-only="true"] {
  display: none;
}

@media (max-width: 820px) {
  .book-part {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .part-heading h3 {
    max-width: none;
  }
}

@media (max-width: 620px) {
  .book-hero {
    padding-top: 50px;
    padding-bottom: 44px;
  }

  .book-toc {
    padding-top: 48px;
    padding-bottom: 58px;
  }

  .chapter-list li {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .chapter-status {
    grid-column: 2;
  }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
  }

  .footer-inner p:last-child {
    text-align: left;
  }
}
