/* Family history web publishing -- shared site stylesheet template.
   Copy this file into <project>/web/css/style.css and adjust only the
   palette/font values below if the project has its own established
   colors (e.g. matching an existing KDP print interior). Don't restructure
   the rules or class names without also updating every page's markup --
   see the family-history-web skill's SKILL.md for what each class is for.

   Design grammar: serif = narrative, sans-serif = apparatus (navigation,
   tables, sidebar chrome, captions/labels). Keep that split even if the
   specific typefaces or colors change. */

:root { color-scheme: light; }

body {
  font-family: Garamond, 'Apple Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5em 1.5em 4em;
  line-height: 1.65;
  color: #2a2a26;
  background: #fdfbf6;
  font-size: 19px;
}

a { color: #1f4e6b; }
a:hover { color: #14384d; }

h1.page-title { font-size: 1.6em; margin-bottom: 0.1em; }
.subtitle { font-style: italic; color: #4a4a44; }

h2.section-title {
  font-variant: small-caps;
  font-size: 1.5em;
  border-bottom: 1px solid #ccc7b8;
  padding-bottom: 0.3em;
  margin-top: 1.6em;
}

h3.table-heading {
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
  font-size: 0.95em;
  font-weight: bold;
  text-align: center;
  margin: 1.6em 0 0.6em;
}

p { margin: 0 0 1em; text-align: justify; }
p.caption-text { text-align: center; font-size: 0.85em; }
p.caption-text em { font-style: italic; }

.figure { text-align: center; margin: 1.8em 0; }
.figure img { max-width: 100%; height: auto; border: 1px solid #ddd7c8; }

sup a { text-decoration: none; }

/* ---- top-of-page / breadcrumb links ---- */
p.crumb { font-family: Verdana, 'DejaVu Sans', Arial, sans-serif; font-size: 0.8em; }
p.crumb a { text-decoration: none; }

/* ---- sidebar cross-reference callout, inside a main narrative page ---- */
p.sidebar-crossref {
  text-align: center;
  font-style: italic;
  font-size: 0.92em;
  background: #eef4f8;
  border: 1px solid #c6d9e3;
  border-radius: 3px;
  padding: 0.7em 1em;
  margin: 1.8em 0;
}
p.sidebar-crossref a { text-decoration: none; font-weight: bold; }
p.sidebar-crossref a:hover { text-decoration: underline; }

/* ---- sidebar return-link, at top of a sidebar page ---- */
p.sidebar-return {
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
  font-size: 0.82em;
}

/* ---- sidebar box, matching a continuous wrapper-table print design ---- */
.sidebar-box {
  border: 2px solid #333333;
  margin: 1.5em 0 2.5em;
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
}
.sidebar-box .stripe-title {
  background: #9DC3E6;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
  padding: 0.5em 0.6em;
  font-size: 1.3em;
  letter-spacing: 0.02em;
}
.sidebar-box .stripe-subtitle {
  background: #000000;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
  padding: 0.4em 0.6em;
  font-size: 1.0em;
}
.sidebar-box .sidebar-body {
  background: #F0F0EE;
  padding: 1.4em 1.6em;
}
.sidebar-box .sidebar-body p {
  font-size: 0.95em;
  text-align: justify;
}
.sidebar-box .sidebar-body p.caption-text { text-align: center; }
.sidebar-box .sidebar-body h3.table-heading { font-size: 0.9em; }

/* ---- children's / data tables: sans-serif, always, sidebar or not ---- */
table.children-table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
  font-size: 0.82em;
}
table.children-table th, table.children-table td {
  border: 1px solid #999999;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
table.children-table th { background: #D8D3C8; font-weight: bold; }

p.godparents, p.sources-caption {
  font-style: italic;
  font-size: 0.85em;
}

/* ---- endnotes ---- */
ol.notes-list { padding-left: 1.4em; font-size: 0.92em; }
ol.notes-list li { margin: 0 0 0.6em; }

/* ---- prev/next page nav ---- */
nav.pagenav {
  display: flex;
  justify-content: space-between;
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid #ccc7b8;
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
  font-size: 0.85em;
}
nav.pagenav a { text-decoration: none; }

/* ---- index / contents pages ---- */
ol.index-list, ul.index-list { list-style: none; padding: 0; }
ol.index-list li, ul.index-list li { margin: 0.55em 0; }
ol.index-list a, ul.index-list a {
  text-decoration: none;
  color: #1f4e6b;
  font-size: 1.05em;
}
ol.index-list a:hover, ul.index-list a:hover { text-decoration: underline; }
h2.index-group {
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b6b60;
  border-bottom: 1px solid #ccc7b8;
  padding-bottom: 0.3em;
  margin-top: 2em;
}

footer.site-footer {
  margin-top: 2.5em;
  padding-top: 1em;
  border-top: 1px solid #ccc7b8;
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
  font-size: 0.78em;
  color: #8a8a80;
  text-align: center;
}

/* ==== additions for the Clifford_Romig site ==== */
/* story heading block, byline, running story name */
header.story-head { margin-bottom: 1.6em; }
header.story-head h1.page-title { font-size: 1.9em; line-height: 1.2; }
p.byline, p.story-name {
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
  font-size: 0.8em; color: #6b6b60; text-align: left;
}
p.story-name { font-style: italic; margin-bottom: 0; }
h3.sub-title {
  font-variant: small-caps; font-size: 1.2em; margin: 1.8em 0 0.6em; clear: both;
}
h3.about-author {
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
  font-size: 0.9em; margin-top: 2.4em; border-top: 1px solid #ccc7b8; padding-top: 1em; clear: both;
}
h2.section-title, nav.pagenav, footer.site-footer, p.companion, h2.index-group { clear: both; }

/* figures: HTML5 <figure>, floated when small in the Word layout */
figure.figure { margin: 1.8em auto; text-align: center; }
figure.figure img { display: block; margin: 0 auto; }
figure.float { float: right; width: 44%; margin: 0.35em 0 1em 1.4em; }
figcaption.caption-text { font-size: 0.85em; line-height: 1.4; margin-top: 0.45em; text-align: center; }
figcaption .credit {
  display: block; font-style: normal; margin-top: 0.2em;
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif; font-size: 0.8em; color: #6b6b60;
}
.figure-row { display: flex; gap: 1.2em; align-items: flex-start; margin: 1.8em 0; clear: both; }
.figure-row figure.in-row { flex: 1; margin: 0; }

/* poems and quotations */
blockquote { margin: 1em 0 1.2em 2em; }
blockquote p { text-align: left; margin: 0 0 0.15em; }

/* audio players */
.audio-box {
  background: #eef4f8; border: 1px solid #c6d9e3; border-radius: 3px;
  padding: 0.8em 1em; margin: 1.6em 0; clear: both;
  font-family: Verdana, 'DejaVu Sans', Arial, sans-serif;
}
.audio-box p { text-align: left; margin: 0 0 0.5em; }
p.audio-label { font-size: 0.82em; }
.audio-box audio { width: 100%; }
p.audio-dl { font-size: 0.72em; margin: 0.4em 0 0; }

/* endnote back-links, companion link, index notes */
a.backref { text-decoration: none; font-size: 0.9em; }
ol.notes-list li { text-align: left; overflow-wrap: anywhere; }
p.companion { font-family: Verdana, 'DejaVu Sans', Arial, sans-serif; font-size: 0.82em; margin-top: 2em; text-align: left; }
ul.sub-list { list-style: none; padding-left: 1.4em; margin: 0.2em 0 0.4em; }
ul.sub-list li { margin: 0.2em 0; }
ul.sub-list a { font-size: 0.92em; }
span.index-note { font-size: 0.88em; color: #4a4a44; }
nav.pagenav .count { color: #8a8a80; }
nav.pagenav span { flex: 1; }
nav.pagenav .count { text-align: center; }
nav.pagenav .next { text-align: right; }

@media (max-width: 640px) {
  body { font-size: 17px; padding: 1.5em 1em 3em; }
  p { text-align: left; }
  figure.float { float: none; width: auto; margin: 1.5em 0; }
  .figure-row { flex-direction: column; }
  blockquote { margin-left: 1em; }
}
