:root {
  --page: #f4ecdd;
  --paper: #fffaf0;
  --ink: #2c2219;
  --soft: #7b6a56;
  --line: #e2d4bb;
  --accent: #a43c2b;
  --shade: rgba(60, 40, 20, .12);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #16120e;
    --paper: #201a14;
    --ink: #eadfce;
    --soft: #a59681;
    --line: #3a3026;
    --accent: #e39070;
    --shade: rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 1.125rem/1.6 Georgia, "PT Serif", "Noto Serif", "Times New Roman", serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.top, main, .bottom { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-size: 1.35rem; font-weight: bold; letter-spacing: .01em; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: 1rem; }
.top nav a { color: var(--soft); text-decoration: none; }
.top nav a:hover { color: var(--accent); }
.bottom { margin-top: 3rem; padding-top: 1.25rem; padding-bottom: 2.5rem; border-top: 1px solid var(--line); color: var(--soft); font-size: .95rem; }

.hero { padding: 2.5rem 0 .5rem; max-width: 44rem; }
.hero h1 { margin: 0 0 .5rem; font-size: 2.4rem; line-height: 1.15; }
.hero p { margin: 0; color: var(--soft); font-size: 1.2rem; }

.shelf { margin-top: 2.5rem; }
.shelf h2 { margin: 0; font-size: 1.6rem; }
.shelf-note { margin: .15rem 0 1.1rem; color: var(--soft); font-size: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.1rem; }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: .9rem; padding: .9rem .9rem 1rem; color: var(--ink); text-decoration: none; box-shadow: 0 1px 0 var(--shade); transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px var(--shade); }
.card-picture { display: flex; align-items: center; justify-content: center; height: 11.5rem; margin-bottom: .7rem; }
.thumb { max-height: 100%; width: auto; object-fit: contain; border-radius: .35rem; }
.card-title { font-size: 1.3rem; font-weight: bold; line-height: 1.25; }
.card-note { margin-top: .25rem; color: var(--soft); font-size: .98rem; line-height: 1.4; flex: 1; }
.card-time { margin-top: .6rem; color: var(--accent); font-size: .9rem; }

.tale, .plain { max-width: 42rem; margin: 0 auto; padding-top: 1.5rem; }
.crumb { margin: 0 0 .5rem; font-size: .95rem; }
.crumb a { text-decoration: none; }
.tale h1, .plain h1 { margin: 0 0 .35rem; font-size: 2.5rem; line-height: 1.15; }
.byline { margin: 0 0 1.5rem; color: var(--soft); font-size: 1rem; }
.tale p { margin: 0 0 .9rem; font-size: 1.3rem; line-height: 1.65; }
.tale p.byline, .tale p.crumb, .tale p.from { font-size: 1rem; }
.tale p.first::first-letter { float: left; margin: .32rem .5rem 0 0; color: var(--accent); font-size: 3.6rem; line-height: .82; font-weight: bold; }
.tale p.verse { margin-left: 1.6rem; font-style: italic; }
figure { margin: 1.6rem 0; text-align: center; }
.plate { border-radius: .4rem; max-height: 34rem; width: auto; }
/* Ink drawings: the white of the scan takes the colour of the page, and in the dark the lines turn light. */
.line { mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) {
  .line { filter: invert(1); mix-blend-mode: screen; }
  .colour { filter: brightness(.88); }
}
.words { margin: 2rem 0 0; padding: 1rem 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: .8rem; }
.words h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.words dl { margin: 0; font-size: 1rem; line-height: 1.5; }
.words dt { float: left; clear: left; margin-right: .4rem; font-weight: bold; }
.words dt::after { content: " —"; font-weight: normal; }
.words dd { margin: 0 0 .3rem; }
.from { margin-top: 1.75rem; color: var(--soft); }
.turn { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1.05rem; }
.turn a { text-decoration: none; }
.turn a:last-child { text-align: right; }

.plain h2 { margin: 1.75rem 0 .3rem; font-size: 1.3rem; }
.plain h2 a { color: var(--ink); text-decoration: none; }
.plain p { margin: 0 0 .7rem; }
.plain section p { font-size: 1rem; color: var(--soft); overflow-wrap: anywhere; }
.lost { text-align: center; padding-top: 4rem; }
.button { display: inline-block; padding: .55rem 1.2rem; border: 1px solid var(--accent); border-radius: 2rem; text-decoration: none; }

@media (max-width: 40rem) {
  .hero h1, .tale h1, .plain h1 { font-size: 2rem; }
  .tale p { font-size: 1.2rem; }
  .card-picture { height: 9.5rem; }
}
@media print {
  .top nav, .turn, .bottom { display: none; }
  body { background: #fff; color: #000; }
}
