/* Sprout Creek preview styling: plain, readable, no external fonts or scripts. */

:root {
  --text: #1f1f1f;
  --muted: #5a5a5a;
  --bg: #fdfcf9;
  --rule: #ddd8cc;
  --link: #1d4f7a;
  --accent-bg: #eef3f7;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e6e1;
    --muted: #a9a59c;
    --bg: #1b1b1a;
    --rule: #3a3833;
    --link: #8fc1ea;
    --accent-bg: #23303a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 42rem;
  padding: 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: var(--link); }

h1, h2 { line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.8rem; margin: 1.5rem 0 1rem; }
h2 { font-size: 1.3rem; margin-top: 2.5rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.site-title { font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover,
.site-header nav a[aria-current] { color: var(--text); text-decoration: underline; }

.site-footer {
  margin-top: 3rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}
.site-footer a { color: var(--muted); }

.breadcrumb { margin: 1.5rem 0 0; font-size: 0.95rem; }
.lede { font-size: 1.15rem; }
.byline { color: var(--muted); font-size: 0.95rem; margin-top: -0.5rem; }
.aka { color: var(--muted); font-size: 0.95rem; margin-top: -0.5rem; font-style: italic; }
.footnotes { font-size: 0.9rem; }
/* Adjacent footnote markers read as one number ("5" "2" -> "52"); separate them. */
sup[id^="fnref"] + sup[id^="fnref"]::before { content: ","; }
/* A footnote cited several times gets one back-link per citation; show only the first. */
.footnote-backref + .footnote-backref { display: none; }

.portrait { float: right; width: 13rem; margin: 0.3rem 0 1rem 1.5rem; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait figcaption { color: var(--muted); font-size: 0.85rem; line-height: 1.4; margin-top: 0.4rem; }
.collections, h2 { clear: both; }

.wide { margin: 1.5rem 0; }
.wide img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.wide figcaption { color: var(--muted); font-size: 0.9rem; line-height: 1.45; margin-top: 0.5rem; }
@media (max-width: 32rem) {
  .portrait { float: none; width: 70%; margin: 1rem auto; }
}
.footnotes hr { display: none; }
.kind, .detail { color: var(--muted); font-size: 0.9rem; }
.detail { display: block; }

.meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--accent-bg);
  font-size: 0.95rem;
}
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
@media (max-width: 32rem) {
  .meta { grid-template-columns: 1fr; }
  .meta dd { margin-bottom: 0.5rem; }
}

.collections, .notebooks { padding-left: 1.5rem; }
.collections li, .notebooks li { margin-bottom: 0.9rem; }
.collections p { margin: 0.25rem 0 0; }

.read {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--link);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}
.read:hover { background: var(--accent-bg); }

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  font-size: 0.95rem;
}
.pager .later { margin-left: auto; text-align: right; }
