:root {
  --cream: #f4f0ea;
  --cream-dark: #e4e0da;
  --charcoal: #0a0a0a;
  --text-secondary: #4a4a4a;
  --accent-warm: #8b6914;
  --accent-sage: #2d5016;
  --card-white: #ffffff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6; color: var(--charcoal); background: var(--cream);
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3 { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
a { color: inherit; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; padding-bottom: 56px; }

/* header / footer */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Libre Baskerville', Georgia, serif; font-size: 20px; text-decoration: none; }
.logo i { font-style: italic; }
.site-nav { display: flex; gap: 22px; align-items: center; font-size: 14px; color: var(--text-secondary); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--charcoal); }
.site-nav .nav-app { color: var(--charcoal); font-weight: 600; }
.site-footer { border-top: 1px solid var(--cream-dark); padding: 24px 0 32px; font-size: 13px; color: var(--text-secondary); }
.site-footer p + p { margin-top: 6px; }
.site-footer a { text-decoration: underline; }

/* page heads */
.crumb { font-size: 13px; color: var(--text-secondary); margin: 8px 0 10px; }
.crumb a { text-decoration: none; }
h1 { font-size: 34px; line-height: 1.2; margin-bottom: 10px; }
.intro { font-size: 17px; color: var(--text-secondary); max-width: 620px; margin-bottom: 8px; }
.week { font-size: 12px; color: var(--accent-warm); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.week a { text-decoration: underline; }
.disclosure { font-size: 13px; font-style: italic; color: var(--text-secondary); margin: 6px 0 14px; }

/* covers */
.cover {
  position: relative; display: inline-flex; align-items: flex-end; flex: none; overflow: hidden;
  border-radius: 2px 5px 5px 2px; box-shadow: 2px 3px 9px rgba(0, 0, 0, 0.25); background: #444;
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-title { padding: 6px; font: 700 9px/1.15 'Libre Baskerville', Georgia, serif; color: #fff; }
.cv0 { background: linear-gradient(160deg, #8b2d3a, #4d1520); }
.cv1 { background: linear-gradient(160deg, #2d5016, #12260a); }
.cv2 { background: linear-gradient(160deg, #c9a24a, #7a5a14); }
.cv3 { background: linear-gradient(160deg, #35506b, #16263a); }
.cv4 { background: linear-gradient(160deg, #6b3a6b, #2b132b); }
.cv5 { background: linear-gradient(160deg, #444, #111); }
.cover-link { display: inline-block; line-height: 0; }

/* buttons */
.btn { display: block; font-size: 13.5px; padding: 9px 12px; border-radius: 6px; text-align: center; text-decoration: none; border: 1px solid var(--charcoal); color: var(--charcoal); }
.btn-primary { background: var(--charcoal); color: var(--cream); }
.btn-store { background: var(--card-white); border-color: var(--cream-dark); }
.btn-store:hover, .btn-primary:hover { opacity: 0.88; }
.btn-app { display: inline-block; background: var(--accent-sage); border-color: var(--accent-sage); color: #fff; padding: 10px 20px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 340px; margin-top: 8px; }
.actions .btn-primary { grid-column: 1 / -1; }

/* ranked list */
.rows { list-style: none; }
.row { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--cream-dark); }
.rank { font-family: 'Libre Baskerville', Georgia, serif; font-size: 24px; color: var(--accent-warm); width: 34px; text-align: center; flex: none; }
.row .meta { flex: 1; min-width: 0; }
.row .t { font-size: 18px; line-height: 1.25; }
.row .t a { text-decoration: none; }
.row .t a:hover { text-decoration: underline; }
.row .a { font-size: 14px; color: var(--text-secondary); }
.row .why { font-size: 13px; color: var(--accent-sage); margin-top: 2px; }

/* shelves (hub, more-on-list) */
.section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 12px; }
.section-h h2 { font-size: 22px; }
.section-h a { font-size: 13px; color: var(--accent-warm); }
.shelf { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.shelf-item { display: flex; flex-direction: column; width: 96px; flex: none; text-decoration: none; scroll-snap-align: start; line-height: 1.25; }
.shelf-item .cover { margin-bottom: 8px; }
.st { font: 13px/1.25 'Libre Baskerville', Georgia, serif; }
.sa { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.sr { font-size: 11.5px; color: var(--accent-sage); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; padding: 7px 14px; border-radius: 99px; background: var(--card-white); border: 1px solid var(--cream-dark); text-decoration: none; }
.hub-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }

/* book page */
.book { display: flex; gap: 32px; margin-top: 12px; }
.book-info { flex: 1; min-width: 0; }
.book h1 { font-size: 30px; }
.book .by { font-size: 16px; color: var(--text-secondary); margin-bottom: 14px; }
.book .action-area { max-width: 560px; }
.book .actions { grid-template-columns: 1fr 1fr; max-width: 560px; margin-top: 0; }
.book .btn-primary { font-size: 15px; padding: 12px; }
.lists-on { margin-top: 22px; max-width: 560px; }
.lists-on h2 { font-size: 16px; margin-bottom: 6px; }
.lists-on li { list-style: none; padding: 7px 0; border-top: 1px solid var(--cream-dark); font-size: 14px; }
.lists-on li a { color: var(--accent-sage); }
.notice { max-width: 560px; margin: 60px auto; text-align: center; }
.notice p { color: var(--text-secondary); margin-top: 10px; }

/* phones: stack the three buttons under the title */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 27px; }
  .row { align-items: flex-start; gap: 12px; }
  .rank { width: 22px; font-size: 20px; }
  .row .t { font-size: 16px; }
  .actions { grid-template-columns: 1fr; max-width: none; }
  .book { flex-direction: column; align-items: center; text-align: center; }
  .book .book-info { width: 100%; text-align: left; }
  .book .actions { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; }
}
