/* Memo pages (rendered from src/*.md → encrypted docs/*.html).
   Faithful port of Typora's "Newsprint" theme: PT Serif, warm near-black ink on
   warm paper, normal-weight headings, generous paragraph spacing.
   The public landing page (docs/index.html) uses home.css and is unaffected. */
:root {
  --ink: #1f0909;     /* Newsprint body text — warm, soft near-black */
  --paper: #f3f2ee;   /* Newsprint background */
  --link: #065588;    /* Newsprint link blue */
  --rule: #c5c5c5;    /* Newsprint hr / heading underline */
  --muted: #656565;   /* Newsprint blockquote / footnote */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
  font-family: 'PT Serif', 'Times New Roman', Times, serif;
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
  padding: 80px 24px 96px;
}
.container {
  max-width: 40em;
  margin: 0 auto;
}

/* Headings — Newsprint: h1 normal weight with an underline rule; h2 bold,
   h3 same size but normal weight. No letter-spacing (that's what made the old
   Source Serif headings read chunky). */
h1 {
  font-size: 1.875em;
  line-height: 1.3;
  font-weight: 400;
  margin: 0 0 0.5em;
  padding-bottom: 0.8125em;
  border-bottom: 1px solid var(--rule);
}
h2 {
  font-size: 1.3125em;
  line-height: 1.15;
  font-weight: 700;
  margin: 2.285714em 0 0.75em;
}
h2:first-child {
  margin-top: 0;   /* inside.md opens on an h2, not an h1 */
}
h3 {
  font-size: 1.3125em;
  line-height: 1.15;
  font-weight: 400;
  margin: 2.285714em 0 0.75em;
}

p {
  margin-bottom: 1.5em;
}
strong {
  font-weight: 700;
}
em {
  font-style: italic;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

ul, ol {
  margin: 0 0 1.5em 1.5em;
  padding: 0;
}
li {
  margin-bottom: 0.5em;
}
li:last-child {
  margin-bottom: 0;
}
/* Nested lists (e.g. the a–e sub-points under a numbered item): tuck them
   close to their lead-in line, keep them tight internally, and leave a clear
   break before the next top-level item. */
li > ul,
li > ol {
  margin: 0.35em 0 0.9em 1.5em;
}
li > p:has(+ ul),
li > p:has(+ ol) {
  margin-bottom: 0;   /* the nested list's own top margin owns the gap above it */
}
li > ul > li,
li > ol > li {
  margin-bottom: 0.2em;
}
ol ol {
  list-style-type: lower-alpha;
}

blockquote {
  font-style: italic;
  border-left: 5px solid var(--rule);
  margin: 0 0 1.5em 2em;
  padding-left: 1em;
  color: var(--muted);
}
hr {
  border: 0;
  border-bottom: 1px solid var(--rule);
  margin: 2em 0;
}
.footnote {
  font-size: 0.9em;
  color: var(--muted);
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
    padding: 56px 20px 72px;
  }
  h1 {
    font-size: 1.625em;
  }
  h2, h3 {
    font-size: 1.25em;
    margin-top: 1.8em;
  }
}
