:root {
  color-scheme: light;
  --text: #24211d;
  --muted: #665f56;
  --border: #ded8cf;
  --background: #fbfaf8;
  --panel: #ffffff;
}

body {
  margin: 0;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
}

main {
  max-width: 840px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.site-nav {
  border-bottom: 1px solid var(--border);
  background: #e8e5de;
}

.site-nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 840px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.site-nav-title {
  font-weight: 600;
  text-decoration: none;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

h1 {
  margin-top: 1rem;
  font-family: "Aboreto", Georgia, serif;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  font-weight: 400;
}

.verona-title {
  font-size: clamp(2.55rem, 7.5vw, 3.525rem);
}

h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.35rem;
  font-family: "Aboreto", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
}

.section-title-large {
  font-size: 1.875rem;
}

h3 {
  margin-top: 1.5rem;
  font-family: "Arapey", Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
}

p {
  margin: 1rem 0 0;
}

ul {
  padding-left: 1.4rem;
}

ol {
  padding-left: 1.6rem;
}

li + li {
  margin-top: 0.75rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.intro,
.notice {
  color: var(--muted);
}

.notice {
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--border);
  background: var(--panel);
}

.text-block {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--panel);
  white-space: normal;
}

.verse {
  margin: 1.1rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.verse p {
  margin-top: 0;
}

.italian-original {
  margin-top: 3rem;
}

.italian-original summary {
  margin: 0 0 1rem;
  color: #d66a1f;
  cursor: pointer;
  font-family: "Arapey", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.italian-original summary:hover,
.italian-original summary:focus-visible {
  color: #b84f12;
}

.italian-original h2 {
  margin-top: 1rem;
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

.book-cover {
  margin: 2.5rem auto 0;
  text-align: center;
}

.book-cover img {
  display: block;
  max-width: min(100%, 320px);
  height: auto;
  margin: 0 auto;
}

.book-cover figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.map-figure {
  margin: 2rem 0 0;
}

.map-expand-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.map-expand-button img {
  display: block;
  width: 100%;
  height: auto;
}

.map-expand-button:focus-visible {
  border-radius: 2px;
  outline: 3px solid #d66a1f;
  outline-offset: 4px;
}

.map-dialog {
  width: min(96vw, 1400px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
}

.map-dialog::backdrop {
  background: rgb(0 0 0 / 0.72);
}

.map-dialog img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  margin: 0 auto;
}

.map-dialog-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: var(--text);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.footnote-ref {
  position: relative;
  font-size: 0.72em;
  line-height: 0;
  vertical-align: baseline;
  top: -0.45em;
  margin-left: 0.05em;
}

.footnote-ref > a {
  color: #d66a1f;
  font-weight: 600;
  text-decoration: none;
}

.footnote-ref > a:hover,
.footnote-ref > a:focus-visible {
  color: #b84f12;
  border-radius: 2px;
  outline: 2px solid currentColor;
  outline-offset: 2px;
  text-decoration: none;
}

.footnote-popover {
  position: absolute;
  left: 50%;
  bottom: 1.35em;
  z-index: 20;
  width: max-content;
  max-width: 18rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #e6b48c;
  border-radius: 0.35rem;
  background: #fff8f0;
  color: #222;
  font-size: 0.88rem;
  font-weight: normal;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity 120ms ease-in-out;
  pointer-events: none;
}

.footnote-ref:hover .footnote-popover,
.footnote-ref:focus-within .footnote-popover {
  opacity: 1;
  visibility: visible;
}

.footnotes {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid #ddd;
  font-size: 0.95rem;
  line-height: 1.55;
}

.annotations.footnotes {
  padding-top: 0;
  border-top: 0;
}

.footnotes h2 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.footnotes li {
  margin-bottom: 0.6rem;
}

.footnote-backlink {
  margin-left: 0.35rem;
  color: #d66a1f;
  text-decoration: none;
}

.footnote-backlink:hover,
.footnote-backlink:focus-visible {
  text-decoration: underline;
}

@media (min-width: 1024px) {
  section.annotations.footnotes {
    display: none;
  }
}

@media (max-width: 1023px) {
  section.annotations.footnotes {
    display: block;
  }
}

@media (max-width: 700px) {
  .footnote-popover {
    display: none;
  }
}
