:root {
  --text: #222;
  --muted: #6b6b6b;
  --link: #1a4f8a;
  --rule: #dcdcd6;
  --bg: #fdfdfb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e4df;
    --muted: #9a9a94;
    --link: #9cbfe8;
    --rule: #35352f;
    --bg: #151513;
  }
}

html { color-scheme: light dark; }

body {
  font-family: Charter, Georgia, "Times New Roman", serif;
  max-width: 36rem;
  margin: 4.5rem auto 6rem;
  padding: 0 1.25rem;
  line-height: 1.65;
  font-size: 1.06rem;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

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

h1 {
  font-size: 1.5rem;
  font-weight: normal;
  letter-spacing: 0.01em;
  margin: 0 0 1.75rem 0;
}

p { margin: 0 0 1rem 0; }

.home { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.4rem; }
.home a { color: var(--muted); text-decoration: none; }
.home a:hover { color: var(--link); }
.home + h1 { margin-bottom: 1.25rem; }

.intro {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.portrait {
  float: right;
  width: 8.5rem;
  height: auto;
  margin: 0.2rem 0 0.75rem 1.5rem;
  border-radius: 3px;
}
@media (max-width: 30rem) {
  .portrait { width: 6.5rem; margin-left: 1rem; }
}

/* an entry: a linked title plus commentary */
.entry { margin: 0 0 1.9rem 0; }
.entry > p { margin: 0 0 0.4rem 0; }
.entry .src { font-weight: 600; line-height: 1.45; }
.entry .venue { font-weight: normal; color: var(--muted); font-size: 0.92rem; }

ul { padding-left: 1.2rem; margin: 0.5rem 0 1rem; }
li { margin-bottom: 0.35rem; }

blockquote {
  margin: 0.8rem 0 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}
blockquote p:last-child, blockquote ul:last-child { margin-bottom: 0; }
blockquote ul { padding-left: 1.1rem; margin-bottom: 0; }
blockquote li { margin-bottom: 0.6rem; }

/* hosted draft pages (/nla/) */
.post img { max-width: 100%; height: auto; }
.post figure { margin: 1rem 0; max-width: 100%; }
.post figure img { max-width: 100%; height: auto; }
.post details {
  border: 1px solid var(--rule);
  padding: 0.5rem 0.9rem;
  margin: 0.8rem 0 1rem;
}
.post details summary { cursor: pointer; font-weight: 600; }
.post .footnote-section {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--muted);
}
.post .footnote-back-link { margin-right: 0.4rem; }
.post .footnote-content { display: inline-block; vertical-align: top; max-width: 90%; }

/* margin sidenotes (draft pages) — inline blocks by default, floated to the
   right rail on wide screens */
.sn-ref {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
  color: var(--muted);
  padding: 0 0.05em;
}
.sidenote {
  display: block;
  margin: 0.4rem 0 0.9rem 1.1rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--rule);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}
.sidenote .sn-num { margin-right: 0.35rem; }
.sidenote a { color: inherit; }

@media (min-width: 56rem) {
  body.wide { max-width: 54rem; }
  body.wide .home,
  body.wide h1,
  body.wide .intro,
  body.wide .post > * { max-width: 34rem; }
  body.wide .post .sidenote {
    float: right;
    clear: right;
    width: 15rem;
    margin: 0.1rem -17rem 0.7rem 0;
    padding-left: 0;
    border-left: none;
    text-align: left;
  }
}

/* section divider, from the --- rules in the source notes */
hr.sep {
  border: none;
  border-top: 1px solid var(--rule);
  width: 5rem;
  margin: 2.75rem 0;
}
