:root {
  --bg: #faf8f4;
  --surface: #f1ede6;
  --text: #24282b;
  --muted: #5f666b;
  --border: #ddd6cb;
  --accent: #2f4f57;
  --accent-hover: #1f3a41;
  --accent-text: #ffffff;
  --link: #2c5d69;
  --ok: #2e6b3a;
  --error: #9b2d2d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191b;
    --surface: #212427;
    --text: #e6e3de;
    --muted: #a3a8ac;
    --border: #363a3e;
    --accent: #7fa8b0;
    --accent-hover: #9cc0c7;
    --accent-text: #111416;
    --link: #8fc1cc;
    --ok: #7cc28a;
    --error: #f08b8b;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-text); padding: 0.5rem 1rem; }
.skip-link:focus { left: 0; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header > .wrap { padding-top: 2rem; padding-bottom: 1rem; text-align: center; }
.site-title { font-size: 2.1rem; letter-spacing: 0.02em; color: var(--text); text-decoration: none; }
.site-tagline { margin: 0.25rem 0 0; color: var(--muted); font-style: italic; }
.site-nav ul {
  list-style: none; margin: 0 auto; padding-top: 0.25rem; padding-bottom: 0.75rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem;
  font-family: var(--sans); font-size: 0.95rem;
}
.site-nav a { color: var(--text); text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

main.wrap { padding-top: 2.5rem; padding-bottom: 3rem; }

/* Entries */
h1, h2, h3 { line-height: 1.25; font-weight: 600; }
h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.45rem; margin-top: 2.25rem; }
h3 { font-size: 1.2rem; }
.entry-header { margin-bottom: 1.5rem; }
.entry-meta { color: var(--muted); font-family: var(--sans); font-size: 0.9rem; margin: 0; }
.prose { overflow-wrap: break-word; }
.prose img { display: block; margin: 1.5rem auto; border-radius: 3px; }
.wide-images .prose img { width: 100%; }
.prose figure { margin: 2rem 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption, .featured figcaption { color: var(--muted); font-size: 0.95rem; text-align: center; margin-top: 0.5rem; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--border); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--border); padding: 0.4rem 0.6rem; }
.featured { margin: 0 0 2rem; }
.featured img { display: block; margin: 0 auto; border-radius: 3px; }

/* Home */
.hero-photo { display: block; width: 100%; border-radius: 4px; margin-bottom: 1.75rem; }
.hero-text p:first-child { margin-top: 0; }

/* Call to action */
.cta {
  margin: 3rem 0 1rem; padding: 1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 4px;
}
.cta h2 { margin-top: 0; font-size: 1.35rem; }
.cta p:last-child { margin-bottom: 0; }
.button {
  display: inline-block; font-family: var(--sans); font-size: 1rem; font-weight: 600;
  background: var(--accent); color: var(--accent-text); text-decoration: none;
  padding: 0.7rem 1.3rem; border: 0; border-radius: 4px; cursor: pointer;
}
.button:hover { background: var(--accent-hover); }
.button:disabled { opacity: 0.6; cursor: progress; }

/* Post lists */
.latest h2 { margin-top: 3rem; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.post-list h3 { margin: 0 0 0.25rem; }
.post-list h3 a { color: var(--text); text-decoration: none; }
.post-list h3 a:hover { color: var(--link); text-decoration: underline; }
.post-list p { margin: 0.35rem 0 0; }
.post-nav { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-top: 3rem; font-family: var(--sans); font-size: 0.95rem; }
.post-nav a { text-decoration: none; }
.post-nav span { display: block; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.post-nav .next { text-align: right; grid-column: 2; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; font-family: var(--sans); font-size: 0.95rem; }

/* Contact form */
.contact-form { margin: 2rem 0; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
.req, .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 4px; padding: 0.6rem 0.75rem;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-family: var(--sans); min-height: 1.5em; }
.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--error); }
.notice { padding: 1rem; background: var(--surface); border: 1px dashed var(--border); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-family: var(--sans); font-size: 0.9rem; text-align: center; padding: 1.5rem 0; }
.site-footer p { margin: 0.25rem 0; }

@media (min-width: 720px) {
  :root { --measure: 46rem; }
}
