/* Deliberately plain: think 1997 homepage. */
body { font-family: "Times New Roman", Times, serif; max-width: 640px; margin: 2em auto; padding: 0 16px; line-height: 1.5; color: #000; background: #fff; }
a { color: #00e; } a:visited { color: #551a8b; }
h1 { font-size: 1.6em; margin-bottom: .2em; }
ul.plain { list-style: none; padding: 0; margin: 0 0 1em; }
ul.plain li { margin: .3em 0; }
.nav { margin-bottom: 2em; }
.meta { color: #555; font-size: .9em; }
.draft { color: #a00; font-size: .85em; }
article img { max-width: 100%; height: auto !important; }
footer { margin-top: 3em; font-size: .85em; color: #555; }

/* Footnotes: plain [1] markers. Hover shows the note; on wide screens the
   note sits in the right margin, on phones it is listed at the bottom. */
a.footnote-ref { text-decoration: none; }
a.footnote-ref sup, .sidenote sup { font-size: .7em; }
.footnotes { font-size: .9em; }
.sidenote { display: none; }
.footnotes, .sidenote { overflow-wrap: anywhere; } /* long bare links wrap instead of widening the page */
#refs { font-size: .9em; }
html { scroll-behavior: smooth; }
h2[id], h3[id] { scroll-margin-top: 1em; }

/* Sections list on the left (wide screens only) */
.toc { display: none; }

@media (min-width: 1000px) {
  body.post { margin-left: calc(50% - 460px); }
  .sidenote { display: block; float: right; clear: right; width: 240px; margin-right: -280px;
              font-size: .85em; line-height: 1.35; color: #333; margin-top: .2em; margin-bottom: .8em;
              padding: 2px 4px; }
  a.footnote-ref:hover + .sidenote { background: #fff3b0; }
  .footnotes { display: none; }
}
@media (min-width: 1240px) {
  body.post { margin-left: calc(50% - 340px); }
  .toc { display: block; position: fixed; top: 7em; left: calc(50% - 560px); width: 190px;
         font-size: .85em; line-height: 1.35; max-height: calc(100vh - 9em); overflow-y: auto; }
  .toc ul { list-style: none; padding: 0; margin: 0; }
  .toc li { margin-bottom: .5em; }
  .toc .toc-h3 { padding-left: 1em; }
  .toc a { color: #555; text-decoration: none; }
  .toc a:hover { color: #000; text-decoration: underline; }
}
object.pdf { width: 100%; height: 85vh; border: 1px solid #ccc; }
