:root {
  --ink: #1a1a1a;
  --muted: #6b7280;
  --accent: #b8860b;
  --accent-dark: #8b6914;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Charter', 'Bitstream Charter', 'Sitka Text', Cambria, serif;
  line-height: 1.75;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-size: 19px;
  background: #fafafa;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 2rem;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Header Styles */
.site-header {
  padding: 4rem 2rem 2.5rem;
  text-align: center;
}

.chapter-header {
  padding: 3.5rem 2rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.title {
  font-size: 3.25rem;
  margin: 0.2rem 0 0.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.subtitle, .chapter-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  font-style: italic;
  max-width: 650px;
  margin: 0 auto;
}

/* Prose Content */
.prose h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 3rem 0 1.25rem;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1.35rem;
  line-height: 1.8;
  font-size: 1.05rem;
}

.prose section {
  margin-bottom: 3.5rem;
}

.prose section:last-of-type {
  margin-bottom: 2.5rem;
}

.prose em {
  font-style: italic;
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
}

.prose ul {
  margin: 1.25rem 0 1.75rem;
  padding-left: 1.75rem;
}

.prose ul li {
  margin: 0.85rem 0;
  line-height: 1.75;
}

.prose ul li strong {
  font-weight: 600;
  color: var(--ink);
}

/* Table of Contents */
.toc {
  max-width: 820px;
}

.toc h3.part {
  font-size: 1.65rem;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.toc h3.part:first-of-type {
  margin-top: 2rem;
}

.toc ol {
  padding-left: 1.75rem;
  margin: 1.25rem 0 2.5rem;
}

.toc li {
  margin: 1.75rem 0;
}

.toc p {
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  font-style: italic;
}

/* Links */
a.chapter-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-dark);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: all 0.2s ease;
}

a.chapter-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Navigation */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3.5rem 0 2.5rem;
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 2.5rem 0;
  gap: 1.5rem;
}

.nav a:first-child {
  justify-self: start;
  text-align: left;
}

.nav a:nth-child(2) {
  justify-self: center;
  text-align: center;
}

.nav a:last-child {
  justify-self: end;
  text-align: right;
}

.nav a {
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--accent);
}

.nav a.muted {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.nav a.muted:hover {
  color: var(--ink);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2.5rem 2rem 3.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: 18px;
  }
  
  .container {
    padding: 1.5rem 1.5rem;
  }
  
  .site-header {
    padding: 3rem 1.5rem 2rem;
  }
  
  .title {
    font-size: 2.25rem;
  }
  
  .prose h2 {
    font-size: 1.6rem;
  }
  
  .nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .nav a:first-child,
  .nav a:nth-child(2),
  .nav a:last-child {
    justify-self: auto;
    text-align: center;
  }
}