@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-500.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/inter-700.ttf") format("truetype");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/playfair-display-700.ttf") format("truetype");
}

:root {
  --navy: #16243f;
  --navy-2: #1f3354;
  --gold: #a86f00;
  --gold-light: #d6aa42;
  --cream: #faf6ef;
  --paper: #fffefa;
  --ink: #23262b;
  --muted: #55606e;
  --rule: #d8cfc0;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", "Segoe UI", sans-serif;
  --body: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.72;
}

a { color: inherit; }

.book-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 20;
}

.book-brand {
  align-items: center;
  color: var(--navy);
  display: inline-flex;
  font-family: var(--sans);
  gap: 0.65rem;
  line-height: 1.05;
  text-decoration: none;
}

.book-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
}

.book-brand small {
  color: var(--gold);
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-top: 0.15rem;
  text-transform: uppercase;
}

.brand-mark {
  color: var(--gold);
  font-size: 1.25rem;
}

.book-nav {
  display: flex;
  gap: 1rem;
}

.book-nav a,
.breadcrumbs a,
.pager a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.book-nav a {
  color: var(--navy-2);
}

.book-main {
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(1.25rem, 4vw, 3.5rem);
}

.breadcrumbs {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.book-article {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(216, 207, 192, 0.8);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(22, 36, 63, 0.08);
  padding: clamp(1.35rem, 5vw, 4rem);
}

.book-article section {
  margin: 0;
}

.section-label,
.ch-eyebrow,
.pnum {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.fm-title,
.ch-title,
.part-divider h2 {
  color: var(--navy);
  font-family: var(--serif);
  line-height: 1.15;
}

.fm-title,
.ch-title,
.part-divider h2 {
  font-size: clamp(2rem, 6vw, 3.6rem);
  margin: 0.5rem 0 1.25rem;
}

.ch-num {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.25rem;
  margin-top: 0.55rem;
}

.fm-rule,
.pline {
  background: var(--gold);
  border: 0;
  height: 3px;
  margin: 0 0 2rem;
  max-width: 110px;
}

.lead {
  color: var(--navy-2);
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1.7;
}

p {
  margin: 0 0 1.15rem;
}

.book-article p,
.book-article li,
.book-article .lead,
.book-article .pdesc,
.book-article .pullquote,
.book-article .box,
.book-article .keeper-note,
.book-article .part-insight {
  hyphens: none;
  overflow-wrap: normal;
  text-align: justify;
  text-justify: inter-word;
  word-break: normal;
}

.first::first-letter {
  color: var(--gold);
  float: left;
  font-family: var(--serif);
  font-size: 3.8rem;
  line-height: 0.82;
  padding-right: 0.3rem;
}

.pullquote,
.box,
.keeper-note,
.part-insight {
  background: #fbf7ef;
  border-left: 4px solid var(--gold);
  margin: 1.5rem 0;
  padding: 1.2rem 1.35rem;
}

.pullquote {
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
}

.box-h,
.keeper-h {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

ul,
ol {
  margin: 0 0 1.25rem 1.35rem;
  padding: 0;
}

li {
  margin-bottom: 0.45rem;
}

table {
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.5rem 0;
  width: 100%;
}

caption {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.65rem;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  border: 1px solid var(--rule);
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--navy);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-cover,
.html-collage,
.author-photo-wrap {
  text-align: center;
}

.cover-page-image,
.collage-page-img,
.author-photo {
  border-radius: 8px;
  box-shadow: 0 20px 55px rgba(22, 36, 63, 0.18);
  max-height: 76vh;
  object-fit: contain;
}

.author-photo {
  max-height: 520px;
}

.part-divider {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
}

.pbig {
  color: rgba(214, 170, 66, 0.18);
  font-family: var(--serif);
  font-size: 7rem;
  font-weight: 700;
  line-height: 1;
}

.pdesc {
  color: var(--muted);
  max-width: 620px;
}

.signoff {
  margin-top: 1.8rem;
}

.signoff .name {
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
}

.signoff .role {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pager {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto 1fr;
  margin-top: 1.5rem;
}

.pager-link,
.pager-home {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--navy);
  padding: 1rem;
}

.pager-link span {
  color: var(--gold);
  display: block;
  font-size: 0.72rem;
  margin-bottom: 0.3rem;
}

.pager-link strong {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.pager-home {
  align-items: center;
  display: inline-flex;
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .book-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .book-nav {
    flex-wrap: wrap;
  }

  .book-article {
    padding: 1.25rem;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .book-article p,
  .book-article li,
  .book-article .lead,
  .book-article .pdesc,
  .book-article .pullquote,
  .book-article .box,
  .book-article .keeper-note,
  .book-article .part-insight {
    hyphens: none;
    text-align: left;
  }
}
