.atlas-section {
  --atlas-paper: #f1ece3;
  --atlas-ink: #2a211e;
  --atlas-accent: #743f39;
  --atlas-rule: #bfb2a4;
  padding: clamp(4.5rem, 8.5vw, 9rem) clamp(1.25rem, 6vw, 7rem);
  color: var(--atlas-ink);
  background: var(--atlas-paper);
  font-family: 'DM Sans', sans-serif;
}
.atlas-wrap { max-width: 81rem; margin-inline: auto; }
.atlas-title {
  margin: 0 0 clamp(1.6rem, 3.4vw, 3.6rem);
  color: var(--atlas-ink);
  font: 400 clamp(3rem, 7vw, 7.1rem)/.98 Baskervville, Georgia, serif;
  letter-spacing: -.065em;
  text-wrap: balance;
}
.atlas-title em { color: var(--atlas-accent); font-weight: inherit; }
.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.25rem, 6.3vw, 7rem);
  align-items: start;
}
.atlas-figure { min-width: 0; margin: 0; }
.atlas-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.09;
  background: #8d614e;
  touch-action: pan-y pinch-zoom;
}
.atlas-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 46%;
  opacity: 0;
}
.atlas-image:first-child { opacity: 1; }
.atlas-image[data-atlas-frame='2'] { object-position: 50% 39%; }
.atlas-image[data-atlas-frame='3'] { object-position: 50% 43%; }
.atlas-image[data-atlas-frame='4'] { object-position: 50% 42%; }
.atlas-image[data-atlas-frame='5'] { object-position: 50% 38%; }
.atlas-layout:has(.atlas-choice[value='1']:checked) [data-atlas-frame='1'],
.atlas-layout:has(.atlas-choice[value='2']:checked) [data-atlas-frame='2'],
.atlas-layout:has(.atlas-choice[value='3']:checked) [data-atlas-frame='3'],
.atlas-layout:has(.atlas-choice[value='4']:checked) [data-atlas-frame='4'],
.atlas-layout:has(.atlas-choice[value='5']:checked) [data-atlas-frame='5'] { z-index: 2; opacity: 1; }
.atlas-layout:has(.atlas-choice[value='2']:checked) { --atlas-x: 70%; --atlas-y: 39%; }
.atlas-layout:has(.atlas-choice[value='3']:checked) { --atlas-x: 61%; --atlas-y: 52%; }
.atlas-layout:has(.atlas-choice[value='4']:checked) { --atlas-x: 64%; --atlas-y: 45%; }
.atlas-layout:has(.atlas-choice[value='5']:checked) { --atlas-x: 36%; --atlas-y: 34%; }
.atlas-stage [data-atlas-beneath] { z-index: 1; opacity: 1; }
.atlas-stage [data-atlas-shown] { opacity: 1; }
.atlas-reticle {
  position: absolute;
  z-index: 3;
  top: var(--atlas-y, 48%);
  left: var(--atlas-x, 45%);
  width: clamp(4.5rem, 10vw, 9rem);
  aspect-ratio: 1.38;
  transform: translate(-50%, -50%);
  color: rgba(255, 248, 232, .86);
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgb(47 24 15 / 35%));
}
.atlas-reticle i {
  position: absolute;
  width: 11%;
  height: 15%;
  border: 0 solid currentColor;
  box-sizing: border-box;
}
.atlas-reticle i:nth-child(1) { inset: 0 auto auto 0; border-width: 1px 0 0 1px; }
.atlas-reticle i:nth-child(2) { inset: 0 0 auto auto; border-width: 1px 1px 0 0; }
.atlas-reticle i:nth-child(3) { inset: auto 0 0 auto; border-width: 0 1px 1px 0; }
.atlas-reticle i:nth-child(4) { inset: auto auto 0 0; border-width: 0 0 1px 1px; }
.atlas-caption {
  margin: 0;
  padding-top: .8rem;
  color: #594b43;
  font: 500 .75rem/1.4 'DM Sans', sans-serif;
  letter-spacing: .02em;
}
.atlas-page { font-variant-numeric: tabular-nums; letter-spacing: .07em; margin-right: .9rem; }
.atlas-page i { font-style: normal; padding: 0 .12em; color: #7c6d62; }
.atlas-caption-item { display: none; }
.atlas-caption-item:first-child { display: inline; }
.atlas-layout:has(.atlas-choice:checked) .atlas-caption-item { display: none; }
.atlas-layout:has(.atlas-choice[value='1']:checked) [data-atlas-caption='1'],
.atlas-layout:has(.atlas-choice[value='2']:checked) [data-atlas-caption='2'],
.atlas-layout:has(.atlas-choice[value='3']:checked) [data-atlas-caption='3'],
.atlas-layout:has(.atlas-choice[value='4']:checked) [data-atlas-caption='4'],
.atlas-layout:has(.atlas-choice[value='5']:checked) [data-atlas-caption='5'] { display: inline; }
.atlas-list { min-inline-size: 0; margin: 0; padding: 0; border: 0; border-top: 1px solid var(--atlas-rule); }
.atlas-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.atlas-row { position: relative; border-bottom: 1px solid var(--atlas-rule); }
.atlas-label {
  display: grid;
  grid-template-columns: .4rem minmax(0, 1fr) 1.1rem;
  align-items: center;
  gap: clamp(.75rem, 1.35vw, 1.4rem);
  padding: clamp(1rem, 1.65vw, 1.65rem) .25rem;
  color: var(--atlas-ink);
  font: 400 clamp(1.55rem, 2.6vw, 2.75rem)/1.08 Baskervville, Georgia, serif;
  letter-spacing: -.047em;
  cursor: pointer;
}
.atlas-dot { width: .36rem; height: .36rem; background: currentColor; border-radius: 100%; opacity: 0; }
.atlas-choice:checked + .atlas-label { color: var(--atlas-accent); }
.atlas-choice:checked + .atlas-label .atlas-dot { opacity: 1; }
.atlas-choice:focus-visible + .atlas-label, .atlas-book:focus-visible { outline: 2px solid var(--atlas-accent); outline-offset: 3px; }
.atlas-glyph { position: relative; display: block; width: 1rem; height: 1rem; }
.atlas-glyph::before, .atlas-glyph::after {
  content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: currentColor;
}
.atlas-glyph::after { transform: rotate(90deg); }
.atlas-choice:checked + .atlas-label .atlas-glyph::after { opacity: 0; }
.atlas-description {
  display: none;
  padding: 0 clamp(.75rem, 3vw, 3rem) clamp(1.2rem, 2.3vw, 2rem) calc(.65rem + clamp(.75rem, 1.35vw, 1.4rem));
}
.atlas-choice:checked ~ .atlas-description { display: block; }
.atlas-description p {
  margin: -.2rem 0 .7rem;
  max-width: 46ch;
  color: #574b45;
  font: 400 clamp(.94rem, 1.1vw, 1.05rem)/1.55 'DM Sans', sans-serif;
  letter-spacing: 0;
}
.atlas-book {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 32px;
  color: var(--atlas-accent);
  font: 600 .83rem/1.2 'DM Sans', sans-serif;
  letter-spacing: .005em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
@media (hover: hover) {
  .atlas-label:hover, .atlas-book:hover { color: var(--atlas-accent); }
  .atlas-book:hover { text-decoration-thickness: 2px; }
}
@media (max-width: 740px) {
  .atlas-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .atlas-stage { aspect-ratio: 1.38; }
  .atlas-label { padding-block: 1.12rem; }
  .atlas-book { min-height: 40px; }
}
html[data-motion="on"] .atlas-glyph::after { transition: opacity .16s; }
html[data-motion="on"] .atlas-choice:checked ~ .atlas-description { animation: atlas-detail-in .36s ease-out; }
@keyframes atlas-detail-in { from { opacity: .65; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
