/* Nate and Tim's reading list — three shelves stacked inside the tool column:
   Convergent (on both lists), Nate, Tim. Golden Hour: honey is structural
   (never text), clay is the text-safe accent, amber is not used here. Scoped
   to .rl* */

.res-wrap:has(.rl-lane) .res-title { text-wrap: balance; }

/* ---------- shelves ---------- */
.rl-lane { margin-top: var(--space-block); }
.rl-lane-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-section);
  letter-spacing: var(--fs-section-ls);
  line-height: var(--fs-section-lh);
  color: var(--ink);
  margin-bottom: 16px;
}
.rl-lane-head span {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  letter-spacing: var(--fs-meta-ls);
  color: var(--muted);
  margin-left: 8px;
}
.rl-lane-note {
  margin: var(--space-12) 0 var(--space-16);
  font-family: var(--font-serif);
  font-size: var(--fs-prose);
  line-height: var(--fs-prose-lh);
  color: var(--muted);
}

/* The shared shelf is the strongest recommendation on the page, so it sits
   first, in a recessed field (SYSTEM.md --paper-2), with the largest books. */
.rl-lane--combo {
  padding: clamp(18px, 3vw, 32px);
  background: var(--paper-2);
  border-radius: var(--r-xl);
}

.rl-shelf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 8px;
  width: 100%;
}
/* Shelves size each book from the shelf's width (cqi), capped at the book's
   natural size, so a narrow shelf shrinks the books instead of wrapping them.
   The subtracted px is the column gap share plus the button's horizontal
   padding. Four across here, two at 680px and below. */
.rl-shelf--combo {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 200px));
  justify-content: center;
  gap: 14px 16px;
  padding-top: 4px;
  container-type: inline-size;
}
.rl-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 16px 12px;
  align-items: end;
  justify-items: center;
}

/* Front cover, dark spine and a thin fore-edge. */
.rl-book {
  --t: 13px;  /* spine width */
  --pg: 3px;  /* fore-edge (page block) width */
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 10px 10px 4px;
  cursor: pointer;
  display: block;
  text-align: left;
  perspective: 900px;
}
.rl-book:focus-visible { outline: none; }
.rl-book-3d {
  /* The box sets the height: the front (width minus spine and fore-edge) is a
     2:3 trade-book face; off-ratio covers fit inside it.
     Sizing the box, not the front, keeps stretch working the same in WebKit
     and Chromium. */
  --bw: 118px;
  display: flex;
  align-items: stretch;
  width: var(--bw);
  height: calc((var(--bw) - var(--t) - var(--pg)) * 1.5);
  transform: rotateY(-11deg);
  transform-origin: left center;
  transform-style: preserve-3d;
  filter: drop-shadow(1px 2px 3px rgba(22, 20, 18, 0.14));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.rl-book:hover .rl-book-3d,
.rl-book:focus-visible .rl-book-3d {
  transform: rotateY(-8deg);
  filter: drop-shadow(1px 3px 4px rgba(22, 20, 18, 0.18));
}
.rl-book:focus-visible .rl-book-3d {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}
/* The spine stays dark so the cover title appears only on the front. */
.rl-book-spine {
  flex: 0 0 var(--t);
  width: var(--t);
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xs) 0 0 var(--r-xs);
  background-color: var(--ink);
}
.rl-book-spine::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    inset -2px 0 4px rgba(22, 20, 18, 0.45),
    inset 1px 0 0 rgba(255, 255, 255, 0.16);
}
.rl-book-front {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  display: flex;
  flex-direction: column;
  padding: 11px 9px 12px 11px;
  box-shadow: inset 3px 0 6px rgba(22, 20, 18, 0.18);
}
.rl-book-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  display: block;
}
.rl-book-page {
  flex: 0 0 var(--pg);
  width: var(--pg);
  background: repeating-linear-gradient(
    to right,
    #f7f4ee 0 1px,
    #e8e2d6 1px 2px
  );
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  box-shadow: inset 0 0 0 1px rgba(22, 20, 18, 0.06);
}
/* No cover yet: a plain typeset edition — ink serif title on a card face
   under a short honey rule, so a missing image reads as a designed book, not
   a placeholder. Type never drops below 11px. */
.rl-book:not(.rl-book--has-cover) .rl-book-front {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 3px 0 6px rgba(22, 20, 18, 0.1), inset 0 0 0 1px var(--border);
}
.rl-book:not(.rl-book--has-cover) .rl-book-front::before {
  content: "";
  flex: none;
  width: 22px;
  height: 2px;
  margin-bottom: 9px;
  background: var(--honey);
}
.rl-book-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: break-word;
  hyphens: auto;
  hyphenate-limit-chars: 8 4 3;
  flex: none;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rl-book--has-cover .rl-book-front { padding: 0; }
.rl-book--nate .rl-book-spine { background-color: var(--ink); }
.rl-book--combo { --t: 18px; }
.rl-book--combo .rl-book-3d { --bw: min(168px, 25cqi - 26px); }
.rl-book--combo .rl-book-front { padding: 16px 12px 16px 16px; }
.rl-book--combo.rl-book--has-cover .rl-book-front { padding: 0; }
.rl-book--combo .rl-book-spine { background-color: var(--clay); }
.rl-book--combo .rl-book-name { font-size: 18px; -webkit-line-clamp: 7; }

.rl-book--wall { --t: 8px; --pg: 2px; padding: 4px 8px 8px 2px; }
.rl-book--wall .rl-book-3d { --bw: 76px; }
.rl-book--wall .rl-book-front { padding: 8px 5px 8px 8px; }
.rl-book--wall.rl-book--has-cover .rl-book-front { padding: 0; }
.rl-book--wall .rl-book-name { font-size: 11px; line-height: 1.15; -webkit-line-clamp: 5; }
.rl-book--wall .rl-book-front::before { width: 16px; margin-bottom: 6px; }

.rl-book--tim .rl-book-spine { background-color: var(--ink); }

/* ---------- right sheet ---------- */
body.rl-sheet-open { overflow: hidden; }
.rl-sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
}
.rl-sheet-wrap[hidden] { display: none; }
.rl-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.32s ease;
}
.rl-sheet-wrap.open .rl-sheet-backdrop { opacity: 1; }
.rl-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--border);
  overflow: auto;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.rl-sheet-wrap.open .rl-sheet { transform: translateX(0); }
.rl-sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}
.rl-sheet-cover-wrap {
  background: var(--paper-2);
  padding: 36px 36px 8px;
  display: flex;
  justify-content: center;
}
.rl-sheet-cover-wrap[hidden] { display: none; }
.rl-sheet-cover {
  width: min(220px, 70%);
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center center;
  background: var(--paper);
  border-radius: var(--r-xs);
  box-shadow: 0 1px 2px rgba(22, 20, 18, 0.08), 0 6px 16px rgba(22, 20, 18, 0.1);
}
.rl-sheet-body { padding: 28px 32px 40px; }
.rl-sheet-kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--fs-label-ls);
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 10px;
  padding-right: 72px;
}
.rl-sheet-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
}
.rl-sheet-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--fs-meta-ls);
  line-height: 1.6;
  color: var(--muted);
  margin-top: 10px;
}
.rl-sheet-theme {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.rl-sheet-link {
  margin-top: 22px;
}
.rl-sheet-link[hidden] { display: none; }

@media (max-width: 680px) {
  .rl-sheet-close { width: 44px; height: 44px; }
  .rl-shelf--combo { grid-template-columns: repeat(2, minmax(0, 200px)); }
  .rl-book--combo .rl-book-3d { --bw: min(168px, 50cqi - 22px); }
}

@media (prefers-reduced-motion: reduce) {
  .rl-sheet,
  .rl-sheet-wrap.open .rl-sheet { transform: none; transition: none; }
  .rl-sheet-backdrop { transition: none; }
  .rl-book-3d,
  .rl-book:hover .rl-book-3d,
  .rl-book:focus-visible .rl-book-3d { transition: none; }
}

.rl-theme {
  grid-column: 1 / -1;
  margin: var(--space-24) 0 var(--space-12);
  font: 500 var(--fs-label)/1.4 var(--font-mono);
  letter-spacing: var(--fs-label-ls);
  text-transform: uppercase;
  color: var(--clay);
}
.rl-theme-count { margin-left: var(--space-8); color: var(--muted); font-weight: 400; }
