/*
 * Page frame for the standalone (GitHub Pages) build. These rules mirror the
 * author's Astro blog (src/styles/global.css there): a 60 % text column,
 * Tufte-style margin notes, tap-to-reveal notes under 900 px. When the
 * article is imported into the blog, this file is not used; the blog's own
 * stylesheet provides the same rules.
 */
:root { --text: #1a1a1a; --muted: #666; --bg: #fffff8; --accent: #b3402a; }
@media (prefers-color-scheme: dark) { :root { --text: #e6e6e0; --muted: #9a9a94; --bg: #151515; --accent: #e8836d; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.15rem/1.7 Georgia, 'Iowan Old Style', serif; }
html { counter-reset: sidenote; }   /* on html, not body: KaTeX's stylesheet sets counter-reset on body, which would replace this one and make every sidenote number 1 */
a { color: var(--accent); }
header.site, footer.site { max-width: 55rem; margin: 0 auto; padding: 1.5rem 1rem; }
header.site a { color: var(--text); text-decoration: none; font-weight: bold; }
footer.site { color: var(--muted); font-size: .9rem; }
article, main { max-width: 55rem; margin: 0 auto; padding: 0 1rem; }
article .prose { width: 60%; }
article h1 { line-height: 1.2; }
time { color: var(--muted); font-size: .9rem; }

/* Sidenotes (same markup as the blog's rehype-sidenotes plugin) */
.sidenote-wrap { display: inline; }
.sidenote-number { counter-increment: sidenote; cursor: pointer; }
.sidenote-number::after { content: counter(sidenote); font-size: .7em; vertical-align: super; color: var(--accent); padding-left: .1em; }
.sidenote-toggle { display: none; }
.sidenote { float: right; clear: right; width: 50%; margin-right: -60%; margin-top: .3rem; font-size: .85rem; line-height: 1.4; color: var(--muted); position: relative; }
.sidenote::before { content: counter(sidenote) ' '; font-size: .8em; vertical-align: super; color: var(--accent); }
@media (max-width: 900px) {
  article .prose { width: 100%; }
  .sidenote { display: none; float: none; width: auto; margin: .6rem 0 .6rem 1rem; }
  .sidenote-toggle:checked + .sidenote { display: block; }
}
