/* ========== Base (clean, white, serif) ========== */
:root{
  --text: #111;
  --muted: #666;
  --link: #0b57d0;
  --maxw: 72ch;
  --leading: 1.65;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
html{ font-size: 17px; }
body{
  color:var(--text);
  background:#fff;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ========== Layout ========== */
.container{
  max-width: var(--maxw);
  margin: 2.5rem auto 4rem;
  padding: 0 1rem;
}
.center{ text-align:center; }

/* ========== Header / Titles ========== */
.site-header{
  padding: 3.5rem 1rem 1rem;
  text-align: center;
}
.title{
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 .35rem;
}
.subtitle{
  margin: 0;
  color: var(--muted);
  font-style: italic;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
}

/* “Ink-like” bold feel for display titles */
.ink{
  font-weight: 800;
  letter-spacing: 0.01em;
  /* subtle irregular ink spread using stacked shadows */
  text-shadow:
    0 0 .6px currentColor,
    .0125em .005em 0 rgba(0,0,0,.18),
    -.01em .008em 0 rgba(0,0,0,.12);
}

/* Headings inside chapters */
h1,h2,h3{
  font-weight: 700;
  line-height: 1.25;
  margin: 2rem 0 1rem;
}
h1{ font-size: clamp(1.9rem, 4vw, 2.4rem); }
h2{ font-size: clamp(1.35rem, 2.6vw, 1.6rem); }
h3{ font-size: clamp(1.1rem, 2.2vw, 1.3rem); }

/* ========== TOC ========== */
.toc .part{
  text-transform: none;
  margin-top: 2.2rem;
  margin-bottom: .5rem;
  font-weight: 700;
  text-align: left;
}
.toc ol{
  padding-left: 1.25rem;
  margin: .5rem 0 1.2rem;
}
.toc a{
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid rgba(11,87,208,.2);
}
.toc a:hover{ border-bottom-color: rgba(11,87,208,.45); }

/* ========== Chapter page ========== */
.chapter-header{
  text-align: center;
  margin-top: 2.25rem;
}
.chapter-subtitle{
  color: var(--muted);
  font-style: italic;
  margin-top: .25rem;
}
.prose p{
  margin: 1rem 0;
  font-size: 1.02rem;
}
hr{
  border: none;
  border-top: 1px solid #e9e9e9;
  margin: 2rem 0;
}

/* ========== Nav ========== */
.nav{
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin: 2rem 0 0;
  font-size: .95rem;
}
.nav a{
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid rgba(11,87,208,.2);
}
.nav a:hover{ border-bottom-color: rgba(11,87,208,.45); }

.site-footer{
  max-width: var(--maxw);
  margin: 2rem auto 4rem;
  padding: 0 1rem;
  color: var(--muted);
}
.muted{ color: var(--muted); text-decoration: none; }

/* ========== Print (optional neat printouts) ========== */
@media print{
  .nav, .site-footer, .toc a{ text-decoration: none; border: none; }
  .site-header, .chapter-header{ page-break-after: avoid; }
}
