/* Coherence: one stylesheet for the whole site, in the look of the book cover. */

@font-face { font-family: "Pagella"; src: url("/assets/fonts/pagella-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Pagella"; src: url("/assets/fonts/pagella-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Pagella"; src: url("/assets/fonts/pagella-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* colours sampled from the cover */
  --bg: #0A0A0A;
  --bg-alt: #111110;
  --text: #EDEAE3;
  --body: #DAD6CE;
  --muted: #A39F96;
  --label: #8F8B82;
  --line: #262522;
  --line-soft: #1F1E1C;
  --cover-edge: #2C2B28;
  --serif: "Pagella", "TeX Gyre Pagella", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.7;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: var(--text); text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { color: #FFFFFF; }
a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; padding: 10px 18px; background: var(--text); color: var(--bg); z-index: 10; }
.skip:focus { left: 16px; top: 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1.8;
  color: var(--label);
}
.muted { color: var(--muted); }

/* ---------- header and footer ---------- */

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 32px;
  padding-top: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  font-size: 1.625rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
.nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 0.75rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

.site-footer-inner {
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  padding-top: 20px;
  padding-bottom: 40px;
  font-size: 0.875rem;
  color: var(--label);
}
.site-footer .name { font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; }
.site-footer nav { display: flex; flex-wrap: wrap; column-gap: 22px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.site-footer .legal { flex-basis: 100%; margin-top: 6px; }

/* ---------- buttons and link rows ---------- */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 28px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 1rem;
  border-radius: 2px;
}
.button:hover { background: #FFFFFF; color: var(--bg); }
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.actions > a:not(.button) { display: inline-flex; align-items: center; min-height: 50px; }

.links { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 22px; }
.links > a, .links > span { display: inline-flex; align-items: center; min-height: 44px; }
.links .muted { color: var(--muted); }
.links .size { margin-left: 6px; font-size: 0.8125rem; color: var(--label); }
.more { margin-top: 8px; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- home: opening ---------- */

.hero-title {
  text-align: center;
  padding: clamp(48px, 7vw, 96px) 0 0;
}
.hero-title h1 {
  font-size: clamp(3rem, 2rem + 4vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero-subtitle {
  margin-top: clamp(14px, 1.5vw, 22px);
  font-size: clamp(0.8125rem, 0.7rem + 0.45vw, 1.0625rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  line-height: 1.8;
  color: var(--muted);
}
.hero {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 72px;
  padding: clamp(40px, 5vw, 72px) 0 clamp(64px, 8vw, 112px);
}
.hero-art { flex: 1 1 220px; display: flex; justify-content: center; }
.hero-art img {
  display: block;
  height: clamp(220px, 32vw, 440px);
  width: auto;
  max-width: none;
  transform-origin: 50% 50%;
  animation: breathe 7s ease-in-out infinite alternate;
}
@keyframes breathe { from { transform: scaleX(0.95); } to { transform: scaleX(1.05); } }
.hero-text { flex: 999 1 460px; min-width: 0; max-width: 620px; }
.hero-questions {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.55rem);
  line-height: 1.35;
}
.hero-questions span { display: block; }
.hero-questions span + span { margin-top: 0.35em; }
.hero .lede { margin-top: 28px; font-size: 1.125rem; line-height: 1.7; color: var(--muted); }
.hero .lede + .lede { margin-top: 16px; }
.hero .offer { margin-top: 20px; font-size: 1.125rem; line-height: 1.7; }

/* ---------- sections ---------- */

.section { border-top: 1px solid var(--line-soft); }
.section--alt { background: var(--bg-alt); }
.section-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(88px, 10vw, 136px) 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 80px;
}
.section-head { flex: 1 1 240px; max-width: 320px; }
.section-head h2, .page-title { font-size: clamp(2rem, 1.6rem + 1.1vw, 2.6rem); line-height: 1.12; }
.section-head p { margin-top: 16px; color: var(--muted); }
.section-body { flex: 999 1 560px; min-width: 0; }
.note { margin-top: 28px; color: var(--muted); }

/* the six questions */
.questions { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.questions li { border-top: 1px solid var(--line); }
.questions a { display: flex; align-items: baseline; gap: 0 24px; padding: 24px 0; color: var(--text); text-decoration: none; }
.questions .num { flex: 0 0 40px; font-size: 0.8125rem; letter-spacing: 0.2em; color: var(--label); }
.questions .row { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; }
.questions .q { font-size: 1.5rem; line-height: 1.3; }
.questions .t { font-style: italic; color: var(--muted); }
.questions a:hover .q { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.questions--plain .q { font-size: 1.25rem; }

/* books */
.book { display: flex; flex-wrap: wrap; gap: 24px 40px; padding: 48px 0; border-bottom: 1px solid var(--line); }
.book:first-child { padding-top: 0; }
.book:last-child { padding-bottom: 0; border-bottom: 0; }
.cover {
  flex: 0 0 168px;
  display: block;
  width: 168px;
  height: 252px;
  border: 1px solid var(--cover-edge);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
}
.cover--type { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 10px 18px; background: var(--bg); }
.cover--type .ct { font-size: 1.375rem; line-height: 1; }
.cover--type .cs, .cover--type .ca { font-size: 0.4375rem; line-height: 1.9; letter-spacing: 0.3em; text-transform: uppercase; color: var(--label); }
.cover--type .cs { margin-top: 10px; }
.cover--type .ca { margin-top: auto; letter-spacing: 0.22em; }
.book-text { flex: 1 1 280px; min-width: 0; }
.book h3 { margin-top: 12px; font-size: 1.875rem; line-height: 1.2; }
.book .desc { margin-top: 14px; font-size: 1.0625rem; line-height: 1.75; color: var(--muted); }
.small { font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }
.spacer { flex: 0 0 168px; }
@media (max-width: 540px) { .spacer { display: none; } }

/* updates */
.updates { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.updates li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 40px; padding: 28px 0; border-top: 1px solid var(--line); }
.updates time { flex: 0 0 140px; font-size: 0.75rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--label); }
.updates .entry { flex: 1 1 300px; min-width: 0; font-size: 1.0625rem; line-height: 1.75; }
.updates .entry p + p { margin-top: 12px; }

/* support */
.support-inner { max-width: 640px; margin: 0 auto; padding: clamp(96px, 12vw, 160px) 24px; text-align: center; }
.support h1 { margin-top: 18px; font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem); line-height: 1.2; font-style: italic; }
.support .lede { margin: 24px auto 0; max-width: 520px; font-size: 1.0625rem; line-height: 1.75; color: var(--muted); text-wrap: balance; }
.support .button { margin-top: 36px; }
.support .soon { margin-top: 36px; color: var(--label); font-size: 0.9375rem; }

/* ---------- inner pages ---------- */

.page { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 104px) 24px clamp(88px, 10vw, 128px); }
.page-head { max-width: 680px; }
.page-head .intro { margin-top: 18px; font-size: 1.125rem; line-height: 1.7; color: var(--muted); }
.page-section { margin-top: clamp(64px, 8vw, 96px); padding-top: 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 32px 80px; }
.page-section > .section-head h2 { font-size: clamp(1.6rem, 1.3rem + 0.9vw, 2.1rem); }

/* a book's own page */
.book-head { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; max-width: 880px; }
.book-head .cover { flex-basis: 200px; width: 200px; height: 300px; }
.book-head .cover--type { padding-top: 34px; }
.book-head .cover--type .ct { font-size: 1.625rem; }
.book-head .cover--type .cs, .book-head .cover--type .ca { font-size: 0.5rem; }
.book-head-text { flex: 1 1 320px; min-width: 0; }
.book-head h1 { margin-top: 12px; font-size: clamp(2rem, 1.6rem + 1.3vw, 2.8rem); line-height: 1.15; }
.book-head .desc { margin-top: 16px; font-size: 1.125rem; line-height: 1.7; color: var(--muted); }
.book-head .actions { margin-top: 28px; }
.book-head .support-note { margin-top: 20px; }

.column { max-width: 680px; margin: clamp(64px, 8vw, 96px) auto 0; }
.column > section + section { margin-top: clamp(56px, 7vw, 80px); }
.column h2.label { margin-bottom: 24px; }
.epigraph { max-width: 560px; margin: clamp(64px, 8vw, 96px) auto 0; text-align: center; font-style: italic; font-size: 1.1875rem; line-height: 1.75; color: var(--body); }

/* reading */
.reading { max-width: 680px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) 24px clamp(88px, 10vw, 128px); }
.reading h1 { margin-top: 16px; font-size: clamp(2.2rem, 1.7rem + 1.6vw, 3rem); line-height: 1.15; }
.reading .question { margin-top: 10px; font-size: 1.125rem; font-style: italic; color: var(--muted); }
.crumb a { color: var(--label); text-decoration: none; }
.crumb a:hover { color: var(--text); }
.prose { font-size: 1.1875rem; line-height: 1.75; color: var(--body); }
.reading .prose { margin-top: 48px; }
.reading > section { margin-top: clamp(56px, 7vw, 80px); padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line-soft); }
.reading > section > .prose { margin-top: 24px; }
.prose p + p { margin-top: 1.05em; }
.prose strong { font-weight: 700; color: var(--text); }
.prose h2 { margin: 2em 0 0.6em; font-size: 1.5rem; line-height: 1.3; color: var(--text); }

.essay-nav { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.essay-nav a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; max-width: 46%; text-decoration: none; }
.essay-nav .dir { font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--label); }
.essay-nav .ttl { font-size: 1.25rem; line-height: 1.3; }
.essay-nav a:hover .ttl { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.essay-nav .next { margin-left: auto; text-align: right; }
.essay-nav .contents { flex-basis: 100%; text-align: center; max-width: none; align-items: center; }
@media (max-width: 540px) { .essay-nav a { max-width: 100%; } .essay-nav .next { margin-left: 0; text-align: left; } }

/* ---------- the full work, read online ---------- */
.contents-group + .contents-group { margin-top: 36px; }
.contents-part { margin-bottom: 4px; font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; line-height: 1.8; color: var(--label); }
.full-work .prose h3 { margin: 1.8em 0 0.5em; font-size: 1.25rem; line-height: 1.35; color: var(--text); }
.full-work .prose h4 { margin: 1.6em 0 0.4em; font-size: 1.0625rem; font-weight: 700; color: var(--text); }
.full-work .prose ol, .full-work .prose ul { margin: 1.05em 0; padding-left: 1.4em; }
.full-work .prose li + li { margin-top: 0.6em; }
.full-work .prose .center { margin: 1.4em 0; text-align: center; }
.full-work .prose .math { white-space: nowrap; }
.full-work .prose dt { margin-top: 1.2em; font-weight: 700; color: var(--text); }
.full-work .prose dd { margin: 0.25em 0 0; }
.full-work .prose .citation a { text-decoration-color: var(--label); }
.full-work .prose .footnote-ref { text-decoration: none; }
.full-work .prose .footnote-ref sup { font-size: 0.7em; }
.full-work .prose .footnotes { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.7; }
.full-work .prose .footnotes ol { margin: 0; }
.full-work .prose .references .csl-entry { padding-left: 1.6em; text-indent: -1.6em; }
.full-work .prose .references .csl-entry + .csl-entry { margin-top: 0.85em; }
.full-work .prose .references .csl-entry:target { color: var(--text); background: var(--bg-alt); }
.full-work .prose .references { font-size: 1.0625rem; }

/* ---------- the mathematical documents ---------- */
.record-head .page-title { font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.6rem); line-height: 1.18; }
.record-creator { margin-top: 18px; font-size: 1.125rem; color: var(--body); }
.record-facts { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--label); }
.record-doi { margin-top: 10px; font-size: 0.9375rem; color: var(--muted); overflow-wrap: anywhere; }
.record-note { max-width: 680px; margin-top: 40px; padding: 18px 22px; border: 1px solid var(--line); background: var(--bg-alt); font-size: 1rem; line-height: 1.7; }
.record-description { font-size: 1.0625rem; line-height: 1.75; color: var(--body); }
.record-description p + p { margin-top: 1em; }
.files { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.files li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.files .file-main { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.files .file-name { font-size: 1.0625rem; overflow-wrap: anywhere; }
.files .file-title { font-size: 0.9375rem; line-height: 1.55; color: var(--muted); }
.files .file-meta { flex: 0 0 auto; display: flex; align-items: baseline; gap: 18px; font-size: 0.9375rem; }
.files .file-meta a { display: inline-flex; align-items: center; min-height: 44px; }
.files .size { color: var(--label); }
.files + .more { margin-top: 16px; }
.record-details { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 14px 28px; }
.record-details dt { padding-top: 3px; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--label); }
.record-details dd { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 540px) { .record-details { grid-template-columns: 1fr; gap: 2px 0; } .record-details dd { margin-bottom: 14px; } }
.book .print-note { margin-top: 6px; }
.book-head .print-note { margin-top: 8px; }

/* ---------- the work journal ---------- */
.updates .entry .more { margin-top: 2px; font-size: 0.9375rem; }
.journal .crumb time { white-space: nowrap; }
.journal .journal-note { margin-top: 20px; font-size: 0.9375rem; line-height: 1.65; font-style: italic; color: var(--muted); }
.journal-body { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); font-size: 1.0625rem; line-height: 1.75; color: var(--body); overflow-wrap: anywhere; }
.journal-body > :first-child { margin-top: 0; }
.journal-body h1, .journal-body h2, .journal-body h3, .journal-body h4, .journal-body h5, .journal-body h6 { color: var(--text); overflow-wrap: break-word; }
.journal-body h1 { margin: 2em 0 0.5em; font-size: clamp(1.7rem, 1.45rem + 0.9vw, 2.15rem); line-height: 1.2; }
.journal-body h2 { margin: 2.2em 0 0.6em; font-size: 1.4rem; line-height: 1.3; }
.journal-body h1 + h2 { margin-top: 0.6em; font-size: 1.125rem; line-height: 1.6; font-style: italic; color: var(--muted); }
.journal-body h3 { margin: 1.8em 0 0.5em; font-size: 1.1875rem; line-height: 1.4; }
.journal-body h4, .journal-body h5, .journal-body h6 { margin: 1.6em 0 0.4em; font-size: 1.0625rem; font-weight: 700; }
.journal-body p, .journal-body ul, .journal-body ol, .journal-body pre, .journal-body blockquote, .journal-body .table-wrap { margin: 0 0 1em; }
.journal-body ul, .journal-body ol { padding-left: 1.4em; }
.journal-body li + li { margin-top: 0.35em; }
.journal-body li > p { margin-bottom: 0.4em; }
.journal-body li > ul, .journal-body li > ol { margin: 0.35em 0 0; }
.journal-body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line-soft); }
.journal-body strong { font-weight: 700; color: var(--text); }
.journal-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.85em; padding: 0.08em 0.2em; border-radius: 3px; background: var(--bg-alt); }
.journal-body pre { padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); background: var(--bg-alt); line-height: 1.5; }
.journal-body pre code { padding: 0; background: none; font-size: 0.8125rem; white-space: pre; overflow-wrap: normal; }
.journal-body .table-wrap { overflow-x: auto; }
.journal-body table { border-collapse: collapse; font-size: 0.9375rem; line-height: 1.55; }
.journal-body th, .journal-body td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: normal; }
.journal-body th { font-weight: 700; color: var(--text); }
.journal-body blockquote { padding-left: 16px; border-left: 2px solid var(--line); color: var(--muted); }

/* 404 */
.notfound { max-width: 680px; margin: 0 auto; padding: clamp(96px, 14vw, 180px) 24px; }

@media (prefers-reduced-motion: reduce) {
  .hero-art img { animation: none; }
}

/* links inside book entries */
a.cover { color: var(--text); text-decoration: none; }
.book h3 a { text-decoration: none; }
.book h3 a:hover { text-decoration: underline; }

/* keep the five menu items on one line on phones, down to 360px wide */
@media (max-width: 540px) {
  .nav { column-gap: 10px; }
  .nav a { font-size: 0.6875rem; letter-spacing: 0.12em; }
}

/* Read by topic */
.topic-link { margin-top: 20px; font-size: 0.9375rem; }
.topic-link a { color: var(--muted); }
.topic-link a:hover { color: var(--text); }
.topic .column > section .more { margin-top: 0; }
/* home page: the title block carries the name, so the menu bar wordmark is hidden there */
.home .wordmark { display: none; }
.home .nav { margin-left: auto; }

/* Short Essays: the six questions as the book's contents, and the preface as its first page */
.column .section-lede { margin: -8px 0 28px; font-size: 1.0625rem; line-height: 1.7; color: var(--muted); }
.column .questions + .note { margin-top: 24px; }
.prose .epigraph--reading { max-width: 520px; margin: 0 auto 48px; font-size: 1.125rem; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.contact-form .field { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.contact-form label { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--label); }
.contact-form .optional { letter-spacing: 0.08em; text-transform: none; font-size: 0.875rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.contact-form textarea { min-height: 220px; line-height: 1.6; resize: vertical; }
.contact-form input:focus-visible, .contact-form select:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-color: var(--muted); }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .actions { margin-top: 4px; }
.contact-form button.button { border: 0; cursor: pointer; font: inherit; font-size: 1rem; }
.contact-form button.button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.contact-form .form-note { margin-top: -8px; color: var(--muted); }
