/* Final design: B, "Album" (cream paper, perforated stamps, mounted documents),
   with A's contents, a numbered list without pictures. */
:root {
  /* Light only: browsers that darken pages on their own leave this one alone. Without it,
     the white cross of the band, a background, was turned black in dark mode. */
  color-scheme: only light;
  --paper: #f4efe3;
  --page: #fbf8f0;
  --ink: #2b2620;
  --muted: #7a6f60;
  --red: #b3192b;
  --mount: #1f1d1a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper) repeating-linear-gradient(0deg, transparent 0 27px, rgba(120, 100, 70, .05) 27px 28px);
  font: 1.08rem/1.65 Baskerville, "Baskerville Old Face", Georgia, serif;
}
a { color: var(--red); }
.wrap { max-width: 56rem; margin: 0 auto; padding: 0 1rem; }

/* The red band stays at the top while the page scrolls. */
header.site { position: sticky; top: 0; z-index: 10; background: var(--red); color: #fff; box-shadow: 0 2px 8px rgba(80, 20, 20, .25); }
header.site .wrap { display: flex; align-items: center; gap: .6rem; padding-top: .8rem; padding-bottom: .8rem; }
header.site a { color: #fff; text-decoration: none; font-style: italic; }
.cross { width: 1rem; height: 1rem; flex: none; background:
  linear-gradient(currentColor, currentColor) center / 100% 34% no-repeat,
  linear-gradient(currentColor, currentColor) center / 34% 100% no-repeat; color: #fff; }

main.wrap { background: var(--page); margin: 2.5rem auto; padding: 2.5rem clamp(1rem, 5vw, 4rem) 3rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 12px 30px rgba(80, 60, 30, .12); border: 1px solid #e8e0cd; }

.hero { text-align: center; border-bottom: 2px double #d8cdb4; padding-bottom: 2rem; margin-bottom: 2.5rem; }
.hero .cross { color: var(--red); width: 2.4rem; height: 2.4rem; margin: 0 auto 1rem; display: block; }
.hero h1 { font-weight: normal; font-style: italic; font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15; text-wrap: balance; margin: 0 0 .4rem; }
.hero p { color: var(--muted); margin: 0; }

/* The contents: a numbered list, as in an album's table of contents. */
ol.chapters { list-style: none; padding: 0; margin: 0 auto; max-width: 38rem; counter-reset: ch; }
ol.chapters li { counter-increment: ch; }
ol.chapters a { display: grid; grid-template-columns: 3.5rem 1fr; padding: .55rem 0; color: var(--ink); text-decoration: none; }
ol.chapters a::before { content: counter(ch, upper-roman); color: var(--red); font-style: italic; }
ol.chapters a:hover .title { color: var(--red); }

/* Perforated edge: holes along the border, solid inside. */
.stamps img {
  background: #fff; padding: 9px;
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - 10px) calc(100% - 10px) no-repeat,
                radial-gradient(circle 3px, transparent 96%, #000) -5px -5px / 10px 10px round;
          mask: linear-gradient(#000 0 0) center / calc(100% - 10px) calc(100% - 10px) no-repeat,
                radial-gradient(circle 3px, transparent 96%, #000) -5px -5px / 10px 10px round;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25));
}

article .chapter-no { text-align: center; color: var(--red); letter-spacing: .15em; text-transform: uppercase; font-size: .85rem; margin: 0 auto; }
/* text-wrap: balance evens out the lines of a long title, so none ends with a lone word. */
article h1 { text-align: center; font-weight: normal; font-style: italic; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; text-wrap: balance; margin: .8rem 0 2rem; }
article p { max-width: 38rem; margin: 0 auto 1.4rem; text-align: justify; hyphens: auto; }

/* Documents mounted on the page, as in an exhibition frame. */
figure { margin: 2rem auto; text-align: center; }
figure img { max-width: 100%; height: auto; border: 6px solid #fff; outline: 1px solid var(--mount); box-shadow: 0 6px 14px rgba(0, 0, 0, .15); }
.stamps { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.75rem; margin: 2rem 0; }
.stamps img { max-width: 100%; height: auto; }

/* Three equal-sided columns keep "Sommaire" in the middle, even when a side is empty. */
nav.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; border-top: 2px double #d8cdb4; margin-top: 3rem; padding-top: 1.25rem; font-style: italic; }
nav.pager > :last-child { text-align: right; }
footer.site { color: var(--muted); text-align: center; font-size: .85rem; padding: 0 0 3rem; }

/* An explanation under a picture. */
.caption { text-align: center; color: var(--muted); font-style: italic; font-size: .95rem; margin-top: -.75rem; }
.legend { text-align: center; text-align-last: center; }
