/* forson public site - hand-written, reading-first CSS. No framework, no build.
   Shared by index.html, post.html, and about.html. Palette matches the editor. */

:root {
  --bg: #faf9f6;
  --ink: #1c1b19;
  --muted: #7a756c;
  --line: #e7e3da;
  --accent: #3a5a40;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 34rem; /* comfortable reading column */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── Page frame ─────────────────────────────────────────────────────────── */
.site-header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
}
.site-header a.wordmark {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--muted);
  text-decoration: none;
}
.site-header a.wordmark:hover { color: var(--ink); }

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1 {
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 1.5rem;
}
h2 {
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.35;
  margin: 2.25rem 0 0.5rem;
}
p { margin: 0 0 1.25rem; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.lead { font-size: 1.22rem; }

/* Ryan double-spaces between sentences and wants that preserved. HTML normally
   collapses runs of whitespace; pre-wrap keeps them, so his spacing reaches the
   reader. Requires each such paragraph to sit on a single source line with no
   leading/trailing newline inside the tag (otherwise those newlines would show). */
.lead,
.qa .answer { white-space: pre-wrap; }

/* ── About Q&A ──────────────────────────────────────────────────────────── */
.qa { margin-top: 2.5rem; }
.qa .question {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 2rem 0 0.4rem;
  color: var(--ink);
}
.qa .answer { margin: 0 0 0.5rem; }

/* ── Index: the list of letters ─────────────────────────────────────────── */
.intro { color: var(--muted); font-size: 1.05rem; margin-bottom: 2.5rem; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.post-item:first-child { border-top: none; padding-top: 0; }
.post-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--ink);
}
.post-link:hover .post-item-title { text-decoration: underline; text-underline-offset: 3px; }
.post-item-title { font-size: 1.4rem; line-height: 1.25; }
.post-item-date { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }
.post-item-excerpt { margin: 0.5rem 0 0; color: #55514a; }

/* ── Single letter ──────────────────────────────────────────────────────── */
.post-meta {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin: -0.75rem 0 2rem;
}
.post-body { font-size: 1.18rem; line-height: 1.8; }
.post-body p { margin: 0 0 1.25rem; }
.post-body h2 { font-size: 1.45rem; margin: 2rem 0 0.6rem; }
.post-body h3 { font-size: 1.2rem; margin: 1.6rem 0 0.4rem; }
.post-body blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
.post-body ul, .post-body ol { margin: 0 0 1.25rem 1.4rem; }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; display: block; }

.message { padding: 1rem 0; }
.loading { color: var(--muted); }

/* ── Like (anonymous, warmth signal) ────────────────────────────────────── */
.like {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.like-btn {
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.like-btn:hover:not(:disabled) { background: #eef1ec; border-color: var(--accent); }
.like-btn.liked { background: var(--accent); color: #fff; border-color: var(--accent); }
.like-btn:disabled { cursor: default; }
.like-count { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); }

/* ── Note (one-way inbox, public → author only) ─────────────────────────── */
.note { margin-top: 2.5rem; }
.note-label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.note-hint { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin: 0.2rem 0 0.7rem; }
.note-form { display: flex; flex-direction: column; gap: 0.6rem; }
.note-textarea {
  font: inherit;
  font-size: 1rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.note-textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Honeypot: keep it out of sight and out of the tab order, but not display:none
   (some bots skip display:none fields). */
.note-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.note-row { display: flex; align-items: center; gap: 0.8rem; }
.note-send {
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 1.1rem;
  border-radius: 8px;
}
.note-send:hover:not(:disabled) { filter: brightness(1.07); }
.note-send:disabled { opacity: 0.6; cursor: default; }
.note-status { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); }
