/* Essay page. Reading first: one 35em column of Lora; contents on the left and notes on the right
   only where the screen has room for them, otherwise they fold back into the column. */

/* ---------- Head ---------- */
.essay-head { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.2rem 0; text-align: center; }
.essay-head__crumb { margin: 0 0 1.4rem; font-size: var(--s-1); }
.essay-head__crumb a { color: var(--gilt); font-style: italic; text-decoration: none; }
.essay-head__crumb a:hover { text-decoration: underline; text-underline-offset: .2em; }
.essay-head h1 { margin: 0; font-size: clamp(1.6rem, 4.6vw, 2.75rem); font-weight: 500; line-height: 1.15; color: var(--vellum); text-wrap: balance; }
.by { margin: 1.8rem 0 0; display: grid; justify-items: center; gap: .1rem; }
.by__portrait { width: 84px; margin-bottom: .6rem; }
.by__portrait .portrait__painting { object-position: center 20%; }
.by__name { margin: 0; font-size: var(--s1); }
.by__name a { color: var(--gilt-hi); text-decoration-color: rgba(201,162,76,.45); text-underline-offset: .2em; }
.by__when { margin: 0; font-style: italic; color: var(--text-soft); }
.essay-head .orn--rule { color: var(--gilt-lo); margin-top: 2.2rem; }

/* ---------- Grid ---------- */
.essay-grid { display: grid; grid-template-columns: minmax(0, 35rem); justify-content: center; padding: 2.6rem 1.2rem 1rem; }
.essay-left, .essay-side { min-width: 0; }
@media (min-width: 1180px) {
  .essay-grid { grid-template-columns: minmax(9rem, 13rem) minmax(0, 35rem) minmax(11rem, 15rem); column-gap: clamp(2rem, 3.5vw, 3.5rem); }
  .essay-left { grid-column: 1; grid-row: 1; }
  .essay-body { grid-column: 2; grid-row: 1; }
  .essay-side { grid-column: 3; grid-row: 1; position: relative; }
}

/* ---------- The text ---------- */
.essay-body { font-size: 1.05rem; line-height: 1.7; color: var(--text); hyphens: auto; -webkit-hyphens: auto; font-variant-numeric: oldstyle-nums; }

.essay-body p { margin: 0 0 1.05em; }
.essay-body { overflow-wrap: break-word; }   /* long URLs */
.essay-body > p.opening::first-letter {
  float: left; font-size: 3.6em; line-height: .82; font-weight: 500; color: var(--gilt); padding: .06em .08em 0 0;
}
.essay-body a { color: var(--gilt-hi); text-decoration-color: rgba(201,162,76,.45); text-underline-offset: .18em; }
.essay-body h2, .essay-body h3 { font-weight: 600; color: var(--vellum); line-height: 1.3; margin: 2.4em 0 .8em; scroll-margin-top: 1.5rem; text-wrap: balance; }
.essay-body h2 { font-size: 1.25rem; }
.essay-body h3 { font-size: 1.08rem; font-style: italic; font-weight: 500; }
.essay-body h2.caps, .essay-body h3.caps { font-size: .82rem; font-weight: 600; letter-spacing: .12em; color: var(--gilt-hi); }
.essay-body blockquote { margin: 1.4em 0; padding: 0 0 0 1.3em; border-left: 1px solid rgba(201,162,76,.45); color: var(--text-soft); font-size: .95em; }
.essay-body blockquote p:last-child { margin-bottom: 0; }
.essay-body ul, .essay-body ol { padding-left: 1.4em; margin: 0 0 1.05em; }
.essay-body li { margin-bottom: .3em; }
/* Section breaks as printed: a centred "* * *" */
.essay-body hr { border: 0; text-align: center; margin: 1.75em 0; height: auto; overflow: visible; }
.essay-body hr::before { content: "*\2003*\2003*"; color: var(--gilt); }
.essay-body sup { line-height: 0; }
.essay-note { font-style: italic; color: var(--text-soft); border-top: 1px solid rgba(201,162,76,.25); border-bottom: 1px solid rgba(201,162,76,.25); padding: .8em 0; margin: 0 0 2em; font-size: .95em; }

/* Editorial brackets from the transcripts */
.ed { color: #a8987c; font-style: italic; cursor: help; }

/* Figures: allowed slightly wider than the text */
.essay-body figure { margin: 2em -2rem; text-align: center; }
.essay-body figure img { margin: 0 auto; height: auto; background: #f3ead5; }
.essay-body figcaption { margin-top: .6em; padding: 0 2rem; font-size: var(--s-1); font-style: italic; color: var(--text-soft); line-height: 1.45; }
.essay-body .figure-enlarge { display: block; cursor: zoom-in; }
@media (max-width: 700px) { .essay-body figure { margin-inline: 0; } }

/* Tables */
.table-scroll { overflow-x: auto; margin: 1.6em 0; border: 1px solid rgba(201,162,76,.25); border-radius: 3px; }
.table-scroll:focus-visible { outline: 2px solid var(--gilt-hi); }
.essay-body table { border-collapse: collapse; width: 100%; font-size: .85rem; line-height: 1.4; font-variant-numeric: lining-nums tabular-nums; }
.essay-body th, .essay-body td { padding: .5em .8em; border-bottom: 1px solid rgba(201,162,76,.15); vertical-align: top; }
.essay-body th { font-weight: 600; color: var(--gilt-hi); text-align: left; border-bottom-color: rgba(201,162,76,.4); }
.essay-body tbody tr:last-child td { border-bottom: 0; }

/* ---------- Notes ---------- */
sup.fn a { font-size: .72em; font-weight: 600; color: var(--gilt); text-decoration: none; padding: 0 .12em; font-variant-numeric: lining-nums; }
sup.fn a:hover, sup.fn a.is-hot { color: var(--ground); background: var(--gilt); border-radius: 2px; }
.notes, .endmatter { margin-top: 3.2em; padding-top: 1.6em; border-top: 1px solid rgba(201,162,76,.25); font-size: .88rem; line-height: 1.6; color: var(--text-soft); }
.notes h2, .endmatter h2, .endmatter h3 { margin-top: 0; }
.notes ol { padding-left: 1.6em; }
.notes li { margin-bottom: .6em; }
.notes li::marker { color: var(--gilt); font-variant-numeric: lining-nums; }
.notes li p { margin: 0 0 .5em; display: inline; }
.notes li p + p { display: block; margin-top: .5em; }
.fn-back { text-decoration: none; margin-left: .3em; }
.notes li:target { background: rgba(201,162,76,.12); outline: 4px solid rgba(201,162,76,.12); }
.endmatter--refs > p { padding-left: 1.6em; text-indent: -1.6em; margin-bottom: .5em; }   /* hanging indent for references */
.endmatter h2 ~ h2, .endmatter h3 { margin-top: 2em; }

/* Side notes: built by essay.js on wide screens, positioned beside their reference */
.sidenote { position: absolute; left: 0; right: 0; font-size: .78rem; line-height: 1.5; color: var(--text-soft); transition: color .15s; }
.sidenote p { margin: 0 0 .4em; }
.sidenote p:first-of-type { display: inline; }
.sidenote p:first-of-type + p { margin-top: .4em; }
.sidenote__n { font-weight: 600; color: var(--gilt); margin-right: .35em; font-variant-numeric: lining-nums; }
.sidenote.is-hot { color: var(--text); }
.has-sidenotes .notes, .has-sidenotes .toc a[href="#notes-h"] { display: none; }
.inline-note { position: relative; margin: -.3em 0 1.2em; padding: .8em 2.4em .8em 1em; font-size: .85rem; line-height: 1.55; color: var(--text-soft);
  background: var(--ground-2); border-left: 2px solid var(--gilt); border-radius: 0 3px 3px 0; }
.inline-note p { margin: 0 0 .4em; display: inline; }
.inline-note p + p { display: block; margin-top: .4em; }
.inline-note__close { position: absolute; top: .3em; right: .4em; font: inherit; font-size: 1.2rem; line-height: 1; color: var(--gilt); background: none; border: 0; cursor: pointer; padding: .2em .4em; }

/* ---------- Contents ---------- */
.toc details { font-size: .8rem; line-height: 1.4; }
.toc summary { cursor: pointer; font-style: italic; color: var(--gilt); list-style: none; margin-bottom: .6rem; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: .3rem 0 .3rem .8rem; border-left: 1px solid rgba(201,162,76,.2); color: var(--text-soft); text-decoration: none; }
.toc .toc--h3 a { padding-left: 1.6rem; font-size: .95em; }
.toc .caps a { font-size: .68rem; letter-spacing: .08em; }
.toc a:hover { color: var(--text); }
.toc a[aria-current] { color: var(--gilt-hi); border-left: 2px solid var(--gilt); padding-left: calc(.8rem - 1px); }
@media (min-width: 1180px) {
  .toc { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; scrollbar-width: thin; }
  .toc summary { pointer-events: none; }
}
@media (max-width: 1179px) {
  .essay-left .toc { margin: 0 0 2.2rem; padding: .8rem 1rem; border: 1px solid rgba(201,162,76,.25); border-radius: 3px; }
  .toc summary { margin: 0; }
  .toc details[open] summary { margin-bottom: .6rem; }
}

/* ---------- The original ---------- */
.original { display: flex; gap: .9rem; align-items: center; text-decoration: none; color: var(--text); }
.original img { width: 64px; height: auto; box-shadow: 0 4px 12px rgba(0,0,0,.5); background: #f3ead5; }
.original b { display: block; font-weight: 500; font-size: .9rem; color: var(--gilt-hi); }
.original i { display: block; font-size: .75rem; color: var(--text-soft); }
.original:hover b { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 1179px) { .essay-side { order: -1; display: flex; justify-content: center; margin-bottom: 2rem; } }

.originals { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; justify-content: center; }
@media (min-width: 1180px) { .originals { justify-content: flex-start; } }
/* PDF-only essays: the original is the page */
.essay-no-text { text-align: center; font-style: italic; }
.essay--pdf .essay-grid { grid-template-columns: minmax(0, 35rem); }
.essay--pdf :is(.essay-left, .essay-body, .essay-side) { grid-column: 1; grid-row: auto; }
.essay--pdf .essay-side { order: 1; }
.essay--pdf .originals { justify-content: center; }
.essay--pdf .original img { width: 180px; }

/* ---------- End ---------- */
.essay-end { max-width: 35rem; margin: 0 auto; padding: 2rem 1.2rem 4.5rem; text-align: center; }
.essay-end .orn--fleuron { color: var(--gilt-lo); }
.copyright { margin: 1rem 0 3rem; font-size: var(--s-1); color: var(--text-soft); }
.more { text-align: left; }
.more h2 { font-size: var(--s0); font-weight: 500; font-style: italic; color: var(--gilt); text-align: center; margin: 0 0 1rem; }
.more ol { list-style: none; margin: 0; padding: 0; }
.more li { display: flex; gap: .5rem; align-items: baseline; padding: .2rem 0; }
.more a { color: var(--text); text-decoration-color: rgba(201,162,76,.4); text-underline-offset: .18em; }
.more .lead { flex: 1; border-bottom: 1px dotted rgba(201,162,76,.3); transform: translateY(-.3em); min-width: 1rem; }
.more .when { color: var(--text-soft); font-size: var(--s-1); }
.back { margin-top: 2.5rem; }

@media print {
  .skip-link, .rail, .foot, .essay-left, .essay-side, .essay-head__crumb, .essay-end .more, .essay-end .back, .inline-note, .fn-back, .orn, .by__portrait { display: none !important; }
  body { background: #fff; }
  .essay, .essay * { color: #000 !important; }
  .essay-grid { display: block; padding: 0; }
  .essay-head { padding-top: 0; }
  .essay-body figure, .table-scroll { break-inside: avoid; margin-inline: 0; }
  .essay-body h2, .essay-body h3 { break-after: avoid; }
  .has-sidenotes .notes { display: block; }
}

/* Phones: note numbers are small, so give each a finger-sized tap area without moving the text. */
@media (max-width: 1179px) {
  sup.fn a { position: relative; }
  sup.fn a::after { content: ''; position: absolute; inset: -.7em -.55em; }
  sup.fn a[aria-expanded=true] { color: var(--ground); background: var(--gilt); border-radius: 2px; }
}

.essay-body > :is(h2, h3, figure, blockquote):first-child { margin-top: 0; }
.sidenote, .inline-note, .notes, .endmatter { overflow-wrap: anywhere; }   /* long URLs */
@media print { .essay-body > p.opening::first-letter { color: #000; } .essay-head { padding-bottom: 1.5rem; } }
