/* style.css — deferred; everything below the fold and the reading experience. */

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1rem; }
.reading-width { max-width: var(--measure); }

.back { display: inline-block; color: var(--ink-soft); margin-bottom: 1.5rem; }
.back:hover { color: var(--accent); }

/* ---- Metadata: stage badge + topic pills ---- */
.meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0 0 1.5rem; }
.stage {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}
.stage-seed { background: #eef4e8; border-color: #cfe0bf; color: #5a6b45; }
.stage-growing { background: #eaf1f4; border-color: #c3d8e0; color: #3f6473; }
.stage-evergreen { background: #e9f0ea; border-color: #b9d3bd; color: #37613f; }
.pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
}
.date { color: var(--ink-soft); }

/* ---- Node status block ---- */
.status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  margin: 1.5rem 0 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
}
.status div { display: flex; gap: 0.5rem; }
.status dt { color: var(--ink-soft); margin: 0; }
.status dd { margin: 0; }

/* ---- Engagement trail: date column left, content right ---- */
.trail { margin: 2rem 0; }
.entry {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry-date { color: var(--ink-soft); font-size: 0.78rem; padding-top: 0.2rem; }
.entry-body p:first-child { margin-top: 0; }
.entry-body p:last-child { margin-bottom: 0; }
.entry-link { display: inline-block; font-family: var(--serif-display); margin-bottom: 0.25rem; }
.kind-link .entry-date::after { content: " ↗"; }

@media (max-width: 34rem) {
  .entry { grid-template-columns: 1fr; gap: 0.25rem; }
  .entry-date { padding-top: 0; }
}

/* ---- Marginalia / sidenotes ---- */
.sidenote {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
@media (min-width: 60rem) {
  .prose .sidenote {
    float: right;
    clear: right;
    width: 14rem;
    margin: 0.2rem -16rem 1rem 0;
  }
}

/* ---- Quotes / code blocks ---- */
blockquote {
  margin: 1.2rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid var(--rule);
  color: var(--ink-soft);
  font-style: italic;
}
pre {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

/* ---- Prose: sections, lists, tables, figures, footnotes ---- */
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: var(--serif-display);
  line-height: 1.2;
  margin: 2rem 0 0.75rem;
}
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose h4, .prose h5, .prose h6 { font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
.prose li { margin: 0.25rem 0; }
.prose li.task { list-style: none; margin-left: -1.4rem; }
.prose li.task input { margin-right: 0.5rem; }
.prose dl { margin: 0 0 1.1rem; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0 0 0.6rem 1.2rem; }
.prose hr { border: none; border-top: 1px solid var(--rule); margin: 2rem 0; }

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2rem 0;
  font-size: 0.9rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.prose thead th { border-bottom: 2px solid var(--rule); }
.prose tbody tr:last-child td { border-bottom: none; }

.prose figure { margin: 1.5rem 0; }
.prose img { max-width: 100%; height: auto; border-radius: 6px; display: block; }
.prose figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  text-align: center;
}

.verse { white-space: normal; font-style: italic; color: var(--ink-soft); }
.center { text-align: center; }

.fnref { font-size: 0.75em; line-height: 0; }
.footnotes { margin-top: 3rem; font-size: 0.88rem; color: var(--ink-soft); }
.footnotes hr { border: none; border-top: 1px solid var(--rule); margin-bottom: 1rem; }
.footnotes ol { padding-left: 1.2rem; }
.fn-back { text-decoration: none; }

.essay-link { margin: 2rem 0 0; font-family: var(--serif-display); font-size: 1.1rem; }

/* ---- Recently tended: bounded, canonical surface ---- */
.recently-tended {
  max-width: 42rem;
  margin: 3rem auto 0;
  padding: 0 1.25rem;
}
.recently-tended h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}
.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.recent-item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto 6.5rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}
.recent-type,
.recent-date {
  color: var(--ink-soft);
  font-size: 0.76rem;
}
.recent-item a {
  min-width: 0;
}
@media (max-width: 38rem) {
  .recent-item {
    grid-template-columns: 4rem minmax(0, 1fr);
  }
  .recent-item .stage,
  .recent-date {
    grid-column: 2;
  }
}

/* ---- Backlinks ---- */
.backlinks {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.backlinks h2 { font-size: 1rem; color: var(--ink-soft); margin: 0 0 0.5rem; }
.backlinks ul { list-style: none; padding: 0; margin: 0; }
.backlinks li { margin: 0.2rem 0; }

/* ---- Footer sitemap (the only navigation) ---- */
.sitemap {
  max-width: 42rem;
  margin: 4rem auto 0;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}
.sitemap .machine { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); margin: 0 0 1.5rem; }
.sitemap .cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.sitemap h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin: 0 0 0.5rem; }
.sitemap ul { list-style: none; padding: 0; margin: 0; }
.sitemap li { margin: 0.2rem 0; }
.sitemap li.empty { color: var(--rule); }
.colophon { color: var(--ink-soft); font-size: 0.8rem; margin-top: 2rem; }
@media (max-width: 34rem) {
  .sitemap .cols { grid-template-columns: 1fr; gap: 1rem; }
}

/* ---- View transitions (progressive; ignored where unsupported) ---- */
@view-transition { navigation: auto; }
