/* The Man in the House Opposite the Park: draft stylesheet.
   Paper, charcoal, sepia map ink. One long page. */

:root {
  --paper: #eee2c8;
  --paper-deep: #e3d3b1;
  --paper-light: #f6efdf;
  --ink: #2a231c;
  --ink-soft: #4a3f34;
  --sepia: #8a5a2b;
  --rust: #9a4a2a;
  --map-blue: #5f7380;
  --rule: rgba(42, 35, 28, 0.35);
  --rule-soft: rgba(42, 35, 28, 0.16);
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--paper) url("img/bg-paper.jpg") center top / 100% auto repeat-y; }

body {
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-family: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.62;
  position: relative;
  overflow-x: hidden;
}

a { color: var(--sepia); text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { color: var(--rust); }

/* ---------- hero ---------- */

.hero {
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 5rem 1.25rem 3rem;
  position: relative;
}

.hero .frame {
  max-width: 54rem;
  padding: 2.5rem 1.5rem 2rem;
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-soft);
  outline-offset: 6px;
  background: linear-gradient(180deg, rgba(246, 239, 223, 0.82), rgba(238, 226, 200, 0.82));
  box-shadow: 0 30px 60px -30px rgba(40, 25, 10, 0.45);
}

.hero .eyebrow {
  font-family: "IM Fell English SC", "IM Fell English", serif;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.hero h1 {
  text-wrap: balance;
  font-family: "IM Fell Double Pica", "IM Fell English", serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.02;
  margin: 0 0 0.6rem;
  letter-spacing: 0.01em;
}

.hero .sub {
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--ink-soft);
  margin: 0 auto 1.6rem;
  max-width: 36rem;
}

.hero .oval {
  width: clamp(150px, 28vw, 220px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  margin: 0 auto 1.4rem;
  overflow: hidden;
  border: 6px solid var(--paper-light);
  box-shadow: 0 0 0 1px var(--rule), inset 0 0 30px rgba(0,0,0,0.35), 0 14px 30px -14px rgba(0,0,0,0.5);
  filter: sepia(0.25) contrast(1.05);
}
.hero .oval img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }

.hero .epigraph {
  font-style: italic;
  font-size: clamp(1rem, 2.1vw, 1.15rem);
  color: var(--ink-soft);
  margin: 0 auto 1.4rem;
  max-width: 30rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-soft);
}
.hero .epigraph cite {
  display: block;
  font-style: normal;
  font-family: "IM Fell English SC", "IM Fell English", serif;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--sepia);
  margin-top: 0.35rem;
}

.hero .dates {
  font-family: "IM Fell English SC", "IM Fell English", serif;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  color: var(--sepia);
  margin: 0.5rem 0 0;
}

.hero .draft {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  transform: rotate(6deg);
  font-family: "IM Fell English SC", serif;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: var(--rust);
  border: 2px solid var(--rust);
  padding: 0.25rem 0.7rem;
  opacity: 0.8;
}

/* ---------- contents rail ---------- */

.contents {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}
.contents ol {
  columns: 2;
  column-gap: 2.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 1.08rem;
}
.contents li { break-inside: avoid; padding: 0.25rem 0; border-bottom: 1px dotted var(--rule-soft); }
.contents li a { text-decoration: none; color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; }
.contents li a:hover { color: var(--rust); }
.contents li span.n { font-family: "IM Fell English SC", serif; color: var(--sepia); letter-spacing: 0.08em; }
@media (max-width: 560px) { .contents ol { columns: 1; } }

/* ---------- chapters ---------- */

main { padding: 0 1.25rem 4rem; }

.chapter {
  max-width: var(--measure);
  margin: 4.5rem auto 0;
}

.chapter header {
  text-align: center;
  margin-bottom: 1.6rem;
}
.chapter .num {
  font-family: "IM Fell English SC", serif;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  color: var(--sepia);
  display: block;
  margin-bottom: 0.4rem;
}
.chapter h2 {
  font-family: "IM Fell Double Pica", "IM Fell English", serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 0.6rem;
}
.chapter .span {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}
.chapter header::after {
  content: "";
  display: block;
  width: 7rem;
  margin: 1.1rem auto 0;
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 3px 0 -1px var(--paper), 0 4px 0 -1px var(--rule-soft);
}

.chapter p { margin: 0 0 1.1rem; text-wrap: pretty; }

.chapter > p:first-of-type::first-letter {
  font-family: "IM Fell Double Pica", "IM Fell English", serif;
  float: left;
  font-size: 3.6em;
  line-height: 0.78;
  padding: 0.08em 0.12em 0 0;
  color: var(--sepia);
}

blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 2px solid var(--sepia);
  font-style: italic;
  color: var(--ink-soft);
}
blockquote cite { display: block; font-style: normal; font-size: 0.98rem; margin-top: 0.3rem; letter-spacing: 0.04em; }

/* ---------- figures ---------- */

figure {
  margin: 1.8rem 0;
}
figure.wide {
  width: min(92vw, 64rem);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}
figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-soft);
  outline-offset: 4px;
  background: var(--paper-light);
  box-shadow: 0 18px 40px -22px rgba(40, 25, 10, 0.55);
  filter: sepia(0.18);
}
figure.plain img { filter: none; }
figcaption {
  font-size: 1.02rem;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  text-align: center;
  text-wrap: balance;
}
figcaption b { font-style: normal; font-weight: 400; font-family: "IM Fell English SC", serif; letter-spacing: 0.06em; }

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.8rem 0;
}
.pair figure { margin: 0; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }

/* reconstructions: a plate-mark and a tag */
figure.recon img { filter: none; box-shadow: 0 22px 44px -24px rgba(40, 25, 10, 0.6); }
figure.recon figcaption b { color: var(--rust); }

/* the prologue: a shorter chapter, set a little quieter */
.chapter.prologue { margin-top: 3.5rem; }
.chapter.prologue h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }

/* a marginal note beside a paragraph */
.marginal {
  float: right;
  width: 38%;
  margin: 0.3rem 0 1rem 1.5rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.98rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(246, 239, 223, 0.6), rgba(238, 226, 200, 0.6));
}
.marginal b {
  display: block;
  font-style: normal;
  font-weight: 400;
  font-family: "IM Fell English SC", serif;
  letter-spacing: 0.08em;
  color: var(--sepia);
  margin-bottom: 0.2rem;
}
@media (max-width: 560px) { .marginal { float: none; width: 100%; margin: 1.2rem 0; } }

/* a face beside text */
.aside-fig {
  float: right;
  width: 38%;
  margin: 0.3rem 0 1rem 1.5rem;
}
@media (max-width: 560px) { .aside-fig { float: none; width: 100%; margin: 1.2rem 0; } }

/* ---------- the register (ledger) ---------- */

.register {
  max-width: var(--measure);
  margin: 4.5rem auto 0;
  padding: 1.6rem 1.4rem 1.2rem;
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-soft);
  outline-offset: 5px;
  background: linear-gradient(180deg, rgba(246, 239, 223, 0.7), rgba(238, 226, 200, 0.7));
}
.register h2 { font-family: "IM Fell Double Pica", "IM Fell English", serif; font-weight: 400; text-align: center; margin: 0 0 1rem; font-size: 2rem; }
.register h3 {
  font-family: "IM Fell English SC", serif;
  font-weight: 400;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  color: var(--sepia);
  margin: 1.4rem 0 0.4rem;
  border-bottom: 1px solid var(--rule);
}
.register ul { margin: 0; padding-left: 1.2rem; }
.register li { padding: 0.25rem 0; border-bottom: 1px dotted var(--rule-soft); font-size: 1.08rem; }

/* ---------- sources + footer ---------- */

.sources { max-width: var(--measure); margin: 3.5rem auto 0; font-size: 1.06rem; }
.sources h2 { font-family: "IM Fell Double Pica", "IM Fell English", serif; font-weight: 400; text-align: center; font-size: 2rem; margin: 0 0 1rem; }
.sources li { margin: 0.35rem 0; }

footer {
  text-align: center;
  padding: 3rem 1.25rem 4rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-style: italic;
}
footer .stamp {
  display: inline-block;
  font-family: "IM Fell English SC", serif;
  font-style: normal;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--rust);
  border: 2px solid var(--rust);
  padding: 0.25rem 0.8rem;
  transform: rotate(-3deg);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.note {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-soft);
  border-top: 1px dotted var(--rule);
  border-bottom: 1px dotted var(--rule);
  padding: 0.6rem 0;
  margin: 1.6rem 0;
}

@media (max-width: 560px) {
  body { font-size: 1.3rem; line-height: 1.6; }
  .chapter p, .register li, .sources li { text-wrap: pretty; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  html { background-image: none; }
  .hero .draft, footer .stamp { display: none; }
  figure img { box-shadow: none; filter: none; }
}

/* desktop readability (owner, 2026-09-11): a step up in body size on wide screens only;
   the measure is in ch, so the column widens with it */
@media (min-width: 900px) {
  body { font-size: 1.4rem; line-height: 1.6; }
  figcaption { font-size: 1.12rem; }
  blockquote { font-size: 1.15em; }
  .register li { font-size: 1.15rem; }
  .sources { font-size: 1.12rem; }
  .marginal { font-size: 1.02rem; }
}
