/* =====================================================================
   Styled after *The Diary of Lady Willoughby* (Chiswick Press; this scan
   is the Longmans 1873 reprint, ../diary.pdf).

   What the book actually does, and what is borrowed here:

     - a single thin rule framing the whole text block on every page
     - a second vertical rule inside that frame, cutting off a narrow
       marginal column; the book puts its dates there, this puts notes
     - a running head above a horizontal rule, folio in the outer corner
     - Caslon Old Face, old-style figures, italic for proper nouns
     - a foliate headpiece over the opening, tailpieces at section ends
     - a decorated initial dropped into the first paragraph
     - justified text, first-line indents, tight book leading
     - warm cream paper, brown-black ink

   Not borrowed: the long s. It is pastiche particular to that book —
   the author is impersonating a seventeenth-century lady — and it would
   make a modern essay unreadable.

   The palette and Caslon stack come from ../web/styles.css, which
   already had this right.
   ===================================================================== */

:root {
  --paper: #ece2c6;
  --paper-raise: #e6dbba;
  --edge: #ddd0ac;
  --ink: #1a140c;
  --ink-soft: #33291a;
  --muted: #5f5136;
  --rule: #2b2318;
  --accent: #7c3a29;
  --accent-wash: rgba(124, 58, 41, .13);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #211a11;
    --paper-raise: #2a2216;
    --edge: #171208;
    --ink: #f1e6c8;
    --ink-soft: #dccdaa;
    --muted: #ad9c74;
    --rule: #5d4f34;
    --accent: #cd8450;
    --accent-wash: rgba(205, 132, 80, .16);
  }
}

:root[data-theme="dark"] {
  --paper: #211a11;
  --paper-raise: #2a2216;
  --edge: #171208;
  --ink: #f1e6c8;
  --ink-soft: #dccdaa;
  --muted: #ad9c74;
  --rule: #5d4f34;
  --accent: #cd8450;
  --accent-wash: rgba(205, 132, 80, .16);
}

:root {
  --serif: 'Libre Caslon Text', 'Adobe Caslon Pro', 'Big Caslon', Caslon,
           'Hoefler Text', Georgia, 'Times New Roman', serif;
  --display: 'Libre Caslon Display', var(--serif);

  --measure: 33rem;      /* the text column */
  --margin-col: 13rem;   /* the diary's ruled marginal column */
  --gutter: 1.3rem;      /* white space between the text and the margin rule */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--edge);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.62;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-feature-settings: "onum" 1, "liga" 1, "kern" 1, "dlig" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-wash); }

/* ---------------------------------------------------------------------
   The leaf — the framed page
   ------------------------------------------------------------------ */

/* The frame hugs the text block, as the book's does — measure plus the
   marginal column plus an even inner margin, and no more. Sized wider than
   the content it would leave a slab of dead paper to the right of the notes. */
.leaf {
  background: var(--paper);
  border: 1px solid var(--rule);
  max-width: calc(var(--measure) + var(--margin-col) + var(--gutter) + 5rem);
  margin: 1.1rem auto 4rem;
  padding: 0 2.5rem clamp(3rem, 6vw, 5rem);
}

/* running head: folio in the outer corner, title centred, rule beneath */
.folio {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--paper);
  display: grid;
  grid-template-columns: 5rem 1fr 5rem;
  align-items: baseline;
  padding: .9rem 0 .55rem;
  border-bottom: 1px solid var(--rule);
  font-size: .93rem;
  color: var(--ink-soft);
}

.folio-num { font-variant-numeric: oldstyle-nums; color: var(--muted); }
.folio-title { text-align: center; }
.folio-section {
  text-align: right;
  font-style: italic;
  font-size: .85rem;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* On the ordinary pages this slot carries the theme toggle, since those pages
   have no reading-options bar of their own. */
.folio-section button {
  font: italic .8rem var(--serif);
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
}

.folio-section button:hover { color: var(--accent); }
.folio-section button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------------
   The text column, and the marginal column beside it
   ------------------------------------------------------------------ */

.essay {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: clamp(2rem, 4vw, 3.2rem);
  position: relative;
}

/* ---------------------------------------------------------------------
   Title page
   ------------------------------------------------------------------ */

/* The headpiece, in its own ruled compartment spanning the text column — the
   arrangement in Figure 16, where the engraved band is boxed by rules rather
   than merely sitting above one. A row of fleurons is the honest typographic
   equivalent of the woodcut, and is what Chiswick used when it had no block. */
.essay > .title::before {
  content: '❦ ❧ ❦';
  display: block;
  text-align: center;
  font-size: 1.3rem;
  color: var(--accent);
  letter-spacing: .5em;
  text-indent: .5em;
  padding: .75rem 0 .85rem;
  margin: 0 0 1.7rem;
  border: 1px solid var(--rule);
}

.title {
  font-family: var(--display);
  font-weight: 400;
  text-align: center;
  font-size: clamp(2.2rem, 5.5vw, 3.1rem);
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}

.byline {
  text-align: center;
  font-variant: small-caps;
  letter-spacing: .09em;
  font-size: .92rem;
  color: var(--ink-soft);
  margin: 1rem 0 0;
}

/* The note on the title: a dagger, not a numeral, and set small and centred
   under the byline rather than in the numbered sequence. */
.titlenote {
  text-indent: 0;
  text-align: center;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 29rem;
  margin: 1.1rem auto 0;
}

.titlenote .dag { color: var(--accent); margin-right: .25em; }

/* The .tex's \attrib: the line under an epigraph or a stanza naming its source. */
.attrib-line {
  text-indent: 0;
  text-align: right;
  font-style: italic;
  font-size: .9rem;
  color: var(--muted);
  margin: .4rem 1.3rem 1.9rem;
}

.keywords {
  margin: 1.8rem auto 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--rule);
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
}

.keywords .k-label {
  display: block;
  font-variant: small-caps;
  letter-spacing: .12em;
  font-size: .79rem;
  color: var(--accent);
  margin-bottom: .45rem;
}

/* ---------------------------------------------------------------------
   Epigraphs, quotations, verse
   ------------------------------------------------------------------ */

.epigraph { margin: 2.6rem auto 0; max-width: 29rem; }
.epigraph blockquote {
  margin: 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  text-align: justify;
}
.attrib {
  display: block;
  font-style: italic;
  font-size: .89rem;
  color: var(--muted);
  text-align: right;
  margin: .5rem 0 0;
}

blockquote.pull {
  margin: 1.7rem 1.3rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  text-align: justify;
  font-style: italic;
}

.verse {
  margin: 1.8rem 0 1.8rem 1.9rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.68;
}

/* Lines are explicit elements, not source newlines, so that the page and the
   PDF break the stanza in the same places. */
.verse .v { display: block; text-indent: 0; }

.sc { font-variant: small-caps; letter-spacing: .02em; }
em, cite, i { font-style: italic; }

/* the tailpiece */
.ornament {
  text-align: center;
  margin: 2.4rem 0;
  color: var(--accent);
  user-select: none;
}
.ornament::before { content: '❧'; font-size: 1.7rem; }

/* ---------------------------------------------------------------------
   Section heads — the numeral sits out in the marginal column, where
   the diary prints its year
   ------------------------------------------------------------------ */

.section-head { margin: 3.2rem 0 1.5rem; position: relative; }

.section-head .num {
  font-variant: small-caps;
  letter-spacing: .18em;
  font-size: .82rem;
  color: var(--muted);
  display: block;
  text-align: center;
  margin-bottom: .4rem;
}

/* ◊heading: the tailpiece's leaf in the numeral's place, so one mark is both
   the break and the head's device. */
.section-head .num.fleuron {
  font-variant: normal;
  letter-spacing: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: .7rem;
  user-select: none;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.55rem;
  margin: 0;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}

/* ---------------------------------------------------------------------
   Body text — justified, indented, with a decorated initial
   ------------------------------------------------------------------ */

/* Body prose only. The renderer marks these; the byline, lede, keywords and
   bibliography are <p> too, and must not pick up the indent or the justification. */
.essay p.body {
  margin: 0;
  text-indent: 1.5em;
  text-align: justify;
  hyphens: auto;
}

.section-head + p.body,
.lede + p.body,
.epigraph + p.body,
.verse + p.body,
blockquote + p.body,
.ornament + p.body { text-indent: 0; }

/* The decorated initial, set in a bordered block rather than dropped bare.
   The formula calls for "generous use of initials and headpieces", and both
   Figure 11 and Figure 16 show a woodcut letter in a square block, not a plain
   drop cap. [data-notes] is set only by the essay template, so the ordinary
   pages open plainly — which is the Press's other, sober formula, the one used
   for tracts, where "type stands on its own, with no decorative initials or
   other ornaments to distract the reader from the sober matter of the text". */
/* The initial is cut like a Victorian woodcut factotum — the Chiswick Press
   kind: the capital reversed out in paper colour from a solid block, on a
   ground of scrolling foliage. The foliage is a tiled SVG in white at low
   opacity, so it reads as tracery on the accent in either colour scheme, and
   the text-shadow in the block's own colour clears a margin round the letter,
   as the cutter cleared the wood round it. Opening paragraphs of posts (the
   first body paragraph of an essay-template page with a page title) take it
   as well as the paragraph after each section head. */
[data-notes] .section-head + p.body:not(.has-initial)::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 3.35rem;
  line-height: .9;
  margin: .3rem .7rem 0 0;
  padding: .42rem .5rem .3rem;
  color: var(--paper);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 28 28'%3E%3Cg opacity='.42'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M0 14c5-7 9-7 14 0s9 7 14 0'/%3E%3Cpath d='M14 0c-2 4-2 7 0 9M14 28c2-4 2-7 0-9'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cpath d='M6.5 9.8c1.5-2.8 4.3-3.4 5.6-2.8-1 2.3-3.6 3.4-5.6 2.8z'/%3E%3Cpath d='M21.5 18.2c-1.5 2.8-4.3 3.4-5.6 2.8 1-2.3 3.6-3.4 5.6-2.8z'/%3E%3Ccircle cx='0' cy='0' r='1.6'/%3E%3Ccircle cx='28' cy='0' r='1.6'/%3E%3Ccircle cx='0' cy='28' r='1.6'/%3E%3Ccircle cx='28' cy='28' r='1.6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  border: 1px solid var(--accent);
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  text-shadow: 0 0 2px var(--accent), 0 0 4px var(--accent), 0 0 6px var(--accent);
}

/* ---------------------------------------------------------------------
   Links
   ------------------------------------------------------------------ */

/* A dotted rule rather than a solid one: in-text links here are mostly titles,
   already italic, and a solid underline under italic Caslon reads as clutter. */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}

a:hover { color: var(--accent); border-bottom-color: var(--accent); }
a:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.folio-title a { border-bottom: none; }
.folio-title a:hover { color: var(--accent); }

/* ---------------------------------------------------------------------
   Wayfinder — the nav, set as a line of contents beneath the running head
   ------------------------------------------------------------------ */

.wayfinder {
  text-align: center;
  padding: .75rem 0 .8rem;
  border-bottom: 1px solid var(--rule);
  font-variant: small-caps;
  letter-spacing: .1em;
  font-size: .84rem;
}

.wayfinder a { border-bottom: none; color: var(--muted); }
.wayfinder a:hover { color: var(--accent); }
.wayfinder .here { color: var(--ink); }
.wayfinder-sep { color: var(--accent); margin: 0 .55rem; font-size: .78rem; }

/* ---------------------------------------------------------------------
   Ordinary pages
   ------------------------------------------------------------------ */

.page-title {
  font-family: var(--display);
  font-weight: 400;
  text-align: center;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 1.2rem;
  text-wrap: balance;
}

.lede {
  text-indent: 0;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.5;
  max-width: 27rem;
  margin: 0 auto 2.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

.entry { margin: 0 0 2.6rem; }

/* An ornament and a section head are each a break on their own; stacked, their
   margins added up to a hole. Let the ornament be the break and the head sit
   just under it. */
.ornament + .section-head { margin-top: 0; }

/* A paragraph introducing a run of entries (Writing's "Posts first published
   on Medium") is a note on the section, not the first line of an entry. */
.essay p.body + .entry { margin-top: 2rem; }
.essay p.body + .entries { margin-top: 1.4rem; }
.essay .section-head + p.body:has(+ :is(.entry, .entries)) {
  text-align: center;
  font-style: italic;
  font-size: .95rem;
  color: var(--ink-soft);
}

.entry-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  margin: 0 0 .2rem;
  line-height: 1.2;
}

.entry-meta {
  text-indent: 0;
  text-align: left;
  font-style: italic;
  font-size: .86rem;
  color: var(--muted);
  margin: 0 0 .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
}

/* ◊entries: a run of entries set as a contents list. The date stands in a ruled
   marginal column, which is where the Diary itself puts its dates, and the rule
   under each title goes: it cut every title off from its own description. */
.entries {
  --date-col: 7.5rem;
  position: relative;
}
.entries::before {
  content: '';
  position: absolute;
  top: .35rem;
  bottom: .35rem;
  left: var(--date-col);
  border-left: 1px solid var(--rule);
}
.entries .entry {
  display: grid;
  grid-template-columns: var(--date-col) minmax(0, 1fr);
  column-gap: 1.1rem;
  align-items: baseline;
  margin: 0;
}
.entries .entry + .entry { margin-top: 1.5rem; }
.entries .entry-title {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.22rem;
  margin: 0 0 .3rem;
}
.entries .entry-meta {
  grid-column: 1;
  grid-row: 1 / span 4;   /* so the date's height never opens up the title's row */
  margin: 0;
  padding: 0 .75rem 0 0;
  border: 0;
  text-align: right;
  white-space: nowrap;
  font-size: .82rem;
}
.essay .entries p.body {
  grid-column: 2;
  text-indent: 0;
  text-align: left;
  hyphens: manual;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.essay .entries p.body + p.body { margin-top: .35rem; }

/* Figures, lists and preformatted text — so far only in the posts ported from
   Medium. Images are framed with the page's own rule, like a plate. */
.essay figure { margin: 2rem 0; text-align: center; }
.essay figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--rule);
}
.essay figcaption {
  margin: .6rem auto 0;
  max-width: 29rem;
  font-style: italic;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}
.essay figure.video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
}
.essay ul { margin: 1.2rem 0; padding-left: 1.5em; }
.essay li { margin: .3rem 0; }
.essay pre {
  margin: 1.6rem 0;
  padding: .8rem 1rem;
  background: var(--paper-raise);
  border: 1px solid var(--edge);
  font: .95rem/1.5 var(--serif);
  white-space: pre-wrap;
}
figure + p.body, ul + p.body, pre + p.body { text-indent: 0; }

/* The contact form. Fields sit on the raised paper, ruled like the frame. */
.contact-form { margin: 0 0 2.4rem; }
.contact-form .field { margin: 0 0 1.1rem; }
.contact-form label {
  display: block;
  font-variant: small-caps;
  letter-spacing: .08em;
  font-size: .86rem;
  color: var(--muted);
  margin-bottom: .3rem;
}
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  font: 1rem/1.5 var(--serif);
  color: var(--ink);
  background: var(--paper-raise);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: .5rem .65rem;
}
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.contact-form button {
  font: italic 1rem var(--serif);
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: .45rem 1.6rem;
  cursor: pointer;
}
.contact-form button:hover { background: var(--accent-wash); }
.contact-form button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.contact-form .hp { display: none; }

.deflist {
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: .45rem 1rem;
}

.deflist dt {
  font-variant: small-caps;
  letter-spacing: .08em;
  font-size: .86rem;
  color: var(--muted);
}

.deflist dd { margin: 0; }

/* ---------------------------------------------------------------------
   Notes
   ------------------------------------------------------------------ */

.noteref { position: relative; }

/* A note anchored inside italic text — an attribution line, an epigraph, a
   stanza — must not inherit that italic. The note is an aside from the run it
   hangs on, not part of it. */
.note-body { font-style: normal; }

/* The toggle only holds open/closed state for the in-the-text and tooltip
   modes; essay.js sets it when the mark (a real link) is clicked. It is out of
   the tab order, since the link itself is the keyboard handle. */
.note-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

[data-notes="footnote"] .note-toggle,
[data-notes="hidden"] .note-toggle { display: none; }

.note-number {
  cursor: pointer;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
  font-size: .66em;
  vertical-align: super;
  line-height: 0;
  padding: 0 .12em;
  font-variant-numeric: lining-nums;
}

.note-number:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.note-body-number { display: none; }
.note-backlink { display: none; text-decoration: none; color: var(--accent); }

/* inline mode — collapsed until the number is clicked */
[data-notes="inline"] .note-body {
  display: none;
  margin: .9rem 0;
  padding: .7rem 1rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-wash);
  font-size: .92rem;
  line-height: 1.5;
  text-indent: 0;
  text-align: left;
}

[data-notes="inline"] .note-toggle:checked ~ .note-body { display: block; }
[data-notes="inline"] .note-body-number { display: inline; color: var(--accent); font-weight: 700; }

/* --- tooltip mode -------------------------------------------------------
   The note stays where it was authored and is shown as a card beside its
   mark. Base position is CSS, so the card appears with scripting off; the
   script only nudges it back inside the frame and flips it above the line
   when there is no room below. */

[data-notes="tooltip"] .note-body {
  display: none;
  position: absolute;
  z-index: 20;
  top: 1.5em;
  left: 0;
  width: 21rem;
  max-width: min(21rem, 78vw);
  padding: .75rem .95rem;
  background: var(--paper-raise);
  border: 1px solid var(--rule);
  box-shadow: 0 3px 14px rgba(20, 14, 6, .22);
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-indent: 0;
  text-align: left;
  hyphens: auto;
  white-space: normal;
}

[data-notes="tooltip"] .note-toggle:checked ~ .note-body { display: block; }

[data-notes="tooltip"] .note-body-number {
  display: inline;
  color: var(--accent);
  font-variant-numeric: oldstyle-nums;
}

/* Marking the open note: an underline, not a filled swatch. The mark is a
   superscript numeral a few pixels tall, and a solid background turns it into
   an unreadable blob. */
[data-notes="tooltip"] .note-toggle:checked + .note-number {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-notes="tooltip"] .note-body {
    box-shadow: 0 3px 14px rgba(0, 0, 0, .5);
  }
}

:root[data-theme="dark"] [data-notes="tooltip"] .note-body {
  box-shadow: 0 3px 14px rgba(0, 0, 0, .5);
}

/* endnote mode */
.endnotes {
  list-style: none;
  padding: 1rem 0 0;
  margin: 3rem 0 0;
  border-top: 1px solid var(--rule);
}
.endnotes li {
  font-size: .88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: .55rem;
  text-align: justify;
  hyphens: auto;
}
[data-notes="footnote"] .note-body-number {
  display: inline;
  color: var(--accent);
  font-variant-numeric: oldstyle-nums;
}
[data-notes="footnote"] .note-backlink { display: inline; }

/* Landing on a note after clicking its mark, and landing back on the mark
   after clicking the arrow, should both say plainly where you arrived. */
.note-body.landed,
.noteref.landed .note-number {
  animation: landing 2.2s ease both;
}

@keyframes landing {0%, 15% { background: var(--accent-wash); box-shadow: 0 0 0 .4rem var(--accent-wash); }
100% { background: transparent; box-shadow: 0 0 0 .4rem transparent; }}

/* --- the two-pane reader -------------------------------------------------
   The essay and the notes each get their own scrollbar; the script keeps them
   in step. The panes exist in the markup for every mode — outside this one
   .spread and .main-pane are plain blocks and .notes-pane is not displayed, so
   nothing about the other five changes. */

.spread { display: block; }
.main-pane { display: block; }
.notes-pane { display: none; }

html[data-notes="pane"],
html[data-notes="pane"] body { height: 100%; }

/* The vh line is a fallback, not a duplicate: without a definite height here
   the leaf has none either, the panes size to their content instead of
   overflowing, and there is nothing for a scrollbar to be about. */
html[data-notes="pane"] body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

html[data-notes="pane"] .leaf {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 76rem;
  margin: .5rem auto .9rem;
  padding-bottom: 0;
}

html[data-notes="pane"] .spread {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;       /* without this the panes refuse to scroll */
}

html[data-notes="pane"] .main-pane {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: 0 clamp(1rem, 2.5vw, 2rem);
}

/* Two scrollbars are the point of this mode, so they are drawn rather than
   left to the platform. Chrome on Windows 11 defaults to overlay scrollbars,
   which occupy no width and stay invisible until you are already scrolling —
   measured at 0px of gutter on both panes. Declaring ::-webkit-scrollbar opts
   back into classic scrollbars that take space and are always visible. */
/* Deliberately NOT setting scrollbar-width/scrollbar-color: where those
   standard properties are supported they override ::-webkit-scrollbar
   completely, and they offer no control over the thumb's minimum size. This
   essay is about 30,000px long in a 670px pane, so a strictly proportional
   thumb comes out around fifteen pixels — present, measurable, and far too
   small to notice or to grab. min-height is the whole reason for using the
   -webkit- rules, so they must be the ones in effect.
   Firefox ignores these and draws its own scrollbar, which is visible anyway. */
html[data-notes="pane"] .main-pane,
html[data-notes="pane"] .notes-pane { scrollbar-gutter: stable; }

html[data-notes="pane"] .main-pane::-webkit-scrollbar,
html[data-notes="pane"] .notes-pane::-webkit-scrollbar { width: 14px; }

html[data-notes="pane"] .main-pane::-webkit-scrollbar-track,
html[data-notes="pane"] .notes-pane::-webkit-scrollbar-track {
  background: var(--edge);
  border-left: 1px solid var(--rule);
}

html[data-notes="pane"] .main-pane::-webkit-scrollbar-thumb,
html[data-notes="pane"] .notes-pane::-webkit-scrollbar-thumb {
  background: var(--muted);
  background-clip: content-box;       /* with the transparent border, an inset thumb */
  border: 3px solid transparent;
  border-radius: 8px;
  min-height: 3.5rem;
}

html[data-notes="pane"] .main-pane::-webkit-scrollbar-thumb:hover,
html[data-notes="pane"] .notes-pane::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  background-clip: content-box;
}

html[data-notes="pane"] .main-pane .essay {
  max-width: var(--measure);
  margin: 0 auto;
}
/* The last notes need somewhere to scroll to. The room goes after whatever
   ends the pane: the essay, or a post's previous/next links, which the
   template places after the essay. */
html[data-notes="pane"] .main-pane > :last-child { margin-bottom: 55vh; }
/* The links sit outside the article, so they take its measure themselves. */
.main-pane > .post-nav { max-width: var(--measure); margin-left: auto; margin-right: auto; }

/* The pane itself is the scroller, with the search bar sticky inside it. With
   overflow:hidden the sync could still drive it programmatically — which is
   exactly why it looked fine — but there was no scrollbar to take hold of. */
html[data-notes="pane"] .notes-pane {
  display: block;
  flex: 0 0 34%;
  max-width: 27rem;
  min-width: 17rem;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--paper-raise);
  border-left: 1px solid var(--rule);
}

.notes-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .8rem 1.4rem .75rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raise);
}

.notes-bar {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .55rem;
  margin-bottom: .55rem;
}

.notes-title {
  font-variant: small-caps;
  letter-spacing: .14em;
  font-size: .88rem;
  color: var(--ink-soft);
}

.notes-count {
  font-size: .8rem;
  font-style: italic;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.notes-search {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--serif);
  font-style: italic;
  font-size: .88rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1px;
  padding: .35rem .6rem;
  -webkit-appearance: none;
}

.notes-search::placeholder { color: var(--muted); font-style: italic; }

.notes-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-wash);
}

.notes-inner { padding: 1.2rem 1.4rem 55vh; }

html[data-notes="pane"] .note-body {
  display: block;
  font-size: .87rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-indent: 0;
  text-align: left;
  hyphens: auto;
  margin: 0 0 1.1rem;
  opacity: .62;
  transition: opacity .25s ease;
}

html[data-notes="pane"] .note-body.active { opacity: 1; }
html[data-notes="pane"] .note-body.filtered-out { display: none; }

html[data-notes="pane"] .note-body-number,
html[data-notes="pane"] .note-backlink { display: inline; }

html[data-notes="pane"] .note-body-number {
  color: var(--accent);
  font-variant-numeric: oldstyle-nums;
}

html[data-notes="pane"] .note-number.active { text-decoration: underline; text-underline-offset: 2px; }

/* --accent-wash is a 13% tint, which is right for a target flash and far too
   faint for a search hit you are scanning eighty notes for. */
.note-text mark {
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--ink);
  border-radius: 1px;
  padding: 0 .12em;
}

/* Nothing is "active" while a filter is on — sync is off — so the results
   would otherwise all sit at the dimmed inactive opacity. */
html[data-notes="pane"] .notes-inner.filtering .note-body { opacity: 1; }

.notes-empty {
  display: none;
  font-style: italic;
  font-size: .88rem;
  color: var(--muted);
  text-indent: 0;
  text-align: center;
}

.notes-inner.no-results .notes-empty { display: block; }

/* The nav band and the frame have to stay put while the panes move. */
html[data-notes="pane"] body > .wayfinder { flex: 0 0 auto; }

/* The head spans both panes here, so it carries the section being read rather
   than the site name — which the default three-column head truncated to
   "The Com…" in the outer cell. */
html[data-notes="pane"] .folio {
  position: static;
  grid-template-columns: 10rem 1fr 5rem 5rem;
}

html[data-notes="pane"] .folio-title { display: none; }

html[data-notes="pane"] .folio-section {
  grid-column: 2;
  text-align: center;
  overflow: visible;
  font-style: italic;
  color: var(--ink-soft);
  font-size: .93rem;
}

/* hidden mode */
[data-notes="hidden"] .note-body { display: none; }
[data-notes="hidden"] .note-number { color: var(--muted); }

/* ---------------------------------------------------------------------
   Bibliography
   ------------------------------------------------------------------ */

.bibliography {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 3px double var(--rule);
}

.bibliography h2 {
  font-variant: small-caps;
  letter-spacing: .13em;
  font-size: .92rem;
  font-weight: 400;
  color: var(--accent);
  text-align: center;
  margin: 0 0 1.2rem;
}

/* The note on sources: prefatory matter to the bibliography, so it is set
   smaller than the body and separated from the entries by a rule. */
.bibnote {
  font-size: .92rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--rule);
}

.bibnote p {
  text-indent: 1.4em;
  text-align: justify;
  hyphens: auto;
  margin: 0;
}

.bibnote p:first-child { text-indent: 0; }

.bib-entry {
  font-size: .9rem;
  line-height: 1.5;
  margin: 0 0 .65rem;
  padding-left: 1.5rem;
  text-indent: -1.5rem;
  color: var(--ink-soft);
  text-align: left;
  hyphens: auto;
}

/* ---------------------------------------------------------------------
   The view menu — the reading options, gathered into the running head
   ------------------------------------------------------------------ */

/* The essay's head carries a fourth cell for the menu. The first track is
   widened to match the two on the right, so the centre track stays centred on
   the page: 10rem one side, 5rem + 5rem the other. */
.folio-reading { grid-template-columns: 10rem 1fr 5rem 5rem; }

.viewmenu {
  grid-column: 4;
  justify-self: end;
  position: relative;      /* the panel hangs off this, not off the head */
  z-index: 20;
  font-size: .8rem;
}

.viewmenu > summary {
  cursor: pointer;
  color: var(--muted);
  font-variant: small-caps;
  letter-spacing: .1em;
  white-space: nowrap;
  list-style: none;
}
.viewmenu > summary::-webkit-details-marker { display: none; }
.viewmenu > summary::after { content: '▾'; margin-left: .3rem; font-size: .75em; }
.viewmenu > summary:hover,
.viewmenu[open] > summary { color: var(--accent); }
.viewmenu > summary:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* A panel, not a bar: the options stack downward, so the menu can live in the
   head's outer cell without widening it. */
.controls {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .25rem;
  width: max-content;
  min-width: 9.5rem;
  padding: .65rem;
  background: var(--paper-raise);
  border: 1px solid var(--rule);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  text-align: left;
}

.controls-label {
  color: var(--muted);
  font-variant: small-caps;
  letter-spacing: .12em;
  padding-bottom: .1rem;
}

.controls button {
  font-family: var(--serif);
  font-size: .84rem;
  font-style: italic;
  cursor: pointer;
  padding: .22rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background: var(--paper);
  color: var(--muted);
  text-align: left;
}

.controls button:hover { color: var(--accent); border-color: var(--accent); }
.controls button.on { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.controls button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* The theme switch is not one of the note placements, so it is set off from
   them rather than reading as a sixth one. */
.controls .theme {
  margin-top: .45rem;
  padding-top: .5rem;
  border: none;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  text-align: center;
}
.controls .theme:hover { color: var(--accent); }

/* ---------------------------------------------------------------------
   The site nav, now above the frame
   ------------------------------------------------------------------ */

/* Inside the frame a rule separated the nav from the running head. Above the
   frame it sits on the page ground, where that rule would cut across nothing,
   so it goes and the band takes the padding the options bar used to have. */
body > .wayfinder {
  border-bottom: none;
  max-width: 76rem;
  margin: 0 auto;
  padding: 1rem 1rem .35rem;
}

/* ---------------------------------------------------------------------
   Narrow screens: the running head drops back to a plain centred title.
   The frame stays — it is the book's most recognizable feature.
   ------------------------------------------------------------------ */

@media (max-width: 60rem) {.folio { grid-template-columns: 3rem 1fr 3rem; }
.folio-reading { grid-template-columns: 3rem 1fr 3rem 4.5rem; }
.folio-section { display: none; }}

/* The nav is emitted with no whitespace between its items, so on a phone it
   could not break and ran ~40px off the right edge. Tighten it to fit one line
   where it can, and let it wrap where it cannot. */
@media (max-width: 30rem) {.wayfinder {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: .25rem;
  letter-spacing: .05em;
}
.wayfinder-sep { margin: 0 .3rem; }

/* A URL in the second column is one unbreakable word; at 320px the 7rem
   label column left it no room. */
.deflist { grid-template-columns: 5rem minmax(0, 1fr); }
.deflist dd { overflow-wrap: anywhere; }

/* No room for a marginal column: the date drops under its title. */
.entries::before { content: none; }
.entries .entry { display: block; }
.entries .entry-meta { text-align: left; white-space: normal; padding: 0; margin-bottom: .3rem; }}

/* Two panes need two columns. Below this the reader falls back to one column
   with the notes gathered underneath.

   56rem is about the floor: a 33rem measure plus the notes column's 17rem
   minimum plus the frame. It was 62rem, which meant the panes simply did not
   appear on any window under 992px wide. The script no longer carries a copy of
   this number — it asks whether .main-pane is actually a scroller, so the
   layout decides and the behaviour follows. */
@media (max-width: 56rem) {html[data-notes="pane"],
html[data-notes="pane"] body { height: auto; }

html[data-notes="pane"] body { display: block; overflow: visible; }

html[data-notes="pane"] .leaf {
  display: block;
  max-width: calc(var(--measure) + var(--margin-col) + var(--gutter) + 5rem);
  margin: 1.1rem auto 4rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

html[data-notes="pane"] .spread { display: block; }
html[data-notes="pane"] .main-pane { overflow: visible; padding: 0; }
html[data-notes="pane"] .main-pane .essay { padding-bottom: 0; }
html[data-notes="pane"] .main-pane > :last-child { margin-bottom: 0; }

html[data-notes="pane"] .notes-pane {
  display: block;
  max-width: none;
  min-width: 0;
  overflow: visible;
  background: transparent;
  border-left: none;
  border-top: 3px double var(--rule);
  margin-top: 2.5rem;
}

html[data-notes="pane"] .notes-header { background: transparent; padding: .9rem 0 .8rem; }
html[data-notes="pane"] .notes-inner { padding: 1.2rem 0 2rem; }
html[data-notes="pane"] .note-body { opacity: 1; }
html[data-notes="pane"] .folio { position: sticky; }}

@media (prefers-reduced-motion: reduce) {* { transition: none !important; }}

/* ---------------------------------------------------------------------
   Blog posts and page furniture (22 Nov 2026)
   ------------------------------------------------------------------ */

/* The first paragraph after a page title is a first paragraph like the one
   after a section head: set flush, so About's two paragraphs agree. */
.page-title + p.body,
.entry-meta + p.body { text-indent: 0; }

/* In a post ([data-notes] marks the essay template) the title is set flush
   left with its date directly beneath, then a space, then the rule. */
[data-notes] .essay > .page-title {
  text-align: left;
  margin: 0 0 .35rem;
}
[data-notes] .essay > .page-title + .entry-meta {
  font-size: .92rem;
  margin: 0 0 2rem;
  padding-bottom: 1.3rem;
}

/* More air between an epigraph and the essay it introduces. */
.essay .epigraph + p.body { margin-top: 2.6rem; }
[data-notes] .essay > .entry-meta + .epigraph { margin-top: 2.4rem; }

/* On a phone the indent alone is hard to see at a glance; open the paragraphs
   a little. */
@media (max-width: 40rem) {.essay p.body + p.body { margin-top: .6em; }}

/* The breadcrumb above a post's title. */
.crumbs {
  font-variant: small-caps;
  letter-spacing: .1em;
  font-size: .84rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.crumbs a { color: var(--muted); border-bottom: none; text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs-sep { color: var(--accent); margin: 0 .45rem; }

/* Older / all posts / newer, at the foot of a post. */
.post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
  margin: 3rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}
.post-nav a { text-decoration: none; border-bottom: none; color: var(--ink); }
.post-nav a:hover .post-nav-title,
.post-nav a:hover.post-nav-all { color: var(--accent); }
.post-nav-label {
  display: block;
  font-variant: small-caps;
  letter-spacing: .1em;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .2rem;
}
.post-nav-title { font-family: var(--display); font-size: 1.05rem; line-height: 1.25; }
.post-nav-next { text-align: right; }
.post-nav-all {
  align-self: center;
  font-variant: small-caps;
  letter-spacing: .1em;
  font-size: .84rem;
  color: var(--muted) !important;
}
@media (max-width: 30rem) {.post-nav { grid-template-columns: 1fr; gap: .9rem; }
.post-nav span.post-nav-prev:empty,
.post-nav span.post-nav-next:empty { display: none; }
.post-nav-prev { order: 1; }
.post-nav-next { order: 2; }
.post-nav-all { order: 3; text-align: center; }}

/* The notes search, folded behind a button until wanted. */
.notes-search-toggle {
  font-family: var(--serif);
  font-style: italic;
  font-size: .8rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 1px;
  padding: .05rem .5rem;
  margin-left: auto;
  cursor: pointer;
}
.notes-search-toggle::before { content: '⌕'; font-style: normal; margin-right: .3em; }
.notes-search-toggle:hover,
.notes-search-toggle.on { color: var(--accent); border-color: var(--accent); }
.notes-search-toggle:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.notes-bar { justify-content: flex-start; }
.notes-search[hidden] { display: none; }
.notes-bar:has(+ .notes-search[hidden]) { margin-bottom: 0; }

/* The Writing page's RSS subscription, as a button. */
.button-row { text-align: center; text-indent: 0; margin: -.6rem 0 2.4rem; }
a.button-link {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font: italic .95rem var(--serif);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  border-radius: 1px;
  padding: .4rem 1.2rem;
  text-decoration: none;
}
a.button-link:hover { background: var(--accent-wash); }
a.button-link:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
/* The feed mark, drawn in CSS so it takes the accent in either scheme. */
.rss-mark {
  width: .8em; height: .8em; flex: none;
  background:
    radial-gradient(circle at 15% 85%, currentColor 0 13%, transparent 14%),
    radial-gradient(circle at 0 100%, transparent 0 38%, currentColor 39% 52%, transparent 53%),
    radial-gradient(circle at 0 100%, transparent 0 70%, currentColor 71% 85%, transparent 86%);
}

/* Entry titles on Writing and Projects, set heavier. Libre Caslon Display has
   only a regular weight (a browser-faked bold smears it), so the titles take
   the Text face's real bold instead, a step smaller to match its larger eye. */
.entry-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: .005em;
}
.entries .entry-title { font-size: 1.08rem; }

/* The Writing page spends 7.5rem of its measure on the date column, which left
   the descriptions too narrow. A page of dated entries takes the marginal
   column's width as well, so it fills the frame. */
.essay:has(> .entries) { max-width: calc(var(--measure) + var(--margin-col)); }
.entries { --date-col: 8.6rem; }

/* ---- component: contents (defined beside its renderer: grep define-component) ---- */
/* The contents list (render.rkt, add-contents): an essay of three or more
   numbered sections, set like the bibliography's head, before the first. */
.contents {
  margin: 2.2rem auto 2.6rem;
  padding: 1rem 0 1.1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 24rem;
}
.contents-title {
  font-variant: small-caps;
  letter-spacing: .13em;
  font-size: .92rem;
  font-weight: 400;
  color: var(--accent);
  text-align: center;
  margin: 0 0 .6rem;
}
.contents ol { list-style: none; margin: 0; padding: 0; }
.contents li { margin: .2rem 0; line-height: 1.35; }
.contents a { color: var(--ink); text-decoration: none; display: grid; grid-template-columns: 2.6rem 1fr; }
.contents a:hover { color: var(--accent); }
.contents-num {
  font-variant: small-caps;
  letter-spacing: .1em;
  color: var(--muted);
  text-align: right;
  padding-right: .7rem;
}

/* ---- component: initials (defined beside its renderer: grep define-component) ---- */
/* The rest of the opening word in small capitals, as the printers set it
   after an initial (with-initial wraps the word). */
.first-word { font-variant: small-caps; letter-spacing: .04em; }

/* The initial is a real element (with-initial makes it), so it can be a true
   square three lines deep — ::first-letter cannot be given a width, and an I
   came out a sliver. 4.6rem is two body lines (1.8rem each) plus a capital's
   height, so the block's foot sits on the third line. */
.initial {
  float: left;
  width: 4.6rem;
  height: 4.6rem;
  margin: .32rem .8rem 0 0;
  background-color: var(--accent);
  /* The letter's PNG (images/initials/X.png, chosen by its cap-X class) is
     an alpha mask: the woodcut is cut out of the accent colour, so it follows
     light and dark mode. The letter itself stays in the element for copying,
     but is not painted. */
  -webkit-mask: var(--cap) center / contain no-repeat;
          mask: var(--cap) center / contain no-repeat;
  color: transparent;
  font-size: 1px;
  overflow: hidden;
  text-indent: 0;
  user-select: none;
}

/* Text for screen readers only (the opening word, whole, beside its initial). */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The letters, one class each (with-initial sets cap-X): classes, not an
   inline style, so the content security policy in _headers can forbid
   inline styles entirely. */
.cap-A { --cap: url(images/initials/A.png); }
.cap-B { --cap: url(images/initials/B.png); }
.cap-C { --cap: url(images/initials/C.png); }
.cap-D { --cap: url(images/initials/D.png); }
.cap-E { --cap: url(images/initials/E.png); }
.cap-F { --cap: url(images/initials/F.png); }
.cap-G { --cap: url(images/initials/G.png); }
.cap-H { --cap: url(images/initials/H.png); }
.cap-I { --cap: url(images/initials/I.png); }
.cap-J { --cap: url(images/initials/J.png); }
.cap-K { --cap: url(images/initials/K.png); }
.cap-L { --cap: url(images/initials/L.png); }
.cap-M { --cap: url(images/initials/M.png); }
.cap-N { --cap: url(images/initials/N.png); }
.cap-O { --cap: url(images/initials/O.png); }
.cap-P { --cap: url(images/initials/P.png); }
.cap-Q { --cap: url(images/initials/Q.png); }
.cap-R { --cap: url(images/initials/R.png); }
.cap-S { --cap: url(images/initials/S.png); }
.cap-T { --cap: url(images/initials/T.png); }
.cap-U { --cap: url(images/initials/U.png); }
.cap-V { --cap: url(images/initials/V.png); }
.cap-W { --cap: url(images/initials/W.png); }
.cap-X { --cap: url(images/initials/X.png); }
.cap-Y { --cap: url(images/initials/Y.png); }
.cap-Z { --cap: url(images/initials/Z.png); }

/* ---- component: hanging-quotes (defined beside its renderer: grep define-component) ---- */
/* The mark is pulled into the margin, so the first letter of the text lines
   up with the column's edge, as on a well-set page. Only where the line
   starts flush left (a quotation, or a paragraph that opens a section and so
   has no indent): inside an indent a hung mark would only shorten it. */
blockquote > .dquo:first-child,
:is(.section-head, .lede, .epigraph, .verse, blockquote, .ornament, .page-title,
    .entry-meta, figure, ul, pre) + p.body > .dquo:first-child { margin-left: -.42em; }
blockquote > .squo:first-child,
:is(.section-head, .lede, .epigraph, .verse, blockquote, .ornament, .page-title,
    .entry-meta, figure, ul, pre) + p.body > .squo:first-child { margin-left: -.26em; }

/* ---- component: cross-references (defined beside its renderer: grep define-component) ---- */
/* @xref: an ordinary link in running text. One that could not be resolved
   prints "??" and is flagged, as LaTeX does; checksite.py refuses to deploy
   a page that still has one. */
a.xref { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 2px; }
.xref-unresolved { color: var(--accent); font-weight: 700; outline: 1px dashed var(--accent); }

/* ---- component: figure-numbers (defined beside its renderer: grep define-component) ---- */
/* @fig's number, before the caption. */
.fig-num { font-variant: small-caps; letter-spacing: .06em; font-style: normal; color: var(--muted); }

/* ---- component: referrers (defined beside its renderer: grep define-component) ---- */
/* The other essays that link to this one, after the bibliography. */
.referrers {
  margin-top: 2.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.referrers h2 {
  font-variant: small-caps;
  letter-spacing: .13em;
  font-size: .85rem;
  font-weight: 400;
  color: var(--accent);
  margin: 0 0 .5rem;
}
.referrers ul { list-style: none; margin: 0; padding: 0; }
.referrers li { margin: .15rem 0; }

/* ---- component: site-index (defined beside its renderer: grep define-component) ---- */
/* The Index page (pollen.rkt, site-index). */
.site-index { margin-top: 1rem; }
.index-letter h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--accent);
  margin: 1.8rem 0 .5rem;
  border-bottom: 1px solid var(--rule);
}
.index-list { list-style: none; margin: 0; padding: 0; }
.index-entry { margin: .35rem 0; padding-left: 1.4rem; text-indent: -1.4rem; line-height: 1.45; text-align: left; hyphens: manual; }
.index-sub-entry { margin-top: .1rem; padding-left: 2.8rem; }
.index-key { font-weight: 700; }
.index-more {
  font-size: .8em;
  font-variant-numeric: oldstyle-nums;
  color: var(--accent);
  text-decoration: none;
}
.index-more:hover { text-decoration: underline; }
.index-empty { font-style: italic; color: var(--muted); }

/* ---- component: downloads (defined beside its renderer: grep define-component) ---- */
/* The e-book and PDF links in the essay's View menu. */
.controls-downloads { border-top: 1px solid var(--rule); margin-top: .35rem; padding-top: .45rem; display: flex; flex-direction: column; gap: .25rem; }
.controls-downloads a {
  font-size: .84rem;
  font-style: italic;
  color: var(--muted);
  text-decoration: none;
  padding: .1rem .7rem;
}
.controls-downloads a:hover { color: var(--accent); }
