/* Public reading: display face, reading face, and quiet marginal information. */
:root {
  --prose: var(--mono);
  --ink: #252720;
  --muted: #6b6c62;
  --line: #dcd8cd;
}

.site-header { max-width: 1160px; padding: 26px 40px; }
.site-header .back, .site-header .return { font-size: 12px; letter-spacing: .02em; }
.site-header .header-actions { display: flex; align-items: center; gap: 28px; }
.reading-languages { display: flex; align-items: center; gap: 12px; font: 11px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.reading-languages a { display: inline-flex; align-items: center; min-height: 44px; gap: 4px; }
.reading-languages > span { color: var(--line); }
.reading-languages .language-current { color: var(--ink); }
/* The collection is signed once, in the outer margin of the sheet. */
html:has(> body.notes-collection-page) { background: #eeece5; }
.notes-collection-page {
  --paper: #faf8f2;
  --ink: #282922;
  --muted: #5d5e53;
  --line: #d1cdbf;
  width: min(100%, 1440px);
  min-height: 65vh;
  margin: 0 auto 36px;
  padding: 0 clamp(22px, 5vw, 82px) clamp(54px, 8vw, 116px);
}
.notes-collection-page .site-header { margin: 0; padding: 18px 0 0; max-width: none; }
.notes-collection-page .header-actions { width: 100%; justify-content: space-between; gap: 16px; }
.notes-collection-page .reading-languages,
.notes-collection-page .back { font: 400 13px/1.4 var(--mono); letter-spacing: normal; color: var(--ink); }
.notes-collection-page .reading-languages > span { color: #928f80; }
.notes-collection-page .back { gap: .3em; }
.notes-index .collection-mast { padding: clamp(12px, 2vw, 35px) 0 19px; border-bottom: 1px solid var(--line); }
.notes-index .collection-mast h1 {
  margin: 0;
  font: 400 clamp(42px, 4.4vw, 60px)/1.03 var(--serif);
  letter-spacing: -.025em;
}
.notes-index .library {
  --side-margin: clamp(38px, 4vw, 62px);
  position: relative;
  max-width: none;
  margin: 0;
  padding: clamp(52px, 5.4vw, 86px) var(--side-margin) 14px;
}
.notes-index .collection-signature {
  position: absolute;
  right: 0;
  top: 32px;
  margin: 0;
  writing-mode: vertical-rl;
  font: 400 13px/1.4 var(--mono);
  letter-spacing: .09em;
  color: #4c4e43;
}
.notes-index .territories { font-size: 13px; justify-content: center; gap: 4px 24px; margin-bottom: 30px; }
.notes-index .library #available {
  --columns: 5;
  --column-gap: clamp(18px, 2vw, 32px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 52px var(--column-gap);
  border: 0;
}
.notes-index .note-card {
  flex: 0 0 calc((100% - (var(--columns) - 1) * var(--column-gap)) / var(--columns));
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 0;
}
/* Territory navigation keeps other cards in the DOM with the hidden attribute. */
.notes-index .note-card:nth-child(1 of :not([hidden])):nth-last-child(1 of :not([hidden])) {
  flex-basis: min(100%, 32rem);
  --card-title-size: clamp(23px, 2.25vw, 31px);
  --card-title-width: 30ch;
  --card-excerpt-width: 40ch;
}
.notes-index .note-card-link,
.notes-index .entry-content { display: flex; flex: 1; flex-direction: column; align-items: center; width: 100%; }
.notes-index .note-card-link { text-align: center; text-decoration: none; }
.notes-index .note-card-icon { flex: none; margin-bottom: 16px; color: #737566; line-height: 0; }
.notes-index .note-card-icon svg { display: block; width: 25px; height: 32px; }
.notes-index .note-card h2 {
  margin: 0;
  max-width: var(--card-title-width, 100%);
  font: 400 var(--card-title-size, clamp(19px, 1.65vw, 24px))/1.24 var(--serif);
  letter-spacing: -.012em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.notes-index .note-card .excerpt {
  margin: 14px 0 0;
  max-width: var(--card-excerpt-width, 34ch);
  font: 14px/1.65 var(--mono);
  color: var(--muted);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.notes-index .entry-meta {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 23px;
  color: var(--muted);
  font: 12px/1.45 var(--mono);
}
.notes-index .entry-meta .eyebrow { font-size: 11px; letter-spacing: .08em; }
.notes-index .entry-meta .availability { font: inherit; }
.notes-index .note-card-link:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.notes-index .note-card-link:hover .note-card-icon, .notes-index .note-card-link:focus-visible .note-card-icon { color: #30392a; }

@media (max-width: 1100px) {
  .notes-index .library #available { --columns: 3; }
}
@media (max-width: 760px) {
  .notes-index .library { --side-margin: 28px; }
  .notes-index .library #available { --columns: 2; }
}
@media (max-width: 560px) {
  .notes-collection-page { min-height: 75vh; margin-bottom: 0; }
  .notes-collection-page .site-header { padding-top: 8px; }
  .notes-index .collection-mast { padding: 15px 0 17px; }
  .notes-index .library { padding: 0 0 10px; }
  .notes-index .collection-signature {
    position: static;
    writing-mode: horizontal-tb;
    text-align: right;
    margin: 11px 0 32px;
  }
  .notes-index .library #available { --columns: 1; row-gap: 32px; }
  .notes-index .note-card { max-width: 340px; --card-title-size: 22px; }
  .notes-index .note-card:not([hidden]) ~ .note-card:not([hidden]) { padding-top: 26px; border-top: 1px solid var(--line); }
}
@media print {
  html:has(> body.notes-collection-page), .notes-collection-page { background: white; }
  .notes-collection-page { min-height: 0; margin: 0; padding: 0 25px; }
  .notes-index .library #available { --columns: 3; }
  .notes-index .collection-signature { color: black; }
  .notes-index .note-card { break-inside: avoid; }
}

.reading-note { max-width: 820px; padding: 54px 48px 100px; }
.reading-note .note-title { margin-bottom: 44px; }
.reading-note .note-title h1 {
  max-width: 18ch;
  margin: 26px 0 30px;
  font-size: clamp(48px, 6vw, 74px);
  line-height: 1.06;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.reading-note .eyebrow { font-size: 10px; letter-spacing: .14em; }
.reading-note .note-title:has(.note-publication-meta) { margin-bottom: 24px; }
.reading-note .note-publication-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 1.5em;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font: 12px/1.55 var(--mono);
  color: var(--muted);
}
.reading-note .note-publication-meta > p { margin: 0; font: inherit; }
.reading-note .note-publication-meta .byline { color: var(--ink); }
.reading-note .note-publication-meta .publication { display: flex; flex-wrap: wrap; gap: 2px 1.5em; }
.reading-note .note-body { font: 19px/1.9 var(--prose); color: #30332b; }
.reading-note .note-body p { margin-bottom: 1.45em; }
.reading-note .note-body h2 {
  font-size: clamp(31px, 3.5vw, 40px);
  line-height: 1.15;
  margin: 1.8em 0 .85em;
  letter-spacing: -.015em;
}
.reading-note .note-body a { text-decoration: underline; text-decoration-color: #b6b2a4; }
.reading-note .end-return { font-size: 12px; margin-top: 58px; }
.reading-note .sources { font-size: 12px; }

.photo-study { margin-block: 3rem; padding-block-start: 1.25rem; border-block-start: 1px solid var(--line); }
.photo-study h2 { margin: 0 0 1rem; font: 400 1.7rem/1.2 var(--serif); }
.study-frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; align-items: start; }
.study-frames[data-views="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.study-view { min-width: 0; margin: 0; }
.study-view img { display: block; width: 100%; height: auto; }
.study-view figcaption { margin-block-start: .5rem; font: .8125rem/1.4 var(--mono); }
.study-margin { grid-column: 1 / -1; order: 1; color: var(--manuscript-ink, #914d37); }
.study-margin p { margin: 0; border-inline-start: 2px solid currentColor; padding-inline-start: .65rem; font: 400 1.9rem/1.1 'Elion Hand', cursive; overflow-wrap: anywhere; white-space: pre-line; }
@media screen and (min-width: 1160px) {
  body:not(.reader-panel-open) .reading-note:has(.photo-study) { max-width: 1120px; padding-right: 260px; }
  body:not(.reader-panel-open) .study-frames { margin-inline-end: -216px; grid-template-columns: repeat(2, minmax(0, 1fr)) 180px; }
  body:not(.reader-panel-open) .study-frames[data-views="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)) 180px; }
  body:not(.reader-panel-open) .study-margin { grid-column: -2 / -1; }
}
@media (max-width: 640px) {
  .study-frames, .study-frames[data-views="3"] { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .study-margin { order: 0; margin-block-start: -.75rem; }
}

@media (max-width: 640px) {
  .site-header { padding: 16px 24px; }
  .site-header .header-actions { width: 100%; justify-content: space-between; gap: 16px; }
  .site-header.reading-header { flex-wrap: wrap; row-gap: 0; }
  .reading-note { padding: 40px 28px 72px; }
  .reading-note .note-title h1 { font-size: clamp(41px, 10.4vw, 56px); margin: 22px 0 25px; }
  .reading-note .note-title { margin-bottom: 34px; }
  .reading-note .note-title:has(.note-publication-meta) { margin-bottom: 20px; }
  .reading-note .note-title:has(.note-publication-meta) h1 { margin-bottom: 18px; }
  .reading-note .note-publication-meta { column-gap: 1em; }
  .reading-note .note-publication-meta .publication { flex-basis: 100%; column-gap: 1em; }
  .reading-note .note-body { font-size: 18px; line-height: 1.85; }
}
@media (max-width: 360px) {
  .reading-note { padding-inline: 24px; }
}
@media print {
  .reading-note { max-width: none; padding: 0; }
  .reading-note .note-body { font-size: 12pt; line-height: 1.6; }
  .reading-note .note-title h1 { font-size: 34pt; max-width: none; }
}

.title-word { display: inline-block; inline-size: max-content; max-inline-size: 100%; vertical-align: baseline; overflow-wrap: anywhere; }
