/* Main-site typography and layout. The separate /math/ site is unchanged. */
:root { color-scheme:light; --ink:#111; --muted:#555; --line:#deddd8; --accent:#111; --paper:#faf9f6; --site-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif; }
:root[data-theme="dark"] { color-scheme:dark; --ink:#e9e7e2; --muted:#b1aea7; --line:#3b3a36; --accent:#fff; --paper:#1c1c1b; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; background:var(--paper); color:var(--ink); font:16px/1.65 var(--site-font); -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font-family:var(--site-font); }
a { color:inherit; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
a:hover { text-decoration-thickness:2px; }
a:focus-visible { outline:2px solid currentColor; outline-offset:5px; }
.site-frame { width:min(660px,calc(100% - 48px)); margin:0 auto; }
.site-header { display:flex; align-items:baseline; justify-content:flex-end; gap:24px; padding:34px 0 0; font-size:14px; line-height:1.5; }
.site-header nav { display:flex; flex-wrap:wrap; gap:20px; }
.site-header nav a { color:var(--ink); text-decoration:none; padding:6px 0; }
.site-header a:hover,.site-header nav a[aria-current="page"] { text-decoration:underline; }
main { min-width:0; margin:54px 0 90px; }
main:focus { outline:none; }
main > h2 { font-size:23px; font-weight:600; margin:0 0 24px; }
main > p { margin:0 0 20px; }
.home-intro h1 { font-size:32px; line-height:1.2; font-weight:600; letter-spacing:-.8px; margin:0 0 44px; }
.home-intro p { margin:0 0 20px; }
.home-intro { margin-bottom:44px; }
.essay { font-size:16px; letter-spacing:0; }
.essay .essay-header h1 { white-space:normal; }
.essay blockquote { margin:30px 0; padding-left:24px; border-left:2px solid var(--line); color:var(--ink); }
.eyebrow,.essay-index span,.project-date { font-family:var(--site-font); }
.essay pre { background:#f2f1ee; }
:root[data-theme="dark"] .essay pre { background:#252523; }
:root[data-theme="dark"] .essay figure img { background:#fff; }
:root[data-theme="dark"] .essay .plot { background:#fff; border-color:var(--line); }
.essay code span { color:inherit!important; }
.essay .plot,.essay th,.learning-figure img { background:var(--paper); }
.learning-figure figcaption,.learning-essay .footnotes,.sync-essay .essay-notes,.sync-essay .essay-references,.sync-essay .essay-epigraph { color:var(--muted); }
.learning-header h1,.sync-header h1 { font-size:clamp(34px,5vw,44px); letter-spacing:-.04em; }
.learning-essay > h1 { font-size:30px; }
.learning-essay h2 { font-size:23px; }
.skip-link { position:absolute; left:20px; top:-80px; background:var(--paper); padding:10px; }
.skip-link:focus { top:10px; }
#save-status { max-width:360px; }
@media(max-width:600px) {
 .site-header { padding-top:28px; flex-wrap:wrap; gap:14px 24px; }
 .site-header nav { gap:18px; }
 main { margin-top:40px; }
 .home-intro h1 { font-size:28px; }
 .learning-header h1,.sync-header h1 { font-size:34px; }
 .learning-essay > h1 { font-size:27px; }
 .learning-essay h2 { font-size:22px; }
}


#theme-toggle { display:grid; place-items:center; align-self:center; width:42px; height:34px; flex-shrink:0; color:var(--ink); background:none; border:0; padding:0; cursor:pointer; border-radius:20px; }
#theme-toggle .theme-track { display:block; width:40px; height:22px; border:1px solid color-mix(in srgb,var(--ink) 22%,transparent); border-radius:20px; padding:2px; background:color-mix(in srgb,var(--ink) 5%,var(--paper)); transition:border-color .2s ease,background .2s ease; }
#theme-toggle .theme-thumb { display:grid; place-items:center; width:16px; height:16px; background:var(--paper); border-radius:50%; box-shadow:0 1px 3px #0002; transition:transform .22s ease; }
#theme-toggle svg { display:block; width:12px; height:12px; }
#theme-toggle .theme-moon { display:none; }
#theme-toggle:hover .theme-track { border-color:color-mix(in srgb,var(--ink) 50%,transparent); }
:root[data-theme="dark"] #theme-toggle .theme-thumb { transform:translateX(18px); }
:root[data-theme="dark"] #theme-toggle .theme-sun { display:none; }
:root[data-theme="dark"] #theme-toggle .theme-moon { display:block; }
@media(prefers-reduced-motion:reduce) { #theme-toggle .theme-thumb,#theme-toggle .theme-track { transition:none; } }
#theme-toggle:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }

.home-intro .home-statement { margin:46px 0 20px; font-size:inherit; font-weight:500; }

/* Avoid surplus scrolling beneath the homepage. */
main:has(> .home-intro) { margin-top:28px; margin-bottom:40px; }
.home-intro { margin-bottom:0; }

.home-intro { line-height:1.6995; }