:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #292d33;
  background: #f7f4ec;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100% - 64rem) / 2));
  border-bottom: 1px solid #dedbd2;
}

.wordmark {
  color: #292d33;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a,
.site-footer a {
  color: #345a78;
  text-underline-offset: 0.2em;
}

.site-header nav a {
  font-size: 0.95rem;
  font-weight: 600;
  margin-left: 1rem;
}

main {
  width: min(100% - 2rem, 48rem);
  margin: auto;
  padding: 5rem 0;
}

.books {
  margin-top: 4rem;
}

.books h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
}

.book-card {
  display: block;
  max-width: 38rem;
  padding: 1.5rem;
  border: 1px solid #dedbd2;
  border-radius: 0.4rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.book-card:hover {
  border-color: #8ea5b8;
  background: #f0eee7;
}

.book-card h3 {
  margin: 0;
  color: #292d33;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}

.book-card p {
  margin: 0.5rem 0 1rem;
  color: #4d535b;
}

.book-card span {
  color: #345a78;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.eyebrow {
  color: #3f617d;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 12ch;
  margin: 1rem 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1.05;
}

.intro {
  max-width: 38rem;
  color: #4d535b;
  font-size: 1.2rem;
  line-height: 1.75;
}

.site-footer {
  padding: 1.5rem max(1rem, calc((100% - 64rem) / 2));
  border-top: 1px solid #dedbd2;
  color: #4d535b;
}

.site-footer p {
  margin: 0;
}

.reading-page {
  width: min(100% - 2rem, 48rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.book-article {
  max-width: 42rem;
  margin: 0 auto;
}

.article-title {
  max-width: none;
  margin: 0 0 2rem;
  color: #292d33;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.12;
}

.article-contents {
  margin: 2rem 0 3rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #7893aa;
  background: #eeece4;
}

.article-contents h2 {
  margin: 0 0 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.article-contents ol {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.article-contents li + li {
  margin-top: 0.25rem;
}

.article-contents a {
  color: #345a78;
  text-underline-offset: 0.18em;
}

.article-prose {
  color: #292d33;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.125rem, 2.7vw, 1.25rem);
  line-height: 1.8;
  overflow-wrap: break-word;
}

.article-prose h2 {
  margin: 2.75em 0 0.8em;
  color: #2f506b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 5vw, 2rem);
  line-height: 1.25;
  scroll-margin-top: 1rem;
}

.article-prose h3 {
  margin: 2em 0 0.7em;
  color: #292d33;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.35;
}

.article-prose p {
  margin: 0 0 1.2em;
}

.article-prose ul {
  padding-left: 1.5em;
}

.article-prose li + li {
  margin-top: 0.6em;
}

:target {
  scroll-margin-top: 1rem;
}

:focus-visible {
  outline: 3px solid #3f617d;
  outline-offset: 3px;
}

@media (max-width: 24rem) {
  .site-header nav a {
    margin-left: 0.75rem;
  }

  .article-contents {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.crumb {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.crumb a,
.pager a {
  color: #345a78;
}

.subtitle {
  margin: 0 0 0.5rem;
  color: #4d535b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  line-height: 1.45;
}

.byline {
  margin: 1rem 0 0;
  color: #4d535b;
  font-size: 0.95rem;
}

.byline p {
  margin: 0 0 0.25rem;
}

.book-contents h3 {
  margin: 1.25rem 0 0.4rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  color: #2f506b;
}

.book-contents ul,
.book-contents ol {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.part-intro {
  margin-bottom: 1rem;
}

.table-wrap {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.article-prose table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  line-height: 1.5;
}

.article-prose th,
.article-prose td {
  padding: 0.5rem 0.65rem;
  border: 1px solid #dedbd2;
  text-align: left;
  vertical-align: top;
}

.article-prose th {
  background: #eeece4;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dedbd2;
  font-family: Georgia, "Times New Roman", serif;
}

.pager a {
  display: block;
  max-width: 48%;
  line-height: 1.4;
}

.pager a span {
  display: block;
  color: #4d535b;
  font-size: 0.85rem;
}

.pager-next {
  margin-left: auto;
  text-align: right;
}

.contents-plain,
.sub-contents {
  list-style: none;
}

.book-contents .contents-plain {
  padding-left: 0;
}

.sub-contents {
  padding-left: 1.5rem;
}

.article-prose blockquote {
  margin: 1.5em 0;
  padding: 0.1em 0 0.1em 1.25rem;
  border-left: 4px solid #7893aa;
  color: #2f506b;
}

.article-prose hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid #dedbd2;
}

.site-footer {
  padding-block: 2rem 1.5rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
}

.site-footer h2 {
  margin: 0 0 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  color: #292d33;
}

.site-footer h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #292d33;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.9;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid #dedbd2;
  font-size: 0.9rem;
}
