/* Two modes:
   - index pages (home, The Symptom, Articles, ...) stay plain and compact,
     close to browser default, because they are lists you scan.
   - article pages (<body class="article">) get reader-view typography,
     because they are long texts you actually sit and read.
   The reader knobs are the three variables below. */

body {
  max-width: 40em;
  margin: 0 auto;
  padding: 1.75em 1em 3em;
}

img { max-width: 100%; height: auto; }
.text table { display: block; overflow-x: auto; max-width: 100%; }

/* Header and footer are identical on every page, including article pages —
   they must not inherit the reader-view font, or they change size and face
   the moment you click into a text. */
header, footer {
  font: 16px/1.4 'Times New Roman', Times, serif;
}
header {
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.55em;
  margin-bottom: 1.8em;
}
header nav a { margin-right: 0.75em; }
header .home { display: inline-block; margin-bottom: 0.3em; }

footer {
  border-top: 1px solid #ccc;
  margin-top: 3em;
  padding-top: 0.8em;
  font-size: 0.85em;
  color: #666;
}
footer p { margin: 0; }
footer a { color: #666; }

.meta { margin-bottom: 1.5em; }
.filterbar { margin: 1em 0; }
#filtercount { margin-left: 0.5em; }

/* separate a title from its author, so entries whose title is itself a
   person's name stay legible */
.toc li { margin: 0.25em 0; }
.toc .by { color: #555; }
.toc .by::before { content: '— '; }
.toc .gone { color: #777; font-style: italic; }

/* ---------- reader view: article pages only ---------- */

body.article {
  --measure: 33em;   /* line length — lower = narrower column */
  --size: 20px;      /* base text size */
  --leading: 1.7;    /* space between lines */

  max-width: var(--measure);
  padding: 1.5rem 1.25rem 5rem;
  font: var(--size) / var(--leading) Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  color: #16130f;
  background: #fff;
}

body.article p { margin: 0 0 1.15em; }

/* Many originals separate paragraphs with <br> instead of <p>, which otherwise
   renders as an unbroken slab. Giving line breaks a little air restores the
   paragraph rhythm without rewriting the markup. */
body.article .text br { display: block; content: ''; margin-top: 0.5em; }
body.article a { color: #0b53c1; }
body.article a:visited { color: #5a3a99; }

body.article h1 { font-size: 1.6em; line-height: 1.2; margin: 0 0 0.3em; }
body.article h2 { font-size: 1.2em; line-height: 1.3; margin: 1.8em 0 0.4em; }
body.article h3 { font-size: 1.05em; margin: 1.5em 0 0.4em; }

body.article img { display: block; margin: 1.6em auto; }
body.article blockquote { margin: 1.3em 0 1.3em 1.5em; color: #3a352e; }
body.article hr { border: none; border-top: 1px solid #ddd; margin: 2em 0; }
body.article .text td { padding: 0.1em 0.6em 0.1em 0; vertical-align: top; }

/* only spacing differs inside an article — the type is set by the shared
   header rule above, so the bar looks the same as on the index pages */
body.article header {
  padding-bottom: 0.6em;
  margin-bottom: 2.4em;
}

/* the author / issue / source line under the title */
body.article .meta { font-size: 0.78em; color: #6b655c; margin: 0 0 2.2em; }
body.article .meta a { color: #6b655c; }
