/* Sapling appendix styling — applied to the legacy source HTM
   so it visually matches the rest of the Sapling report.
   Loaded via <link rel="stylesheet"> at the top of the source's <head>.

   Goal: render the legacy genealogy report as plain flowing prose, in
   the same parchment/font/ink palette as the main narrative tab. NO
   callout cards, NO box treatments around entries or generation
   headers — the appendix reads as the original source document, just
   retypeset to match the rest of the book.

   Spacing and structural attributes (margin-left:0.5in / 1in indents,
   <center> blocks, <hr> rules, anchor jumps) are preserved as-is.
   Only fonts, background, color, link styling, and bold weight change. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Cormorant+SC:wght@500;600&family=EB+Garamond:wght@400;500;600&display=swap');

html, body {
  background: #f7f4ee !important;
  font-family: 'EB Garamond', Georgia, serif !important;
  font-size: 17px;
  line-height: 1.65;
  color: #141210;
  margin: 0;
}

body {
  max-width: 780px;
  margin: 2.5rem auto 4rem;
  padding: 0 2.2rem;
}

/* "First Generation" / "Second Generation (Parents)" / etc. headers —
   restrained typographic treatment, no boxes/borders/background fills */
center {
  margin: 3rem 0 1.2rem;
}
center h2 {
  font-family: 'Cormorant SC', Georgia, serif !important;
  font-weight: 500;
  color: #3a3530;
  letter-spacing: 0.18em;
  font-size: 1.1rem;
  margin: 0;
}
/* The very first h2 ("Ancestors of [Subject]") is the document title */
center h2:first-of-type {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 500;
  font-size: 1.6rem;
  color: #141210;
  letter-spacing: 0.04em;
}

/* Body bolding rule: nothing bolded in body text by default */
b, strong {
  font-weight: 400;
  color: #141210;
}

/* The first <b> at the start of each ancestor entry (the numbered name
   like "8. Capt. William James Reilly") gets a slight headline weight so
   the eye finds the entry boundary — but it stays INLINE so the comma
   that follows the closing </b> sits flush against the name without a
   line break or visible gap. */
p[style*="margin-left:0.5in"] > b:first-child {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #141210;
  letter-spacing: 0.01em;
}

/* The 0.5in indented paragraphs are the entry blocks themselves —
   flow as plain prose. NO background, NO left border, NO border radius. */
p[style*="margin-left:0.5in"] {
  margin-left: 0 !important;
  margin-top: 1.4rem;
  margin-bottom: 0.4rem;
}

/* The 1in indented paragraphs are children-list / general-notes — gentle indent.
   Nothing else: no background, no border. */
p[style*="margin-left:1in"] {
  margin-left: 2rem !important;
  font-size: 0.97rem;
  color: #3a3530;
  background: transparent;
  border: 0;
}

/* Hyperlinks — muted slate-blue with a soft underline. Visible as links
   without being bright/saturated. Per Jen (May 2026, Shelley Sweazey):
   "add hyperlinks back into the appendix but make them not bright blue." */
a {
  color: #476582;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 2.5px;
  text-decoration-color: #8da3b8;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover {
  color: #2f4a64;
  text-decoration-color: #2f4a64;
}
a:visited {
  color: #5a4d72;
}
/* The legacy source wraps linked names in <a><b>Name</b></a> — keep them
   regular weight and inheriting the link color */
a b, a strong {
  font-weight: 400;
  color: inherit;
}

/* Horizontal rules — softer parchment tone */
hr {
  border: 0;
  border-top: 1px solid #ccc5b9;
  margin: 1.6em 0;
  opacity: 0.6;
}
/* Hide the empty rules adjacent to <center> headers */
center hr,
center + hr {
  display: none;
}

/* Images — keep them inside the column width if any are present */
img {
  max-width: 100%;
  height: auto;
}
