@font-face {
  font-family: Instrument;
  src: url("caratteri/InstrumentSerif-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: Instrument;
  src: url("caratteri/InstrumentSerif-Italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("caratteri/SourceSerif4.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("caratteri/SourceSerif4-Italic.ttf") format("truetype");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("caratteri/BarlowCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("caratteri/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #f7f2e6;
  --leaf: #fffaf0;
  --ink: #272920;
  --muted: #565649;
  --line: #c7bfab;
  --display: Instrument, "Iowan Old Style", Georgia, serif;
  --serif: "Source Serif", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; }
a { color: inherit; text-underline-offset: .18em; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #8d3c28; outline-offset: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.series-1 { --cover: #bfd3cc; --cover-ink: #1d4039; }
.series-2 { --cover: #ead09a; --cover-ink: #513525; }
.series-3 { --cover: #cbd0a7; --cover-ink: #353b22; }
.series-4 { --cover: #e4bcb0; --cover-ink: #5d3029; }
.series-5 { --cover: #c9c1d6; --cover-ink: #383149; }
.label {
  font: 650 .69rem/1.45 var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.shell { width: min(1130px, calc(100% - 2.5rem)); margin-inline: auto; }
.site-header {
  min-height: 4.3rem; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); gap: .8rem;
}
.wordmark { text-decoration: none; font: 500 1.05rem/1.1 var(--serif); }
.site-header nav { display: flex; gap: 1.2rem; align-items: center; font: 600 .78rem/1.3 var(--sans); }
.index-head h1 {
  font: 400 clamp(4.4rem, 10vw, 8.25rem)/.79 var(--display);
  letter-spacing: -.035em; margin: 0;
}
.cover {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fbf0da;
  background: #222321;
  background: color-mix(in srgb, #1f211f 86%, var(--figure-ink));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(.45rem, 2.0vmin, 1.15rem);
  padding: 6.7% 7.2% 5.1% 9.1%;
  box-shadow: inset 6px 0 14px #0005;
  container-type: inline-size;
  container-name: copertina;
}
.cover::before { content: ""; position: absolute; inset: 0 auto 0 0; width: .65%; background: var(--figure-accent); }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 4%; width: 1px; background: #fff1d315; pointer-events: none; }
.cover-top, .cover-foot { display: flex; align-items: baseline; justify-content: space-between; gap: .5em; }
.cover .label { font-size: clamp(.41rem, 2.55cqi, .77rem); letter-spacing: .125em; }
.cover-top { align-items: center; justify-content: flex-start; gap: .7em; }
.cartiglio {
  display: inline-flex; flex-shrink: 0; vertical-align: middle;
  padding: 2px; border: 1px solid #a97860; border-radius: 3px;
  background: #f5efe4;
}
.cartiglio img { display: block; width: var(--cg-mark, 1.7rem); max-width: none; height: auto; }
.cover-top .cartiglio {
  --cg-mark: clamp(1.16rem, 10cqw, 3.25rem);
  border-color: #d8a275;
  box-shadow: 0 0 0 2px #241b15, 0 0 0 3px #daa3798f;
}
.cover-identity { align-self: start; }
.cover-code { white-space: nowrap; }
.cover-title {
  font: 400 clamp(1.45rem, 17cqi, 7.1rem)/.86 var(--display);
  letter-spacing: -.027em; margin: .11em 0 .07em; overflow-wrap: anywhere;
}
.cover[data-length="long"] .cover-title { font-size: clamp(1.23rem, 13.2cqi, 5.7rem); }
.cover[data-length="extra"] .cover-title { font-size: clamp(1rem, 10.6cqi, 4.9rem); }
.cover-author { margin: .45em 0 .83em; font: 525 clamp(.59rem, 4.4cqi, 1.21rem)/1.22 var(--serif); color: #f1d8b8; }
.cover-art {
  display: grid;
  align-items: stretch;
  background: var(--figure-paper);
  margin-inline: -5% -9%;
  min-height: 0;
  position: relative;
  clip-path: polygon(0 2.25%, 100% 0, 100% 96.7%, 3% 100%);
}
.cover-art img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.cover-foot { border-top: 1px solid #faefd948; padding-top: .58em; }
.cover-series { max-width: 28ch; }
.site-footer { padding: 1.7rem 0 2.4rem; margin-top: 3.5rem; border-top: 1px solid var(--line); font: .77rem/1.4 var(--sans); color: var(--muted); }
.index-head { max-width: 760px; padding: 3.4rem 0 1.4rem; }
.index-head h1 { font-size: clamp(3.8rem, 8vw, 6.3rem); }
.index-head p { font-size: 1rem; line-height: 1.6; }
.index-path > h2 { font: 400 clamp(2.2rem, 5vw, 3.15rem)/1 var(--display); margin: 1.4em 0 .3em; }
.edition-list { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.index-edition { padding: .98rem 1.05rem; background: var(--leaf); border: 1px solid var(--line); border-left: 4px solid var(--cover-ink); }
.index-edition h3 { margin: .18rem 0 .3rem; font: 400 1.95rem/1.02 var(--display); }
.index-edition p, .index-edition li { font-size: .9rem; line-height: 1.45; }
.index-edition ul { margin: .5rem 0; padding-left: 1.2rem; }
.index-edition .source-note { font-size: .85rem; color: var(--muted); }
.design-sheet { max-width: 44rem; }
.design-sheet dl { margin: 0; }
.design-sheet dt { font-weight: 650; margin-top: 1rem; }
.design-sheet dd { line-height: 1.58; margin: .25em 0 0; }
.palette { display: flex; gap: .35rem; margin-top: 1.35rem; }
.swatch { background: var(--cover); display: block; width: 2.25rem; aspect-ratio: 1; border: 1px solid #34352938; }
.cover-gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .9rem; margin-block: 2.1rem 3rem; }
.cover-gallery .cover { aspect-ratio: 5/7; gap: .31rem; }

.reader-body { background: #e7e0d2; height: 100vh; height: 100dvh; }
.reader {
  height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  max-width: 980px; margin: auto;
}
.reader-top, .reader-bottom {
  gap: .5rem; padding: .35rem max(.65rem, 2.5vw);
  font: 600 .79rem/1.25 var(--sans);
}
.reader-top {
  min-height: 3.5rem; display: flex; align-items: center; justify-content: space-between;
}
.reader-top > a { text-decoration: none; }
.reader-home { display: inline-flex; align-items: center; gap: .34em; white-space: nowrap; }
.reader-home:hover .reader-home-label { text-decoration: underline; }
.reader-home .cartiglio { --cg-mark: 1.78rem; }
.reader-home-back { margin-inline-start: .14em; }
.reader-options { display: flex; align-items: center; gap: .47rem; }
.reader-options > a { padding: .48em; }
.reader-options [aria-current] { font-weight: 800; text-decoration: none; }
.control {
  background: transparent; border: 1px solid #8a827252; border-radius: 4px;
  color: var(--ink); padding: .48rem .71rem;
}
.control:enabled:hover { background: #ffffff67; }
.control:disabled { opacity: .38; cursor: default; }
.reader-bottom { display: grid; gap: .26rem; }
.reader-pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: .45rem; align-items: center; }
.reader-pagination .control { min-width: 6rem; white-space: nowrap; }
.reader-pagination #previous { justify-self: start; }
.reader-pagination #next { justify-self: end; }
.reader-pagination output { text-align: center; color: var(--muted); white-space: nowrap; }
.reader-zoom { display: flex; justify-content: center; align-items: center; gap: .28rem; }
.reader-zoom[hidden] { display: none; }
#zoom-label { margin-inline-end: .25rem; font-size: .85rem; }
.reader-zoom .control { min-width: 2.75rem; min-height: 2.25rem; padding: .15rem .38rem; }
.reader-zoom :is(#zoom-out, #zoom-in) { font-size: 1.25rem; line-height: 1; }
.reader-zoom #zoom-reset { min-width: 3.35rem; font-variant-numeric: tabular-nums; }
.reader-zoom #zoom-reset:disabled { opacity: 1; cursor: default; }
.reader-zoom-help { margin: 0; color: var(--muted); text-align: center; font-size: .72rem; font-weight: 450; }
.reader-stage {
  --inset: max(1.15rem, min(9.5vw, 5.05rem));
  --top-space: clamp(1.5rem, 5.6vh, 3rem);
  position: relative; overflow: hidden; margin: 0 auto; width: min(100% - 1.2rem, 760px);
  height: 100%; background: var(--leaf); box-shadow: 0 10px 38px #302b1f22;
  -webkit-touch-callout: none;
}
.leaf { position: absolute; inset: 0; visibility: hidden; }
.leaf[data-active="true"] { visibility: visible; }
.reader-stage > .cover { height: 100%; padding-top: min(5vh, 6%); padding-bottom: min(5vh, 6%); }
.reader-stage > .cover::before { inset: 3%; }
.reader-body .reader-stage > .cover {
  --reader-title-size: min(15cqi, 16vh);
  --reader-title-long: min(13cqi, 13vh);
  --reader-title-extra: min(11cqi, 10.4vh);
}
.reader-body .reader-stage > .cover .cover-title {
  font-family: var(--reader-title-family, var(--display));
  font-style: var(--reader-title-style, normal);
  font-weight: var(--reader-title-weight, 400);
  font-size: var(--reader-title-size);
  line-height: var(--reader-title-leading, .94);
  letter-spacing: var(--reader-title-spacing, -.022em);
  text-transform: var(--reader-title-case, none);
  overflow-wrap: normal;
  text-wrap: balance;
}
.reader-body .reader-stage > .cover[data-length="long"] .cover-title { font-size: var(--reader-title-long); }
.reader-body .reader-stage > .cover[data-length="extra"] .cover-title { font-size: var(--reader-title-extra); }
.reader-body .reader-stage > .cover .cover-author {
  font-family: var(--reader-author-family, var(--serif));
  font-weight: var(--reader-author-weight, 525);
  font-size: clamp(.72rem, 3.6cqi, 1.22rem);
  letter-spacing: var(--reader-author-spacing, .012em);
}
.reader-body .reader:is([data-shelf-code="CG-001"], [data-shelf-code="CG-002"], [data-shelf-code="CG-004"], [data-shelf-code="CG-012"]) .reader-stage > .cover {
  --reader-title-family: var(--serif);
  --reader-title-weight: 560;
  --reader-title-case: uppercase;
  --reader-title-spacing: .072em;
  --reader-title-size: min(12cqi, 13vh);
  --reader-title-long: min(10cqi, 10vh);
}
.reader-body .reader[data-shelf-code="CG-022"] .reader-stage > .cover {
  --reader-title-family: var(--serif);
  --reader-title-style: italic;
  --reader-title-weight: 470;
  --reader-title-spacing: -.047em;
  --reader-title-size: min(14cqi, 15vh);
}
.reader-body .reader[data-shelf-code="CG-007"] .reader-stage > .cover {
  --reader-title-family: var(--serif);
  --reader-title-weight: 450;
  --reader-title-spacing: -.031em;
  --reader-title-size: min(11.4cqi, 14vh);
  --reader-title-long: min(11.2cqi, 12vh);
}
.reader-body .reader:is([data-shelf-code="CG-014"], [data-shelf-code="CG-016"]) .reader-stage > .cover {
  --reader-title-family: "Barlow Condensed", "Arial Narrow", var(--sans);
  --reader-title-weight: 600;
  --reader-title-case: uppercase;
  --reader-title-spacing: .035em;
  --reader-title-size: min(16cqi, 17vh);
}
.reader-body .reader:is([data-shelf-code="CG-025"], [data-shelf-code="CG-035"], [data-shelf-code="CG-036"]) .reader-stage > .cover {
  --reader-title-style: italic;
  --reader-title-leading: .91;
  --reader-title-spacing: -.03em;
}
.reader-body .reader:is([data-shelf-code="CG-006"], [data-shelf-code="CG-039"]) .reader-stage > .cover {
  --reader-title-family: "IBM Plex Mono", "Courier New", monospace;
  --reader-title-weight: 500;
  --reader-title-size: min(11cqi, 12vh);
  --reader-title-long: min(9.5cqi, 10vh);
  --reader-title-extra: min(8.4cqi, 8.5vh);
  --reader-title-spacing: -.06em;
  --reader-title-leading: 1;
}
.reader-body .reader[data-shelf-code="CG-040"] .reader-stage > .cover {
  --reader-title-family: var(--serif);
  --reader-title-weight: 560;
  --reader-title-extra: min(10cqi, 10vh);
  --reader-title-spacing: -.045em;
  --reader-author-family: "Barlow Condensed", "Arial Narrow", var(--sans);
  --reader-author-weight: 600;
  --reader-author-spacing: .055em;
}
.reader-stage > .cover .cartiglio { --cg-mark: min(9cqw, 7.7vh, 3.25rem); }
.front-leaf { padding: var(--top-space) var(--inset); overflow: auto; }
.note-page { display: flex; flex-direction: column; justify-content: center; }
.note-page h1 { font: 400 clamp(2.8rem, 8vw, 4.75rem)/.96 var(--display); margin: .3em 0 .25em; }
.note-page p { max-width: 32ch; margin: .25em 0; font: 450 clamp(1.22rem, 3.5vw, 1.63rem)/1.55 var(--serif); }
.credits { font-size: clamp(.94rem, 2.6vw, 1.06rem); }
.credits h1 { font: 400 clamp(2.8rem, 7vw, 4rem)/.96 var(--display); margin: .15em 0 .5em; }
.credits dl { display: grid; grid-template-columns: minmax(6em, .35fr) 1fr; gap: .5em .75em; margin: 0; }
.credits dt { font-weight: 650; }
.credits dd { margin: 0; overflow-wrap: break-word; }
.credits p { line-height: 1.5; }
.credits .reuse { padding-top: .8rem; border-top: 1px solid var(--line); }
.credits .bio-link { color: var(--muted); font: .75rem/1.4 var(--sans); }
.credits .credit-address { font-style: normal; line-height: 1.43; }
.credits .courtesy { margin-top: .3em; font-style: italic; }
.credits h2 { font: 400 1.7rem/1.02 var(--display); margin: 1.1em 0 .2em; }
.credits .bio { margin: .25em 0 0; }
.reader-stage { user-select: none; -webkit-user-select: none; }
.reading-leaf {
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  overflow: hidden;
}
.reading-leaf[data-pan="true"] {
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  cursor: grab;
}
.reading-leaf[data-dragging="true"] { cursor: grabbing; }
.reading-leaf[data-pan="true"]:focus-visible { outline-offset: -4px; }
.flow {
  position: absolute; inset: var(--top-space) auto auto var(--inset);
  width: calc(100% - 2 * var(--inset)); height: calc(100% - 2 * var(--top-space));
  column-width: 100vw; column-gap: calc(2 * var(--inset)); column-fill: auto;
  font: 400 calc(clamp(1rem, 1.99vw, 1.195rem) * var(--text-zoom, 1))/1.58 var(--serif);
  overflow-wrap: anywhere;
  widows: 2; orphans: 2;
}
.flow .section-title { font: 400 1.95em/1.02 var(--display); margin: .75em 0 .38em; break-after: avoid; }
.flow .book-section:first-child .section-title { margin-top: .08em; }
.chapter-opening {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start;
  column-gap: .38em; padding-top: .34em; border-top: 1px solid #ad8069;
  break-inside: avoid;
}
.chapter-opening .cartiglio { --cg-mark: clamp(1.3rem, .74em, 2rem); }
.flow h1, .flow h2, .flow h3, .flow h4, .flow h5, .flow h6, .flow .speaker { break-after: avoid; }
.flow :is(h3, h4, h5, h6) { font-size: 1.02em; line-height: 1.2; margin: 1em 0 .5em; }
.flow p { margin: 0 0 .62em; }
.flow :is(.stanza, blockquote) { margin: .5em 0 .9em 1.13em; }
.flow :is(.poem, .verse, .stanza) { text-indent: 0; }
.flow pre { white-space: pre-wrap; font: inherit; margin: .5em 0; }
.flow ul, .flow ol { padding-left: 1.4rem; }
.flow img { max-inline-size: 100%; max-block-size: 45vh; }
.flow hr { width: 24%; margin: 1em auto; border: 0; border-top: 1px solid var(--line); }
.scan-image { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.reading-leaf[data-pan="true"] .scan-image { max-width: none; margin-inline: auto; }
.reader-index { width: min(32rem, calc(100% - 2rem)); max-height: 75vh; background: var(--leaf); color: var(--ink); border: 1px solid var(--line); padding: 1.25rem; }
.reader-index::backdrop { background: #24231977; }
.reader-index header { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.reader-index h2 { margin: 0; font: 400 2rem/.95 var(--display); }
.reader-index ol { padding: 0; list-style: none; }
.reader-index li button { width: 100%; text-align: left; padding: .43em .2em; background: none; border: 0; border-bottom: 1px solid var(--line); }
.reader-index li button:hover { background: #e6ddce; }

@media (max-width: 650px) {
  .cover-top, .cover-foot { gap: .13em; }
  .edition-list { grid-template-columns: 1fr; }
  .cover-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
}
@media (max-width: 390px) {
  .shell { width: calc(100% - 1.4rem); }
  .site-header nav { gap: .65rem; }
  .reader-pagination .control { min-width: unset; }
  .reader-top .reader-options { gap: .18rem; }
  .reader-top .control { padding-inline: .42rem; }
  .reader-home .cartiglio { --cg-mark: 1.46rem; }
}
@media (max-width: 355px) {
  .reader-home-label { position: absolute; clip-path: inset(50%); }
}
@media (max-height: 490px) {
  .reader-top { min-height: 2.6rem; }
  .reader-stage { --top-space: 1.15rem; }
  .note-page { justify-content: flex-start; }
}
@media print {
  .reader-body { height: auto; background: white; }
  .reader { display: block; }
  .reader-top, .reader-bottom, .reader-index { display: none; }
  .reader-stage { height: 235mm; width: 100%; margin: 0; box-shadow: none; }
  .reader-stage > .cover { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
