/* The Mercy Seat — a reading-first stylesheet.
   One file, no build step, no framework. Edit freely.

   Layout is a single centred column. Everything is sized in rem against a
   fluid root, so the whole page scales together between phone and desktop. */

:root {
  color-scheme: light dark;

  /* Type. Body is a serif because the posts are long-form prose. */
  --font-body: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype",
               Palatino, Georgia, "Times New Roman", serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 34rem;      /* ~68 characters, the comfortable reading width */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  /* Light palette: warm paper, near-black ink, a muted liturgical red. */
  --paper:       #fbf9f5;
  --paper-sunk:  #f2eee6;
  --ink:         #1c1a17;
  --ink-soft:    #55504a;
  --ink-faint:   #857d73;
  --rule:        #e2dcd1;
  --accent:      #8c2f2f;
  --accent-soft: #b4553f;
  --focus:       #2b5f9e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:       #16151a;
    --paper-sunk:  #1e1d24;
    --ink:         #e8e4dc;
    --ink-soft:    #b3ada3;
    --ink-faint:   #857f76;
    --rule:        #302e38;
    --accent:      #e0917f;
    --accent-soft: #c9705c;
    --focus:       #7fb0ee;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: clamp(17px, 0.95rem + 0.25vw, 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-variant-numeric: oldstyle-num;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- links ------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.06em;
}
a:hover { color: var(--accent); text-decoration-thickness: 0.12em; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--paper);
  padding: 0.6rem 1rem;
  font-family: var(--font-ui);
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* --- header ------------------------------------------------------------ */

.site-header {
  padding-block: clamp(2rem, 6vw, 3.5rem) 0;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.site-title a { text-decoration: none; }
.site-title a:hover { color: var(--accent); }

.site-tagline {
  margin: 0.4rem 0 0;
  color: var(--ink-faint);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

.site-nav { margin-top: 1.5rem; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.25rem;
  border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* --- main --------------------------------------------------------------- */

main { padding-block: clamp(2.5rem, 7vw, 4rem); }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.012em;
  font-weight: 600;
  text-wrap: balance;
}

.post-header { margin-bottom: 2.25rem; }
.post-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
}

.post-meta {
  margin: 0.75rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
}
.post-meta .sep { color: var(--rule); }
.post-meta a { color: var(--ink-soft); text-decoration: none; }
.post-meta a:hover { color: var(--accent); text-decoration: underline; }

/* --- prose -------------------------------------------------------------- */

/* Vertical rhythm. Nothing sets its own margins; all spacing comes from the
   gap between siblings. Every override below must also use `.prose > x` or it
   will out-rank the owl selector and collapse the gap. */
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.35em; }

.prose > h2 {
  margin-top: 2.4em;
  font-size: 1.35rem;
}
.prose > h3 {
  margin-top: 2em;
  font-size: 1.1rem;
}

.prose a { color: var(--accent); }

.prose em { font-style: italic; }
.prose strong { font-weight: 650; }

.prose > blockquote {
  margin-block: 2em;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.97em;
}
.prose blockquote > * { margin: 0; }
.prose blockquote > * + * { margin-top: 0.9em; }

.prose blockquote cite {
  display: block;
  margin-top: 0.9em;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-style: normal;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}
.prose blockquote cite::before { content: "— "; }

.prose > ul, .prose > ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--ink-faint); }
.prose li > p { margin: 0; }

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 3px;
}

.prose > hr {
  border: 0;
  margin: 2.5em auto;
  width: 5rem;
  border-top: 1px solid var(--rule);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--paper-sunk);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}
.prose pre {
  background: var(--paper-sunk);
  padding: 1rem 1.1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.5;
}
.prose pre code { background: none; padding: 0; font-size: 1em; }

/* --- footnotes ---------------------------------------------------------- */

sup.footnote-ref {
  font-size: 0.68em;
  line-height: 0;
  font-variant-numeric: lining-nums;
}
sup.footnote-ref a {
  text-decoration: none;
  color: var(--accent);
  padding: 0 0.12em;
}
sup.footnote-ref a:hover { text-decoration: underline; }

.footnotes {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.footnotes h2 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 0 0 1rem;
  font-weight: 600;
}
.footnotes ol { margin: 0; padding-left: 1.3rem; }
.footnotes li { margin-bottom: 0.7em; }
.footnotes li:target { background: var(--paper-sunk); border-radius: 3px; }
.footnotes a { color: var(--accent); }
.footnote-back { text-decoration: none; margin-left: 0.2em; }

/* --- tags --------------------------------------------------------------- */

.tag {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--ink-soft);
}
.tag:hover { color: var(--accent); text-decoration: underline; }

.post-tags {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}
.post-tags > span {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
}
.post-tags .tag {
  background: var(--paper-sunk);
  border-radius: 2rem;
  padding: 0.18rem 0.7rem;
}

/* --- post navigation ---------------------------------------------------- */

.post-nav {
  display: flex;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.post-nav a {
  flex: 1;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
}
.post-nav a:hover { color: var(--accent); }
.post-nav .next { text-align: right; }
.post-nav span {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  margin-bottom: 0.3rem;
}

/* --- listings ----------------------------------------------------------- */

.listing-header { margin-bottom: 2.5rem; }
.listing-header h1 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); }
.listing-subtitle {
  margin: 0.5rem 0 0;
  color: var(--ink-faint);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.entry + .entry {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--rule);
}
.entry h2 {
  margin: 0;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.55rem);
}
.entry h2 a { text-decoration: none; }
.entry h2 a:hover { color: var(--accent); }
.entry-excerpt {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
}
.entry-more { margin: 0.75rem 0 0; }
.entry-more a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}
.entry-more a:hover { text-decoration: underline; }

.empty { color: var(--ink-faint); font-style: italic; }

/* --- archive ------------------------------------------------------------ */

.archive-year + .archive-year, .archive-terms { margin-top: 2.5rem; }
.archive-year h2, .archive-terms h2 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.35rem;
}
.archive-list time {
  flex: none;
  width: 4.5rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.archive-list a { text-decoration: none; }
.archive-list a:hover { color: var(--accent); text-decoration: underline; }

.term-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.term-cloud .tag {
  background: var(--paper-sunk);
  border-radius: 2rem;
  padding: 0.25rem 0.8rem;
}
.term-cloud .tag span { color: var(--ink-faint); font-size: 0.85em; }

/* --- pagination --------------------------------------------------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.pagination a { text-decoration: none; color: var(--accent); }
.pagination a:hover { text-decoration: underline; }
.pagination .next { margin-left: auto; }
.pagination-status { color: var(--ink-faint); font-size: 0.78rem; }

/* --- sections ----------------------------------------------------------- */

/* The small label above a section item's title, e.g. "Reading". */
.section-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.section-kicker a { text-decoration: none; }
.section-kicker a:hover { color: var(--accent); }

/* Author · Publisher · Finished 10 August 2026 */
.item-meta {
  margin: 0.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}
/* The separator trails the item it follows, so a wrapped line never begins
   with a stray bullet. */
.item-meta span:not(:last-child)::after {
  content: " ·";
  margin-left: 0.45rem;
  color: var(--rule);
}

/* The section index: denser than the post list — reference, not essays. */
.item-row + .item-row {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.item-row h2 {
  margin: 0;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem);
}
.item-row h2 a { text-decoration: none; }
.item-row h2 a:hover { color: var(--accent); }
.item-row .item-meta { margin-top: 0.4rem; }
.item-row .entry-excerpt { margin-top: 0.7rem; font-size: 0.95rem; }

/* --- comments ----------------------------------------------------------- */

.comments {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.comments > h2 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
  font-weight: 600;
}

.comment-notice {
  margin: 0 0 1.5rem;
  padding: 0.8rem 1rem;
  border-left: 2px solid var(--accent-soft);
  background: var(--paper-sunk);
  border-radius: 0 3px 3px 0;
  font-size: 0.9rem;
}
.comment-notice.is-error { border-left-color: var(--accent); }

.comment-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}
.comment + .comment {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.comment p { margin: 0; }
.comment p + p { margin-top: 0.8em; }

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.5rem !important;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.comment-author { font-weight: 600; color: var(--ink); }

/* --- comment form ------------------------------------------------------- */

.comment-form {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.comment-form h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.comment-note {
  margin: 0 0 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.comment-form p { margin: 0 0 1.1rem; }

.comment-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.comment-form input[type="text"],
.comment-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.comment-form textarea { resize: vertical; min-height: 8rem; }
.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
  border-color: var(--accent-soft);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.comment-form button {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 3px;
  padding: 0.6rem 1.3rem;
  cursor: pointer;
}
.comment-form button:hover { background: var(--accent); }

/* The honeypot. Off-screen rather than display:none, which bots look for. */
.comment-website {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- footer ------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-faint);
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.colophon { margin-top: 0.4rem; font-style: italic; }

/* --- print -------------------------------------------------------------- */

@media print {
  :root { --paper: #fff; --ink: #000; --ink-soft: #333; --rule: #ccc; }
  .site-nav, .post-nav, .pagination, .skip-link, .entry-more { display: none; }
  body { font-size: 11pt; }
  .wrap { max-width: none; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
}
