/* D! id=stylesheet range-start */
/* Barebones stylesheet modeled on torontozendo.ca.
   Light, system sans-serif, fixed centered measure, default link colors.
   Style serves legibility, nothing else. */

html {
  background: #fff;
  color: #111;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
  padding: 2rem 1rem;
}

main {
  max-width: 680px;
  margin: 0 auto;
}

nav {
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}

nav a {
  color: #1a0dab;
  text-decoration: none;
}

nav a:visited {
  color: #1a0dab;
}

footer {
  max-width: 680px;
  margin: 3rem auto 0;
  font-size: 0.9rem;
  color: #444;
}

h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: #1a0dab;
}

a:visited {
  color: #5a3a9a;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

li {
  margin: 0.25rem 0;
}

/* Index lists (writing, books, patchbook chapters): stacked entries. */
.entry-list {
  list-style: none;
  padding-left: 0;
}

.entry-list li {
  padding: 0.6rem 0;
}

.entry-list a {
  display: block;
  font-weight: 600;
}

.entry-list .summary {
  display: block;
  margin: 0.15rem 0 0.25rem;
}

.entry-list time {
  display: block;
  font-size: 0.9rem;
  color: #444;
}

/* Books hub: framed as a listing with horizontal rules above and
   between books. No bottom rule — the shared footer <hr> closes it.
   No side borders, no shadow, no background. */
.books-list {
  border-top: 1px solid #ccc;
}

.books-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid #ccc;
}

.books-list li:last-child {
  border-bottom: none;
}

.books-list a {
  font-size: 1.1rem;
}

/* Chapter teaser inside a books-list entry. */
.books-list .teaser {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
  color: #444;
}

.books-list .teaser li {
  padding: 0.1rem 0;
}

.books-list .more {
  font-size: 0.9rem;
}

/* Chapter navigation (prev/next + dropdown) on patchbook chapter pages.
   Plain links + a native <details> dropdown — no JS. */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  position: relative;
}

/* Bottom chapter nav: separate from content above with a rule. */
.chapter-nav:last-of-type {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #ccc;
}

.chapter-nav .prev,
.chapter-nav .next {
  flex: 1;
  white-space: nowrap;
}

.chapter-nav .next {
  text-align: right;
}

.chapter-nav .prev:empty,
.chapter-nav .next:empty {
  visibility: hidden;
}

.chapter-jump {
  position: relative;
  flex: 1;
  text-align: center;
}

.chapter-jump summary {
  cursor: pointer;
  font-size: 0.9rem;
  list-style: none;
  white-space: nowrap;
}

.chapter-jump summary::-webkit-details-marker {
  display: none;
}

.chapter-jump summary::after {
  content: " \25BE";
}

.chapter-jump summary:hover {
  text-decoration: underline;
}

/* When open, the chapter list drops down as a full-width centered
   overlay with a border — a real dropdown, not an inline list. */
.chapter-jump[open] summary {
  margin-bottom: 0;
}

.chapter-jump[open] ul {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #ccc;
  list-style: none;
  text-align: left;
  z-index: 1;
}

.chapter-jump li {
  padding: 0.15rem 0;
}

/* Book link at the top of the dropdown: distinguished from chapter links. */
.chapter-jump .book-link {
  font-weight: 600;
  margin-bottom: 0.3rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #ddd;
}

/* Current chapter: "you are here" marker — bold, not a link color. */
.chapter-jump .current {
  font-weight: 600;
}

.chapter-jump .current a {
  color: #111;
}

hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2rem 0;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
  background: #f4f4f4;
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

pre {
  background: #f4f4f4;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border-radius: 2px;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid #ccc;
  color: #444;
}

time {
  color: #444;
  font-variant-numeric: tabular-nums;
}

img {
  max-width: 100%;
  height: auto;
}
/* D! id=stylesheet range-end */
