/* Pagewyn bindery sheet: paper, blush, petal, rose and one deep rose ink */
:root {
  --paper: #F9F5F6;
  --blush: #F8E8EE;
  --petal: #FDCEDF;
  --rose: #F2BED1;
  --ink: #5A1E33;
  --ink-soft: #7A3D52;
  --hair: 1px solid rgba(90, 30, 51, 0.55);
  --faint: 1px solid rgba(90, 30, 51, 0.18);
  --display: Didot, "Bodoni 72", "Bodoni MT", "Times New Roman", serif;
  --body: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
  background: var(--paper);
}

a { color: var(--ink); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .4rem .7rem; border: var(--hair); }

/* Masthead: the shelf */
.shelf-head {
  padding: 2rem 1.25rem 0;
  max-width: 46rem;
  margin: 0 auto;
}
.overline {
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.shelf-head h1, .leaf h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  line-height: 1.05;
  margin: .2rem 0 .4rem;
}
.lede { font-style: italic; color: var(--ink-soft); margin: 0 0 1.5rem; }

.spines {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 190px;
  margin: 0;
  padding: 0 .5rem;
  list-style: none;
}
.spines li { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.spines a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: .5rem 0;
  border: var(--hair);
  border-radius: 2px;
  text-decoration: none;
  font-size: .7rem;
  letter-spacing: .08em;
  transition: transform .2s ease;
}
.spines a:hover, .spines a:focus-visible { transform: translateY(-10px); }
.spines .roman { font-family: var(--display); font-weight: 700; font-size: .9rem; }
.spines .label { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.s1 a { height: 97%; background: var(--rose); }
.s2 a { height: 88%; background: var(--petal); }
.s3 a { height: 93%; background: var(--blush); }
.s4 a { height: 84%; background: var(--rose); }
.s5 a { height: 100%; background: var(--ink); color: var(--paper); }
.s6 a { height: 80%; background: var(--petal); }

.plank { margin: 0 0 2rem; }
.plank span { display: block; }
.plank .edge { height: 1px; background: var(--ink); }
.plank .board { height: 9px; background: var(--rose); }
.plank .lip { height: 5px; background: var(--blush); border-top: var(--faint); }

/* Opened volumes */
main { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem 3rem; }

.volume {
  display: grid;
  grid-template-columns: 12px 1fr;
  background: var(--paper);
  border: var(--hair);
  border-radius: 2px;
  margin: 0 0 1.6rem;
}
.volume::before { content: ""; background: var(--rose); border-right: var(--hair); }
.volume.inked::before { background: var(--ink); }
.volume > div { padding: 1rem 1.1rem 1.2rem; }
.volume h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  margin: .1rem 0 .5rem;
  line-height: 1.2;
}
.volume h3 { font-size: 1rem; margin: 1rem 0 .2rem; }
.volume p { margin: .4rem 0; }
.folio { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }

.steps { margin: .4rem 0 0; padding-left: 1.3rem; }
.steps li { margin: .25rem 0; }

.fleuron { text-align: center; color: var(--ink-soft); margin: 2rem 0; letter-spacing: .6em; }

details {
  border-top: var(--faint);
  padding: .6rem 0;
}
details:last-of-type { border-bottom: var(--faint); }
summary { cursor: pointer; font-weight: 700; }

.letter {
  background: var(--blush);
  border: var(--hair);
  border-radius: 2px;
  padding: 1.1rem;
}
.letter .address {
  display: inline-block;
  margin-top: .4rem;
  padding: .55rem .9rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  text-decoration: none;
  word-break: break-all;
}

/* Privacy leaf */
.leaf {
  max-width: 40rem;
  margin: 1.5rem auto 3rem;
  padding: 2rem 1.25rem;
  background: var(--paper);
  border: var(--hair);
  border-radius: 2px;
  box-shadow: 6px 6px 0 var(--petal), 12px 12px 0 var(--rose);
}
.leaf .running-head {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: var(--hair);
  padding-bottom: .4rem;
  margin-bottom: 1.2rem;
}
.leaf h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  margin: 1.8rem 0 .3rem;
}
.leaf h2 .num { font-family: var(--body); font-style: italic; font-weight: 400; color: var(--ink-soft); margin-right: .4rem; }
.ledger { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .95rem; }
.ledger th, .ledger td { text-align: left; padding: .45rem .4rem; border-bottom: var(--faint); vertical-align: top; }
.ledger th { font-weight: 700; }
.leaf .colophon { text-align: center; font-style: italic; color: var(--ink-soft); margin-top: 2rem; }

footer {
  text-align: center;
  font-size: .85rem;
  color: var(--ink-soft);
  padding: 1.5rem 1rem 2.5rem;
  border-top: var(--faint);
}

@media (min-width: 720px) {
  .spines { height: 240px; gap: 10px; }
  .spines a { font-size: .8rem; }
  .leaf { padding: 2.6rem 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .spines a { transition: none; }
}
